Inter-AS routing protocol that exchanges Network Layer Reachability Information (NLRI) with other BGP systems.
Version: 2020-08-18
module huawei-bgp-link-state { yang-version 1; namespace "urn:huawei:yang:huawei-bgp-link-state"; prefix bgp-ls; import huawei-extension { prefix ext; } import huawei-network-instance { prefix ni; } import huawei-bgp { prefix bgp; } import ietf-inet-types { prefix inet; } import huawei-routing-policy { prefix rtp; } import huawei-bgp-routing-table { prefix bgp-rt; } import huawei-ifm { prefix ifm; } import huawei-pub-type { prefix pub-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 "Inter-AS routing protocol that exchanges Network Layer Reachability Information (NLRI) with other BGP systems."; revision "2020-08-18" { description "The YANG descriptions are modified according to new standards."; reference "Huawei private."; } revision "2020-02-05" { description "The modifications in the code are synchronized to the YANG file."; reference "Huawei private."; } revision "2019-03-22" { description "Initial revision."; reference "Huawei private."; } ext:task-name "bgp"; typedef ls-route-type { type enumeration { enum "node" { value 1; description "NODE."; } enum "link" { value 2; description "LINK."; } enum "ipv4-prefix-route" { value 3; description "IPv4 prefix route."; } enum "ipv6-prefix-route" { value 4; description "IPv6 prefix route."; } enum "srv6-sid-route" { value 6; description "SRv6 sid route."; } } description "The type of the bgpcommLsRoute."; } typedef protocol-type { type enumeration { enum "is-is-level-1" { value 1; description "Isis level 1 protocol."; } enum "is-is-level-2" { value 2; description "Isis level 2 protocol."; } enum "ospf" { value 3; description "OSPF."; } enum "direct" { value 4; description "Direct."; } enum "static" { value 5; description "Static."; } enum "ospfv3" { value 6; description "OSPFv3."; } enum "bgp" { value 7; description "BGP protocol."; } enum "segment-routing" { value 9; description "Segment routing."; } } description "The type of the bgpcommLsp protocol."; } grouping route-type-element { description "Route type configuration."; leaf type { type ls-route-type; description "BGP link state unicast address family route type."; } } // grouping route-type-element grouping route-key-element-type { description "Route key element type configuration."; leaf network { type string { length "1..600"; } description "Prefix of BGP-LS route."; } leaf from { type inet:ip-address-no-zone; description "Source peer that sends a route."; } leaf protocol { type protocol-type; description "IGP Protocol type."; } leaf identifier { type uint64 { range "0..4294967295"; } description "Identifier of IGP protocol."; } leaf peer-router-id { type inet:ip-address-no-zone; description "Router ID of source peer that sends a route."; } leaf nexthop { type inet:ip-address-no-zone; description "Next hop address to which packets are forwarded."; } leaf route-type { type bgp-rt:bgp-route-type-flag; description "Route Type Flag."; } leaf local-preference { type uint32; description "Local priority. The attribute is only fit for the routes from IBGP peer, not suit for which of EBGP peer."; } leaf preferred-value { type uint32; description "Preferred value of a protocol."; } leaf preference { type uint8; description "Priority of BGP routes."; } leaf originator { type inet:ip-address-no-zone; description "Router ID of the route initiator."; } leaf med { type uint32; description "Route MED.The attribute is only fit for the routes from EBGP peer, not suit for which of IBGP peer."; } leaf flag-string { type string { length "1..50"; } description "Route flag that contains a string of characters."; } leaf in-label { type uint32; description "In label."; } leaf out-label { type uint32; description "Out label."; } leaf time { type uint32; units "s"; description "Time stamp of a route."; } leaf interface-name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } description "Name of the outbound interface of a route."; } leaf relay-nexthop { type inet:ip-address-no-zone; description "Next hop to which a route is iterated."; } leaf peer-count { type uint32; description "Count of Route Sending Peers."; } leaf advertise-nexthop { type inet:ip-address-no-zone; description "Advertise nexthop."; } } // grouping route-key-element-type grouping route-attribute-string { description "Route attribute element type configuration."; leaf path-as { type string { length "1..300"; } description "List of the AS_Paths that packets pass through."; } leaf discard-attribute { type string { length "1..300"; } description "Discard the route attribute list."; } leaf sending-peers { type string { length "1..300"; } description "List of route sending peers."; } } // grouping route-attribute-string grouping worse-reason { description "Reason why a route is not selected."; leaf worse-reason { type string { length "1..50"; } description "Reason why a route is not selected."; } } // grouping worse-reason grouping worse-reason-deprecated { description "Reason why a route is not selected."; leaf worse-reason { type string { length "1..50"; } status deprecated; description "Reason why a route is not selected. The node is deprecated."; } } // grouping worse-reason-deprecated grouping ls-ip-prefix-route-type { description "Link state unicast address family IP prefix route type configuration."; uses route-type-element; uses route-key-element-type; uses route-attribute-string; leaf node-flags { type pub-type:hex-binary; description "IGP flags."; } leaf route-tag { type string { length "1..121"; } description "Route tag."; } leaf extended-route-tag { type string { length "1..121"; } description "Extended route tag."; } leaf prefix-metric { type uint32; description "Prefix metric."; } leaf ospf-forwarding-address { type inet:ip-address-no-zone; description "OSPF forwarding address."; } leaf opaque-prefix-attribute { type inet:ip-address-no-zone; description "Opaque prefix attribute."; } leaf prefix-sid { type string { length "1..256"; } description "Prefix Sid attribute information of route."; } } // grouping ls-ip-prefix-route-type grouping ls-srv6-sid-route-type { description "Link state unicast address family srv6 sid route type configuration."; uses route-type-element; uses route-key-element-type; uses route-attribute-string; leaf srv6-sid-info { type inet:ip-address-no-zone; description "SRv6SidInfo attribute Value."; } leaf srv6-endpoint-function { type string { length "1..121"; } description "SRv6EndPtFunc attribute."; } leaf mt-id { type uint32 { range "0..4095"; } description "IGP topology ID."; } leaf srv6-sid-structure { type string { length "1..79"; } description "Length of each individual part of the SRv6 SID."; } } // grouping ls-srv6-sid-route-type grouping ls-link-route-type { description "Link state unicast address family link route type configuration."; uses route-type-element; uses route-key-element-type; uses route-attribute-string; leaf ipv4-local-node-router-id { type string { length "1..256"; } description "IPv4 router id of local node."; } leaf ipv6-local-node-router-id { type string { length "1..256"; } description "IPv6 router id of local node."; } leaf ipv4-remote-node-router-id { type string { length "1..256"; } description "IPv4 router id of remote node."; } leaf ipv6-remote-node-router-id { type string { length "1..256"; } description "IPv6 router id of remote node."; } leaf administrative-group { type pub-type:hex-binary; description "Administrative group."; } leaf maximum-link-bandwidth { type uint32; units "kbit/s"; description "Maximum link bandwidth."; } leaf maximum-reservable-bandwidth { type uint32; units "kbit/s"; description "Maximum reservable bandwidth."; } leaf maximum-unreserved-bandwidth { type string { length "1..121"; } units "kbit/s"; description "Maximum unreserved bandwidth."; } leaf te-default-metric { type uint32; description "TE default metric."; } leaf link-protect-type { type uint16; description "Link protect type."; } leaf mpls-protocol-mask { type pub-type:hex-binary; description "MPLS protocol mask."; } leaf igp-metric { type uint32; description "IGP metric."; } leaf shared-risk-link-group { type string { length "1..800"; } description "Shared risk link group."; } leaf opaque-link-properties { type string { length "1..121"; } description "Opaque link properties."; } leaf link-name { type string { length "1..256"; } description "Link Name."; } leaf adj-segment-id { type string { length "1..256"; } description "Adj segment id."; } leaf lan-adj-segment-id { type string { length "1..256"; } description "LAN Adj segment id."; } leaf unreserved-bandwidth { type string { length "1..20"; } description "Unreserved Bandwidth."; } leaf bandwidth-constraint-model { type string { length "1..20"; } description "Bandwidth Constraint Model."; } leaf bandwidth-constraint { type string { length "1..20"; } description "Bandwidth Constraint."; } leaf local-overbooking-multiplier { type string { length "1..10"; } description "Local Overbooking Multiplier."; } leaf bandwidth-constraint-model-standard { type string { length "1..20"; } description "Bandwidth Constraint Model (Standard)."; } leaf bandwidth-constraint-standard { type string { length "1..20"; } description "Bandwidth Constraint (Standard)."; } leaf sid-label { type uint32; description "Peer Node or Adj label."; } leaf peer-set-sid-label { type uint32; description "Peer set sid label."; } leaf min-delay { type uint32 { range "0..16777215"; } units "us"; description "Min Delay time."; } leaf max-delay { type uint32 { range "0..16777215"; } units "us"; description "Max Delay time."; } leaf mt-id { type uint32 { range "0..4095"; } description "IGP topology ID."; } leaf srv6-endx-sid { type string { length "1..121"; } description "END.X SID of an SRv6 route on a P2P network."; } leaf srv6-lan-endx-sid { type string { length "1..300"; } description "END.X SID of an SRv6 route on a LAN network."; } leaf link-local-id { type uint32 { range "0..4294967295"; } description "Local ID of an LS link route."; } leaf link-remote-id { type uint32 { range "0..4294967295"; } description "Remote ID of an LS link route."; } } // grouping ls-link-route-type grouping ls-node-route-type { description "LS-node-route-type configuration."; uses route-type-element; uses route-key-element-type; uses route-attribute-string; leaf opaque-node-properties { type string { length "1..121"; } description "Opaque node properties."; } leaf mt-id-list { type string { length "1..121"; } description "MT ID."; } leaf node-name { type string { length "1..256"; } description "Name of IGP topology node."; } leaf isis-area-id { type string { length "1..121"; } description "ISIS area ID."; } leaf sid-label-binding { type string { length "1..121"; } description "SID/Label Binding."; } leaf sr-capabilities { type string { length "1..121"; } description "Segment routing capabilities."; } leaf sr-algorithm { type string { length "1..121"; } description "Segment routing algorithm."; } leaf node-flags { type pub-type:hex-binary; description "Node flags."; } leaf ipv4-local-node-router-id { type string { length "1..256"; } description "IPv4 router id of local node."; } leaf ipv6-local-node-router-id { type string { length "1..256"; } description "IPv6 router id of local node."; } leaf sr-local-block { type string { length "1..121"; } description "Segment routing local block."; } leaf msd-type-value { type string { length "1..180"; } description "MSD type and value string."; } leaf srv6-capabilities { type string { length "1..121"; } description "Segment routing IPv6 capabilities."; } } // grouping ls-node-route-type grouping ls-route-st-type { description "Link-state route statistics information."; leaf node-route-number { type uint32; description "Total number of Node routes."; } leaf link-route-number { type uint32; description "Total number of Link routes."; } leaf ipv4-prefix-route-number { type uint32; description "Total number of IPv4 prefix routes."; } leaf ipv6-prefix-route-number { type uint32; description "Total number of IPv6 prefix routes."; } leaf te-policy-route-number { type uint32; description "Total number of TE policy routes."; } leaf srv6-sid-route-number { type uint32; description "Total number of SRv6-Sid routes."; } } // grouping ls-route-st-type grouping te-policy-route { description "BGP te policy route."; uses route-key-element-type; leaf bsid-flag { type uint16; description "BSID flag."; } leaf bsid-sid { type string { length "1..40"; } description "BSID SID."; } leaf bsid-prov-sid { type string { length "1..40"; } description "BSID Prov SID."; } leaf candidate-path-priority { type uint8; description "Candidate path priority."; } leaf candidate-path-flag { type uint16; description "Candidate path flags."; } leaf candidate-path-preference { type uint32; description "Candidate path preference."; } leaf segment-list-count { type uint32; description "Segment list count."; } } // grouping te-policy-route augment /ni:network-instance/ni:instances/ni:instance/bgp:bgp/bgp:base-process/bgp:afs/bgp:af { description "BGP link-state address family configuration."; container link-state-unicast { when "../bgp:type='ls'"; description "Configure link state unicast address family options."; container common { description "Configure link state unicast address family common options."; leaf reflect-between-client { type boolean; default "true"; description "Enable/disable route reflection between clients. If clients of a route reflector (RR) are fully meshed, you can disable route reflection among clients to reduce the cost."; } leaf domain-as { type bgp:as-number-validate; description "Domain AS."; } leaf domain-identifier { type inet:ipv4-address-no-zone; description "Domain ID."; } uses bgp:reflector-cluster-type; } // container common uses bgp:slow-peer-type; } // container link-state-unicast } augment /ni:network-instance/ni:instances/ni:instance/bgp:bgp/bgp:base-process/bgp:peers/bgp:peer/bgp:afs/bgp:af { description "BGP link state unicast address family configuration."; container link-state-unicast { when "../bgp:type='ls'"; description "Configure link state unicast address family options."; leaf group-name { ext:operation-exclude "update" { description "The node cannot be modified, when the peer already belongs to a peer-group."; } type leafref { path "../../../../../../bgp:peer-groups/bgp:peer-group/bgp:name"; } must "../../../../../../bgp:peer-groups/bgp:peer-group[bgp:name = current()]/bgp:afs/bgp:af[bgp:type='ls']"; description "Configure a name for a peer group. After a peer is deleted from the peer group, the peer is disabled from the address family. The object cannot be modified."; } leaf reflect-client { type boolean; default "false"; description "Enable/disable the local device as a route reflector (RR) and a peer or peer group as its client. This configuration is applicable between IBGP peers only. The configurations of RRs and its clients in an address family are valid only in this address family. Therefore, it is recommended to configure RRs and its clients in the specified address family that is required."; } leaf route-update-interval { ext:dynamic-default; type uint16 { range "0..600"; } units "s"; description "Specify the minimum interval at which Update packets are sent. By default, the interval at which Update packets are sent to IBGP peers is 15s, and the interval at which Update packets are sent to EBGP peers is 30s. When routes change, a router will send Update packets to notify its peers. If a route changes frequently, you can set an interval at which Update packets are sent to prevent the router from sending Update packets each time the route changes. This configuration is valid only to the routes learned from peers."; } leaf allow-as-loop { type uint32 { range "1..10"; } description "Allow repetitive local AS numbers. By default, repetitive local AS numbers are not allowed."; } uses bgp:peer-independent-peer-group-type; choice import-policy-type { description "Set route policy."; case rtp-ref { description "Route policy."; leaf import-policy { type leafref { path "/rtp:routing-policy/rtp:policy-definitions/rtp:policy-definition/rtp:name"; } description "Specify the filtering policy applied to the routes learned from a peer. By default, no such policy is specified."; } } // case rtp-ref } // choice import-policy-type choice export-policy-type { description "Set route policy."; case rtp-ref { description "Route policy."; leaf export-policy { type leafref { path "/rtp:routing-policy/rtp:policy-definitions/rtp:policy-definition/rtp:name"; } description "Specify the filtering policy applied to the routes to be advertised to a peer. By default, no such policy is specified."; } } // case rtp-ref } // choice export-policy-type uses bgp:route-limit-type; uses bgp:path-attr-map-type; } // container link-state-unicast } augment /ni:network-instance/ni:instances/ni:instance/bgp:bgp/bgp:base-process/bgp:peer-groups/bgp:peer-group/bgp:afs/bgp:af { description "BGP link state unicast address family configuration."; container link-state-unicast { when "../bgp:type='ls'"; description "Configure link state unicast address family options."; leaf reflect-client { when "../../../../bgp:type='ibgp'"; type boolean; default "false"; description "Enable/disable the local device as a route reflector (RR) and a peer or peer group as its client. This configuration is applicable between IBGP peers only. The configurations of RRs and its clients in an address family are valid only in this address family. Therefore, it is recommended to configure RRs and its clients in the specified address family that is required."; } choice import-policy-type { description "Set route policy."; case rtp-ref { description "Route policy."; leaf import-policy { type leafref { path "/rtp:routing-policy/rtp:policy-definitions/rtp:policy-definition/rtp:name"; } description "Specify the filtering policy applied to the routes learned from a peer. By default, no such policy is specified."; } } // case rtp-ref } // choice import-policy-type choice export-policy-type { description "Set route policy."; case rtp-ref { description "Route policy."; leaf export-policy { type leafref { path "/rtp:routing-policy/rtp:policy-definitions/rtp:policy-definition/rtp:name"; } description "Specify the filtering policy applied to the routes to be advertised to a peer. By default, no such policy is specified."; } } // case rtp-ref } // choice export-policy-type uses bgp:rt-update-interval-type; uses bgp:group-independent-peer-group-type; uses bgp:route-limit-type; } // container link-state-unicast } augment /bgp:bgp/bgp:base-process/bgp-rt:bgp-route { description "BGP link state unicast address family routing-table."; container link-state-unicast { config false; description "Statistics of link-state-unicast routes."; container prefix-routes { config false; description "List of displayed prefix route information in an address family."; list prefix-route { key "vpn-name type network from"; description "Statistics of prefix routes."; uses bgp-rt:routing-table-vpn-name; uses ls-ip-prefix-route-type; uses worse-reason; } // list prefix-route } // container prefix-routes container link-routes { config false; description "List of displayed link route information in an address family."; list link-route { key "vpn-name type network from"; description "Statistics of link routes."; uses bgp-rt:routing-table-vpn-name; uses ls-link-route-type; uses worse-reason; } // list link-route } // container link-routes container node-routes { config false; description "List of displayed node route information in an address family."; list node-route { key "vpn-name type network from"; description "Statistics of node routes."; uses bgp-rt:routing-table-vpn-name; uses ls-node-route-type; uses worse-reason; } // list node-route } // container node-routes container srv6sid-routes { config false; description "List of displayed srv6sid route information in an address family."; list srv6sid-route { key "vpn-name type network from"; description "Statistics of srv6sid routes."; uses bgp-rt:routing-table-vpn-name; uses ls-srv6-sid-route-type; uses worse-reason; } // list srv6sid-route } // container srv6sid-routes container peer-advertise-srv6sid-routes { config false; description "List of displayed advertised SRv6-SID route information in an address family."; list peer-advertise-srv6sid-route { key "vpn-name remote-peer-address type network from"; description "Statistics of advertised SRv6-SID routes."; uses bgp-rt:routing-table-vpn-name; leaf remote-peer-address { type inet:ip-address-no-zone; description "BGP neighbour address."; } uses ls-srv6-sid-route-type; uses worse-reason-deprecated; } // list peer-advertise-srv6sid-route } // container peer-advertise-srv6sid-routes container peer-receive-srv6sid-routes { config false; description "List of displayed received SRv6-SID route information in an address family."; list peer-receive-srv6sid-route { key "vpn-name remote-peer-address type network from"; description "Statistics of received SRv6-SID routes."; uses bgp-rt:routing-table-vpn-name; leaf remote-peer-address { type inet:ip-address-no-zone; description "BGP neighbor address."; } uses ls-srv6-sid-route-type; uses worse-reason; } // list peer-receive-srv6sid-route } // container peer-receive-srv6sid-routes container peer-advertise-link-routes { config false; description "List of displayed advertised link route information in an address family."; list peer-advertise-link-route { key "vpn-name remote-peer-address type network from"; description "Statistics of advertised link routes."; uses bgp-rt:routing-table-vpn-name; leaf remote-peer-address { type inet:ip-address-no-zone; description "BGP neighbor address."; } uses ls-link-route-type; uses worse-reason-deprecated; } // list peer-advertise-link-route } // container peer-advertise-link-routes container peer-receive-link-routes { config false; description "List of displayed received link route information in an address family."; list peer-receive-link-route { key "vpn-name remote-peer-address type network from"; description "Statistics of received link routes."; uses bgp-rt:routing-table-vpn-name; leaf remote-peer-address { type inet:ip-address-no-zone; description "BGP neighbor address."; } uses ls-link-route-type; uses worse-reason; } // list peer-receive-link-route } // container peer-receive-link-routes container te-policy-routes { config false; description "List of displayed the BGP te policy routes information."; list te-policy-route { key "vpn-name network from protocol identifier peer-router-id"; description "Statistics of BGP te policy routes."; uses bgp-rt:routing-table-vpn-name; uses te-policy-route; uses worse-reason; } // list te-policy-route } // container te-policy-routes container statistic { description "Statistics of BGP routes information of link-state unicast address family."; uses bgp-rt:route-total-st-type; uses ls-route-st-type; } // container statistic } // container link-state-unicast } } // module huawei-bgp-link-state
© 2023 YumaWorks, Inc. All rights reserved.