This YANG module defines essential components for the management of a routing subsystem.
Version: 2021-08-11
module huawei-routing { yang-version 1; namespace "urn:huawei:yang:huawei-routing"; prefix rt; import huawei-network-instance { prefix ni; } import huawei-l3vpn { prefix l3vpn; } import ietf-inet-types { prefix inet; } import huawei-extension { prefix ext; } import huawei-ifm { prefix ifm; } import huawei-bfd { prefix bfd; } import huawei-pub-type { prefix pub-type; } import huawei-routing-policy { prefix rtp; } import huawei-xpl { prefix xpl; } import huawei-tunnel-management { prefix tnlm; } include huawei-routing-type; 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 YANG module defines essential components for the management of a routing subsystem."; revision "2021-08-11" { description "Add grouping import-rib-policy-type routing-table etc."; reference "Huawei private."; } revision "2019-04-27" { description "Initial revision."; reference "Huawei private."; } ext:task-name "route-base"; typedef af-type { type enumeration { enum "ipv4-unicast" { value 1; description "IPv4 unicast."; } enum "ipv6-unicast" { value 2; description "IPv6 unicast."; } } description "The type of address family."; } container routing { description "Configuration parameters for the routing module."; container routing-manage { description "Configure the routing management module to store and select optimal routes."; container relay-tunnel { description "Configure route recursion to tunnel."; leaf enable { type boolean; default "false"; description "Enable/disable route recursion to tunnel. By default, this configuration takes effect for all routes. If an IP prefix list is configured, the configuration takes effect only for the routes that match the IP prefix list. If a tunnel policy is configured, routes carry the tunnel policy information when recursing to a tunnel."; } leaf ipv4-prefix-ref { when "../enable='true'"; type leafref { path "/rtp:routing-policy/rtp:ipv4-prefix-filters/rtp:ipv4-prefix-filter/rtp:name"; } must "../enable='true'"; description "Name of an IPv4 prefix list."; } leaf tunnel-policy-ref { when "../enable='true'"; type leafref { path "/tnlm:tunnel-management/tnlm:tunnel-policys/tnlm:tunnel-policy/tnlm:name"; } must "../enable='true'"; description "Name of a tunnel policy."; } } // container relay-tunnel container relay-label { description "Configure route recursion to remotely leaked VPN routes globally."; leaf ipv4-set { type boolean; default "false"; description "Enable/disable the function of recursing IPv4 unicast routes to remotely leaked VPN routes."; } leaf ipv6-set { type boolean; default "false"; description "Enable/disable the function of recursing IPv6 unicast routes to remotely leaked VPN routes."; } } // container relay-label container ipv4-threshold { must "upper-percent>lower-percent"; description "Configure thresholds (one alarm threshold and one clear alarm threshold) for the number of IPv4 route prefixes."; leaf upper-percent { type uint8 { range "2..100"; } units "%"; default "80"; description "Upper limit for the number of IPv4 route prefixes."; } leaf lower-percent { type uint8 { range "1..99"; } units "%"; default "70"; description "Lower limit for the number of IPv4 route prefixes."; } } // container ipv4-threshold container ipv6-threshold { must "upper-percent>lower-percent"; description "Configure thresholds (one alarm threshold and one clear alarm threshold) for the number of IPv6 route prefixes."; leaf upper-percent { type uint8 { range "2..100"; } units "%"; default "80"; description "Set the upper limit percent of the IPv6 prefix threshold."; } leaf lower-percent { type uint8 { range "1..99"; } units "%"; default "70"; description "Set the lower limit percent of the IPv6 prefix threshold."; } } // container ipv6-threshold container iterative-restrain { description "Configure suppression periods for recursion."; leaf enable { type boolean; default "true"; description "Enable/disable suppression on recursion."; } leaf start-time { type uint32 { range "500..2000"; } units "ms"; default "500"; description "Specifies the time of the first route or tunnel iteration suppression."; } leaf increase-time { type uint32 { range "1000..5000"; } units "ms"; default "1000"; description "Specifies the incremental suppression duration of route or tunnel iteration."; } leaf max-time { type uint32 { range "5000..60000"; } units "ms"; default "30000"; description "Specifies the maximum suppression duration of route or tunnel iteration."; } } // container iterative-restrain container relay-default-routes { description "List of routes that recurse to the default route globally."; list relay-default-route { key "address-family protocol-type"; description "Configure route recursion to the default route globally."; leaf address-family { type af-type; must "../address-family='ipv4-unicast' or (not(../protocol-type='msr') and ../address-family='ipv6-unicast')"; description "Set an address family."; } leaf protocol-type { type enumeration { enum "msr" { value 2; description "MSR protocol."; } enum "static" { value 3; description "Static protocol."; } } must "../protocol-type='static' or (../protocol-type='msr' and ../address-family='ipv4-unicast')"; description "Protocol."; } } // list relay-default-route } // container relay-default-routes container ipv4-vpn-route-statisticss { config false; description "List of statistics about routes of all VPN instances in the IPv4 routing table."; list ipv4-vpn-route-statistics { key "protocol-type"; description "All IPv4 VPN Instance route statistics."; leaf protocol-type { type statistic-protocol-type; description "Protocol."; } leaf total-num { type uint32; description "Number of routes in the routing table."; } leaf active-num { type uint32; description "Number of active routes in the routing table."; } leaf added-num { type uint32; description "Number of active and inactive routes added to the routing table."; } leaf deleted-num { type uint32; description "Number of routes deleted from the routing table."; } leaf freed-num { type uint32; description "Number of routes that are permanently released from the routing table."; } } // list ipv4-vpn-route-statistics } // container ipv4-vpn-route-statisticss container ipv6-vpn-route-statisticss { config false; description "List of statistics about routes of all VPN instances in the IPv6 routing table."; list ipv6-vpn-route-statistics { key "protocol-type"; description "All IPv6 VPN Instance route statistics."; leaf protocol-type { type ipv6-statistic-protocol-type; description "Protocol."; } leaf total-num { type uint32; description "Number of routes in the routing table."; } leaf active-num { type uint32; description "Number of active routes in the routing table."; } leaf added-num { type uint32; description "Number of active and inactive routes added to the routing table."; } leaf deleted-num { type uint32; description "Number of routes deleted from the routing table."; } leaf freed-num { type uint32; description "Number of routes that are permanently released from the routing table."; } } // list ipv6-vpn-route-statistics } // container ipv6-vpn-route-statisticss container unicast-route-statistics { config false; description "Statistics of unicast route of all VPN instances."; leaf ipv4-prefix-number { type uint32; description "The number of IPv4 route prefixes for all VPN instances."; } leaf ipv6-prefix-number { type uint32; description "The number of IPv6 route prefixes for all VPN instances."; } } // container unicast-route-statistics } // container routing-manage container static-routing { description "Configure a basic service package for static routes."; container ipv4-site { description "Configure parameters for IPv4 static routes."; leaf preference { ext:dynamic-default; type uint32 { range "1..255"; } description "Default priority of IPv4 static routes. The default value can be controlled by the PAF file and varies according to hardware. To query the default value, you can perform a get operation."; } leaf relay-switch { type boolean; default "false"; description "Enable/disable the function of selecting static routes based on recursion depths."; } leaf min-tx-interval { ext:dynamic-default; type uint32; units "ms"; description "Default minimum interval expected at which IPv4 BFD packets are sent to the peer end. The default value can be controlled by the PAF file and varies according to hardware."; } leaf min-rx-interval { ext:dynamic-default; type uint32; units "ms"; description "Default minimum interval expected at which IPv4 BFD packets are received from the peer end. The default value can be controlled by the PAF file and varies according to hardware."; } leaf multiplier { type uint32 { range "3..50"; } default "3"; description "IPv4 Local detection multiplier."; } leaf relay-remote { type boolean; default "true"; description "Enable/disable the function of recursing IPv4 unicast static routes to remotely leaked VPN routes."; } leaf relay-arp-vlink { type boolean; default "false"; description "Enable/disable the function of recursing IPv4 unicast static routes to ARP Vlink routes."; } leaf inherit-cost-switch { type boolean; default "false"; description "Enable/disable the function of comparing the costs of inherited routes during static route selection."; } leaf current-route-num { type uint32; config false; description "Number of IPv4 static routes that have been configured."; } leaf max-route-num { type uint32; config false; description "Maximum number of IPv4 static routes that can be configured."; } leaf relay-srv6-nexthop { type boolean; default "false"; description "Enable/disable the function of recursing IPv4 unicast static routes to SRv6 routes."; } } // container ipv4-site container ipv4-relay-tunnel { description "Configure route recursion to tunnel."; leaf enable { type boolean; default "false"; description "Enable/disable route recursion to tunnel. By default, this configuration takes effect for all routes. If an IP prefix list is configured, the configuration takes effect only for the routes that match the IP prefix list. If a tunnel policy is configured, routes carry the tunnel policy information when recursing to a tunnel."; } leaf ipv4-prefix-ref { when "../enable='true'"; type leafref { path "/rtp:routing-policy/rtp:ipv4-prefix-filters/rtp:ipv4-prefix-filter/rtp:name"; } description "Name of an IPv4 prefix list."; } leaf tunnel-policy-ref { when "../enable='true'"; type leafref { path "/tnlm:tunnel-management/tnlm:tunnel-policys/tnlm:tunnel-policy/tnlm:name"; } description "Name of a tunnel policy."; } } // container ipv4-relay-tunnel container ipv6-site { description "Configure parameters for IPv6 static routes."; leaf preference { ext:dynamic-default; type uint32 { range "1..255"; } description "Default priority of IPv6 static routes. The default value can be controlled by the PAF file and varies according to hardware. To query the default value, you can perform a get operation."; } leaf min-tx-interval { ext:dynamic-default; type uint32; units "ms"; description "Default minimum interval expected at which IPv6 BFD packets are sent to the peer end. The default value can be controlled by the PAF file and varies according to hardware."; } leaf min-rx-interval { ext:dynamic-default; type uint32; units "ms"; description "Default minimum interval expected at which IPv6 BFD packets are received from the peer end. The default value can be controlled by the PAF file and varies according to hardware."; } leaf multiplier { type uint32 { range "3..50"; } default "3"; description "IPv6 Local detection multiplier."; } leaf relay-arp-vlink6 { type boolean; default "false"; description "Enable/disable the function of recursing IPv6 unicast static routes to ARP Vlink routes."; } leaf current-route-num { type uint32; config false; description "Number of IPv6 static routes that have been configured."; } leaf max-route-num { type uint32; config false; description "Maximum number of IPv6 static routes that can be configured."; } leaf relay-srv6-nexthop6 { type boolean; default "false"; description "Enable/disable the function of recursing IPv6 unicast static routes to SRv6 routes."; } } // container ipv6-site container max-route-number { config false; description "Statistics of static routes that can be configured, including IPv4 routes and IPv6 routes."; leaf num { type uint32; description "Maximum number of IPv4 and IPv6 static routes that can be configured."; } } // container max-route-number container bfd-admindowns { description "List of BFD sessions. A static route cannot be selected if the BFD session associated with it is in the AdminDown state."; list bfd-admindown { key "address-family session-name"; description "Configure BFD session. A static route cannot be selected if the BFD session associated with it is in the AdminDown state."; leaf address-family { type af-type; description "Set an address family."; } leaf session-name { type leafref { path "/bfd:bfd/bfd:sessions/bfd:session/bfd:name"; } description "Set a BFD session."; } } // list bfd-admindown } // container bfd-admindowns } // container static-routing } // container routing rpc reset-all-route-statistics { ext:node-ref "/ni:network-instance/ni:instances/ni:instance/l3vpn:afs/l3vpn:af/rt:routing/rt:routing-manage/rt:topologys/rt:topology/rt:routes/rt:ipv4-route-statistics/rt:ipv4-route-statistic"; ext:node-ref "/ni:network-instance/ni:instances/ni:instance/l3vpn:afs/l3vpn:af/rt:routing/rt:routing-manage/rt:topologys/rt:topology/rt:routes/rt:ipv6-route-statistics/rt:ipv6-route-statistic"; description "Clear statistics about added, deleted, and released routes of each routing protocol in the IPv4 or IPv6 routing table."; input { leaf address-family { type af-type; mandatory true; description "Set an address family."; } leaf protocol-type { type statistic-protocol-type; mandatory true; description "Specify a routing protocol type."; } } } // rpc reset-all-route-statistics rpc reset-all-vpn-route-statistics { ext:node-ref "/rt:routing/rt:routing-manage/rt:ipv4-vpn-route-statisticss/rt:ipv4-vpn-route-statistics"; ext:node-ref "/rt:routing/rt:routing-manage/rt:ipv6-vpn-route-statisticss/rt:ipv6-vpn-route-statistics"; description "Clear statistics about added, deleted, and released routes of each routing protocol in the IPv4 or IPv6 routing tables of all VPN instances."; input { leaf address-family { type af-type; mandatory true; description "Set an address family."; } leaf protocol-type { type statistic-protocol-type; mandatory true; description "Specify a routing protocol type."; } } } // rpc reset-all-vpn-route-statistics rpc reset-route-statistics { ext:node-ref "/ni:network-instance/ni:instances/ni:instance/l3vpn:afs/l3vpn:af/rt:routing/rt:routing-manage/rt:topologys/rt:topology/rt:routes/rt:ipv4-route-statistics/rt:ipv4-route-statistic"; ext:node-ref "/ni:network-instance/ni:instances/ni:instance/l3vpn:afs/l3vpn:af/rt:routing/rt:routing-manage/rt:topologys/rt:topology/rt:routes/rt:ipv6-route-statistics/rt:ipv6-route-statistic"; description "Clear statistics about added, deleted, and released routes of each routing protocol in the IPv4 or IPv6 routing table."; input { leaf address-family { type af-type; mandatory true; description "Set an address family."; } leaf vpn-instance-name { type leafref { path "/ni:network-instance/ni:instances/ni:instance/ni:name"; } mandatory true; description "Name of the VPN instance."; } leaf protocol-type { type statistic-protocol-type; mandatory true; description "Specify a routing protocol type."; } } } // rpc reset-route-statistics rpc static-unicast-route-number { description "Query the number of static routes for a specified VPN instance."; input { leaf vpn-instance-name { type string { length "1..31"; } mandatory true; description "Name of the VPN to which a prefix belongs."; } leaf address-family { type af-type; mandatory true; description "Types of the VPN address families."; } leaf prefix { type inet:ip-address-no-zone; description "Destination IP address."; } leaf mask-length { type uint8 { range "0..128"; } description "Mask length of an IP address."; } } output { leaf route-number { type uint32; description "Number of static routes in the static routing table."; } } } // rpc static-unicast-route-number rpc ipv4-unicast-route-number { description "Query the number of IPv4 routes for a specified VPN instance."; input { leaf vpn-instance-name { type string { length "1..31"; } mandatory true; description "Name of the VPN to which a prefix belongs."; } choice filter-type { description "Filter routing options."; case prefix-mask { description "Filter routes by prefix."; leaf prefix { type inet:ip-address-no-zone; description "Destination IP address."; } leaf mask-length { type uint8 { range "0..32"; } description "Mask length of an IP address."; } } // case prefix-mask case protocol { description "Filter routing by protocol type."; leaf protocol-type { type protocol-type; description "Protocol type."; } } // case protocol } // choice filter-type } output { leaf route-number { type uint32; description "The number of IPv4 routes for a VPN instance."; } } } // rpc ipv4-unicast-route-number rpc ipv6-unicast-route-number { description "Query the number of IPv6 routes for a specified VPN instance."; input { leaf vpn-instance-name { type string { length "1..31"; } mandatory true; description "Name of the VPN to which a prefix belongs."; } choice filter-type { description "Filter routing type."; case prefix-mask { description "Filter routes by prefix."; leaf prefix { type inet:ip-address-no-zone; description "Destination IP address."; } leaf mask-length { type uint8 { range "0..128"; } description "Mask length of an IP address."; } } // case prefix-mask case protocol { description "Filter routing by protocol type."; leaf protocol-type { type ipv6-protocol-type; description "Protocol type."; } } // case protocol } // choice filter-type } output { leaf route-number { type uint32; description "The number of IPv6 routes for a VPN instance."; } } } // rpc ipv6-unicast-route-number } // module huawei-routing
© 2023 YumaWorks, Inc. All rights reserved.