This module contains a collection of YANG definitions for configuring IP implementations. Copyright (C) 2019 Huawei Technologies...
Version: 2021-10-13
module huawei-if-ip { yang-version 1; namespace "urn:huawei:yang:huawei-if-ip"; prefix if-ip; import ietf-inet-types { prefix inet; } import huawei-ifm { prefix ifm; } import huawei-network-instance { prefix ni; } import huawei-extension { prefix ext; } import huawei-l3vpn { prefix l3vpn; } organization "Huawei Technologies Co., Ltd."; contact "Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China Website: http://www.huawei.com Email: support@huawei.com"; description "This module contains a collection of YANG definitions for configuring IP implementations. Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved."; revision "2021-10-13" { description "Add Discarded Tags."; reference "Huawei private."; } revision "2020-06-30" { description "Add units attribute."; reference "Huawei private."; } revision "2020-02-07" { description "The modifications in the code are synchronized to the YANG file."; reference "Huawei private."; } revision "2019-04-10" { description "Initial revision."; reference "Huawei private."; } ext:task-name "interface-mgr"; typedef ipv4-address-config-type { type enumeration { enum "main" { value 1; description "Primary address of an interface."; } enum "sub" { value 32; description "Secondary address of an interface."; } } description "IPv4 address type."; } typedef ipv4-address-state-type { type enumeration { enum "main" { value 1; description "Primary address of an interface."; } enum "sub" { value 32; description "Secondary address of an interface."; } enum "neg" { value 4; description "Negotiated address of an interface."; } enum "unnumber" { value 2; description "Unnumbered address of an interface."; } } description "IPv4 address type."; } typedef ipv4-netmask { type string { length "9..15"; pattern '((([1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))'; } description "IPv4 mask support mask format."; } typedef negotiation-type { type enumeration { enum "ppp-negotiate" { value 0; description "PPP negotiation type."; } } description "Negotiation address type."; } typedef ipv6-address-config-type { type enumeration { enum "global" { value 1; description "Global unicast address."; } enum "link-local" { value 2; description "Link local address."; } enum "anycast" { value 6; description "Anycast address."; } } description "IPv6 address type."; } typedef ipv6-address-state-type { type enumeration { enum "global" { value 1; description "Global unicast address."; } enum "link-local" { value 2; description "Link local address."; } enum "auto-link-local" { value 3; description "Auto link local address."; } enum "anycast" { value 6; description "Anycast address."; } } description "IPv6 address type."; } typedef ipv6-address-algorithm-type { type enumeration { enum "none" { value 0; description "None."; } enum "cga" { value 1; description "CGA."; } enum "eui64" { value 2; description "EUI 64."; } } description "IPv6 address algorithm type."; } typedef ipv6-status-type { type enumeration { enum "preferred" { value 1; description "This is a valid address that can appear as the destination or source address of a packet."; } enum "inaccessible" { value 4; description "The address is not accessible because the interface to which this address is assigned is not operational."; } enum "unknown" { value 5; description "The status cannot be determined for some reason."; } enum "tentative" { value 6; description "The uniqueness of the address on the link is being verified. Addresses in this state should not be used for general communication and should only be used to determine the uniqueness of the address."; } enum "duplicate" { value 7; description "The address has been determined to be non-unique on the link and so must not be used."; } } description "Status of an address."; } augment /ni:network-instance/ni:instances/ni:instance { description "Policies for selecting source and destination IPv6 addresses and parameters for configuring IP on interfaces."; container ipv4-ifs { status deprecated; description "List of IPv4 configurations."; list ipv4-if { key "name"; status deprecated; description "Configure IPv4. Capabilities supported by this node vary according to interface types."; leaf name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } must "../../../ni:name=/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:vrf-name"; status deprecated; description "The textual name of the interface. It should be the name of the interface as assigned by the local device. It should be suitable for use in commands which entered at the device's 'console'. This might be a text name, such as 'Loopback0', depending on the interface naming syntax of the device."; } choice address { mandatory true; status deprecated; description "The IPv4 address can be specified as negotiated or unnumbered or ordinarily address."; case config-address { status deprecated; description "Config IPv4 address."; container addresses { must "count(address)=0 or count(address[type='main'])=1"; status deprecated; description "List of IPv4 addresses. The IPv4 address of the DCN interface cannot be created, modified, or deleted."; list address { key "ip"; status deprecated; description "Configure an IPv4 address to the interface."; leaf ip { type inet:ipv4-address-no-zone; must "../../../../../l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast']"; status deprecated; description "IPv4 address."; } leaf netmask { type ipv4-netmask; mandatory true; status deprecated; description "IPv4 address mask."; } leaf type { type ipv4-address-config-type; mandatory true; status deprecated; description "IPv4 address type."; } } // list address } // container addresses } // case config-address case unnumbered-address { status deprecated; description "Unnumbered address."; container unnumbered-if { status deprecated; description "Configure unnumbered interface. The address borrowing relationship of the DCN interface cannot be created, modified, or deleted."; leaf name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } must "../../if-ip:name!=../name and ../../../../l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast'] and /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:vrf-name=/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()/../../if-ip:name]/ifm:vrf-name"; status deprecated; description "Name of an unnumbered interface."; } } // container unnumbered-if } // case unnumbered-address } // choice address } // list ipv4-if } // container ipv4-ifs container ipv4-if-states { config false; status deprecated; description "List of IPv4 address state."; list ipv4-if-state { key "name"; config false; status deprecated; description "Operational state of IPv4 addresses."; leaf name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } config false; status deprecated; description "The textual name of the interface. It should be the name of the interface as assigned by the local device. It should be suitable for use in commands which entered at the device's 'console'. This might be a text name, such as 'Loopback0', depending on the interface naming syntax of the device."; } container addresses { config false; status deprecated; description "List of IPv4 addresses."; list address { key "ip"; config false; status deprecated; description "Operational state of IPv4 addresses."; leaf ip { type inet:ipv4-address-no-zone; config false; status deprecated; description "IPv4 address."; } leaf netmask { type ipv4-netmask; config false; status deprecated; description "IPv4 address mask."; } leaf type { type ipv4-address-state-type; config false; status deprecated; description "IPv4 address type."; } } // list address } // container addresses } // list ipv4-if-state } // container ipv4-if-states container ipv6-ifs { status deprecated; description "List of IPv6 configurations."; list ipv6-if { key "name"; status deprecated; description "Configure IPv6. Capabilities supported by this node vary according to interface types."; leaf name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } must "../../../ni:name=/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:vrf-name"; status deprecated; description "The textual name of the interface. It should be the name of the interface as assigned by the local device. It should be suitable for use in commands which entered at the device's 'console'. This might be a text name, such as 'Loopback0', depending on the interface naming syntax of the device."; } leaf mtu6 { ext:dynamic-default; type uint32 { range "0..50000"; } units "Byte"; status deprecated; description "IPv6 maximum transmission unit of an interface. Special explanation: Range: The server may restrict the allowed values for this leaf, depending on the interface's type."; } leaf spread-mtu-flag { type boolean; default "false"; status deprecated; description "Enable/disable the function of spreading the IPv6 MTU of main interface to subinterface."; } leaf auto-link-local { type boolean; must "../auto-link-local = 'false' or (../auto-link-local = 'true' and ../../../l3vpn:afs/l3vpn:af[l3vpn:type='ipv6-unicast'])"; default "false"; status deprecated; description "Enable/disable an interface with the auto linklocal address function."; } container addresses { status deprecated; description "List of IPv6 addresses."; list address { key "ip"; status deprecated; description "Configure an IPv6 address to the interface."; leaf ip { type inet:ipv6-address-no-zone; must "../../../../../l3vpn:afs/l3vpn:af[l3vpn:type='ipv6-unicast']"; status deprecated; description "IPv6 address."; } leaf prefix-length { type uint32 { range "1..128"; } mandatory true; status deprecated; description "Length of the IPv6 address prefix."; } leaf type { type ipv6-address-config-type; mandatory true; status deprecated; description "IPv6 address type."; } leaf algorithm-type { type ipv6-address-algorithm-type; must "(../type='global' and (../algorithm-type='none' or ../algorithm-type='cga' or ../algorithm-type='eui64') ) or (../type='link-local' and (../algorithm-type='none' or ../algorithm-type='cga') ) or (../type='anycast' and ../algorithm-type='none')"; default "none"; status deprecated; description "Address algorithm type."; } } // list address } // container addresses } // list ipv6-if } // container ipv6-ifs container ipv6-if-states { config false; status deprecated; description "List of IPv6 address state."; list ipv6-if-state { key "name"; config false; status deprecated; description "Operational state of IPv6 addresses."; leaf name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } config false; status deprecated; description "The textual name of the interface. It should be the name of the interface as assigned by the local device. It should be suitable for use in commands which entered at the device's 'console'. This might be a text name, such as 'Loopback0', depending on the interface naming syntax of the device."; } container addresses { config false; status deprecated; description "List of IPv6 addresses."; list address { key "ip"; config false; status deprecated; description "Operational state of IPv6 addresses."; leaf ip { type inet:ipv6-address-no-zone; config false; status deprecated; description "IPv6 address."; } leaf prefix-length { type uint32 { range "1..128"; } config false; status deprecated; description "Length of the IPv6 address prefix."; } leaf type { type ipv6-address-state-type; config false; status deprecated; description "IPv6 address type."; } leaf algorithm-type { type ipv6-address-algorithm-type; config false; status deprecated; description "Address algorithm type."; } leaf collision-count { type uint32 { range "0..3"; } config false; status deprecated; description "Number of IPv6 address collisions."; } leaf is-block { type boolean; config false; status deprecated; description "IPv6 address is blocked or not."; } leaf status { type ipv6-status-type; config false; status deprecated; description "IPv6 address status."; } } // list address } // container addresses } // list ipv6-if-state } // container ipv6-if-states } } // module huawei-if-ip
© 2023 YumaWorks, Inc. All rights reserved.