Cisco-IOS-XR-um-if-ip-address-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR interface package configuration. This YANG module augmen...

  • Version: 2020-05-27

    Cisco-IOS-XR-um-if-ip-address-cfg@2020-05-27


    
      module Cisco-IOS-XR-um-if-ip-address-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-um-if-ip-address-cfg";
    
        prefix um-if-ip-address-cfg;
    
        import cisco-semver {
          prefix semver;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import Cisco-IOS-XR-types {
          prefix xr;
        }
        import Cisco-IOS-XR-um-interface-cfg {
          prefix a1;
        }
        import tailf-common {
          prefix tailf;
        }
    
        organization "Cisco Systems, Inc.";
    
        contact
          "Cisco Systems, Inc.
         Customer Service
         
         Postal: 170 West Tasman Drive
         San Jose, CA 95134
         
         Tel: +1 800 553-NETS
         
         E-mail: cs-yang@cisco.com";
    
        description
          "This module contains a collection of YANG definitions
         for Cisco IOS-XR interface package configuration.
         
         This YANG module augments the
         modules with configuration data.
         
         Copyright (c) 2019-2020 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2020-05-27" {
          description
            "- Included BVI interface under when statement for container dhcp
           - Added container dhcp and dhcp-client-options under ipv6 addresses";
        }
    
        revision "2019-06-10" {
          description
            "Establish semantic version baseline.";
        }
    
        revision "2019-03-29" {
          description "Initial version";
        }
    
        semver:module-version "3.0.0";
        semver:module-version "2.0.0";
    
        grouping GROUP-IPV4 {
          description
            "Interface IPv4 config commands";
          container addresses {
            description
              "Set the IPv4 address of an interface";
            container address {
              presence
                "Indicates a address node is configured.";
              description "IP address and Mask";
              leaf address {
                type inet:ipv4-address-no-zone;
                mandatory true;
                description "IP address";
              }
    
              leaf netmask {
                type inet:ipv4-address-no-zone;
                mandatory true;
                description "IP subnet mask";
              }
    
              leaf route-tag {
                type uint32 {
                  range "1..4294967295";
                }
                description
                  "Route-tag to be associated with this address";
              }
            }  // container address
    
            container secondaries {
              description
                "Specify a secondary address";
              list secondary {
                key "address";
                description
                  "IP address and Mask";
                leaf address {
                  type inet:ipv4-address-no-zone;
                  description
                    "Secondary IP address";
                }
    
                leaf netmask {
                  type inet:ipv4-address-no-zone;
                  mandatory true;
                  description "Netmask";
                }
    
                leaf route-tag {
                  type uint32 {
                    range "1..4294967295";
                  }
                  description
                    "Route-tag to be associated with this address";
                }
              }  // list secondary
            }  // container secondaries
    
            leaf unnumbered {
              tailf:dependency "../../../a1:interface-name";
              when
                "../../../a1:interface-name[not(starts-with(text(),'pw-ether'))]";
              type xr:Interface-name;
              description
                "Enable IP processing without an explicit address";
            }
    
            container dhcp {
              tailf:dependency "../../../a1:interface-name";
              when
                "../../../a1:interface-name[starts-with(text(),'MgmtEth')] or ../../../a1:interface-name[starts-with(text(),'BVI')]";
              presence
                "Indicates a dampening node is configured.";
              description
                "IPv4 address and Mask negotiated via DHCP";
            }  // container dhcp
          }  // container addresses
        }  // grouping GROUP-IPV4
    
        grouping GROUP-IPV6 {
          container addresses {
            description
              "Set the IPv6 address of an interface";
            list ipv6-address {
              key "address";
              description "IPv6 address";
              leaf address {
                type inet:ip-address-no-zone;
                description
                  "IPv6 name or address";
              }
    
              leaf prefix-length {
                type xr:Ipv6-prefix-length;
                mandatory true;
                description
                  "Prefix length in bits";
              }
    
              leaf zone {
                type union {
                  type string {
                    pattern "0";
                  }
                  type string;
                }
                mandatory true;
                description "IPv6 address zone";
              }
    
              leaf route-tag {
                type uint32 {
                  range "1..4294967295";
                }
                description
                  "Route-tag to be associated with this address";
              }
            }  // list ipv6-address
    
            container link-local-address {
              presence
                "Indicates a link-local-address node is configured.";
              description
                "Link local IPv6 address";
              leaf address {
                type inet:ip-address-no-zone;
                mandatory true;
                description "IPv6 address";
              }
    
              leaf zone {
                type union {
                  type string {
                    pattern "0";
                  }
                  type string;
                }
                mandatory true;
                description "IPv6 address zone";
              }
    
              leaf route-tag {
                type uint32 {
                  range "1..4294967295";
                }
                description
                  "Route-tag to be associated with this address";
              }
            }  // container link-local-address
    
            container eui64-addresses {
              description "EUI-64 IPv6 address";
              list eui64-address {
                key "address";
                description
                  "EUI-64 IPv6 address";
                leaf address {
                  type inet:ip-address-no-zone;
                  description "IPv6 address";
                }
    
                leaf prefix-length {
                  type xr:Ipv6-prefix-length;
                  mandatory true;
                  description "Prefix Length";
                }
    
                leaf zone {
                  type union {
                    type string {
                      pattern "0";
                    }
                    type string;
                  }
                  mandatory true;
                  description
                    "IPv6 address zone";
                }
    
                leaf route-tag {
                  type uint32 {
                    range "1..4294967295";
                  }
                  description
                    "Route-tag to be associated with this address";
                }
              }  // list eui64-address
            }  // container eui64-addresses
    
            container autoconfig {
              tailf:dependency "../../../a1:interface-name";
              when
                "../../../a1:interface-name[starts-with(text(),'MgmtEth')]";
              presence
                "Indicates a autoconfig node is configured.";
              description
                "Enable slaac on Mgmt interface";
            }  // container autoconfig
    
            container dhcp {
              tailf:dependency "../../../a1:interface-name";
              when
                "../../../a1:interface-name[starts-with(text(),'MgmtEth')] or ../../../a1:interface-name[starts-with(text(),'BVI')]";
              presence
                "Indicates a dhcp node is configured.";
              description
                "Enable dhcp on this interface";
            }  // container dhcp
    
            container dhcp-client-options {
              presence
                "Indicates a dhcp-client-options node is configured.";
              description "DHCP Client Options";
            }  // container dhcp-client-options
          }  // container addresses
    
          container enable {
            presence
              "Indicates a dampening node is configured.";
            description
              "Enable IPv6 on interface";
          }  // container enable
        }  // grouping GROUP-IPV6
    
        augment /a1:interfaces/a1:interface/a1:ipv4 {
          uses GROUP-IPV4;
        }
    
        augment /a1:interfaces/a1:interface-preconfigure/a1:ipv4 {
          uses GROUP-IPV4;
        }
    
        augment /a1:interfaces/a1:interface/a1:ipv6 {
          uses GROUP-IPV6;
        }
    
        augment /a1:interfaces/a1:interface-preconfigure/a1:ipv6 {
          uses GROUP-IPV6;
        }
      }  // module Cisco-IOS-XR-um-if-ip-address-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.