Inter-AS routing protocol that exchanges Network Layer Reachability Information (NLRI) with other BGP systems.
Version: 2021-08-28
module huawei-bgp-srpolicy { yang-version 1; namespace "urn:huawei:yang:huawei-bgp-srpolicy"; prefix bgp-srpolicy; import huawei-extension { prefix ext; } import huawei-network-instance { prefix ni; } import huawei-bgp { prefix bgp; } import huawei-xpl { prefix xpl; } import huawei-routing-policy { prefix rtp; } import huawei-bgp-routing-table { prefix bgp-rt; } import ietf-inet-types { prefix inet; } import huawei-ifm { prefix ifm; } 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 "2021-08-28" { description "The YANG descriptions are modified according to new standards."; reference "Huawei private."; } revision "2019-03-22" { description "Initial revision."; reference "Huawei private."; } ext:task-name "bgp"; grouping ipv4-srpolicy-route-type { description "IPv4-srpolicy route type."; leaf prefix { type string { length "1..300"; } description "SR-policy route prefix."; } leaf from { type inet:ip-address-no-zone; description "Source peer that sends a route."; } leaf local-priority { type uint32; description "Local priority."; } leaf preferred-value { type uint32; description "Preferred value of a protocol."; } leaf preference { type uint8; description "Preference of a route."; } leaf origin { type bgp-rt:bgp-origin-type; description "Origin of a route."; } leaf med { type uint32; description "Route MED in the attribute node."; } leaf flag-string { type string { length "1..100"; } description "Route flag that contains a string of characters."; } leaf time { type uint32; units "s"; description "Time stamp of a route."; } leaf originator { type inet:ip-address-no-zone; description "Router ID of the route initiator."; } leaf remote-router-id { type inet:ipv4-address-no-zone; description "Router ID of a peer."; } 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."; } } // grouping ipv4-srpolicy-route-type 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 routing-table-vpn-name { description "BGP routing-table attributes."; leaf vpn-name { type leafref { path "/ni:network-instance/ni:instances/ni:instance/ni:name"; } description "VPN name of a BGP instance."; } } // grouping routing-table-vpn-name augment /ni:network-instance/ni:instances/ni:instance/bgp:bgp/bgp:base-process/bgp:afs/bgp:af { description "BGP IPv4-srpolicy address family configuration."; container ipv4-srpolicy { when "../bgp:type='ipv4srpolicy'"; description "Configure IPv4-family srpolicy options."; container common { description "Configure IPv4-family srpolicy common options."; leaf routerid-neglect { type boolean; default "false"; description "Enable/disable BGP to ignore router IDs when selecting the optimal route. Comparing router IDs is the last resort in route selection. This means that if one optimal route must be selected and no other parameters can be used to break the tie, router IDs can be used. If this option is selected, the first received route will be selected as the optimal route, and BGP will ignore the router ID and peer address in route selection."; } leaf reflect-change-path { type boolean; default "false"; description "Enable/disable an RR to use an export policy to change route AS_Path."; } 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."; } uses bgp:reflector-cluster-type; leaf router-id-filter { type boolean; default "true"; description "Enable/disable router ID filtering."; } leaf default-local-preference { type uint32 { range "0..4294967295"; } default "100"; description "The local preference of BGP routes."; } leaf bestroute-as-path-ignore { type boolean; default "false"; description "Enable/disable BGP to ignore the AS_Path attribute when selecting the optimal route. By default, BGP uses the AS_Path attribute as one of route selection rules, and a route with a shorter AS_Path is preferred. After bestroute-as-path-ignore is selected, BGP does not compare the AS_Path length."; } leaf nexthop-select-depend-type { type bgp:select-depend-ip-type; default "depend-ip"; description "Specify the route iteration mode: IP or tunnel. In tunnel mode, the labeled BGP IPv4 route can participate in route selection only after its next hop is iterated to an LSP. In IP mode, the labeled BGP IPv4 route can participate in route selection only after its next hop is iterated to an IP address. By default, the labeled BGP IPv4 route can participate in route selection if its next hop can be iterated to an IP address, regardless of whether the LSP of the next hop exists. This allows the RR that is not enabled with MPLS to forward labeled routes. In non-RR networking or RR networking where the BGP next hop is changed, BGP needs to check whether there is an LSP destined for the next hop. If such an LSP is not found, BGP needs to establish an LSP in advance. If the default setting is adopted, a labeled BGP IPv4 unicast route may be selected prior to LSP establishment. As a result, services are incorrectly switched before LSP establishment and service stability is affected. Therefore, allow route selection only after the labeled BGP IPv4 route is iterated to an LSP."; } leaf advertise-ebgp { type boolean; default "false"; description "Enable/disable advertise to EBGP peer."; } } // container common } // container ipv4-srpolicy } augment /ni:network-instance/ni:instances/ni:instance/bgp:bgp/bgp:base-process/bgp:peers/bgp:peer/bgp:afs/bgp:af { description "BGP peer IPv4-srpolicy address family configuration."; container ipv4-srpolicy { when "../bgp:type='ipv4srpolicy'"; description "Configure IPv4-family srpolicy options."; 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 advertise-ext-community { type boolean; default "false"; description "Enable/disable advertise the extended community attribute to a peer or peer group."; } leaf allow-as-loop { type uint32 { range "1..10"; } description "Allow repetitive local AS numbers. By default, repetitive local AS numbers are not allowed."; } leaf advertise-community { type boolean; default "false"; description "Enable/disable advertise the community attribute to a peer or a peer group."; } leaf graceful-restart-static-timer { type uint32 { range "3600..2147483647"; } units "s"; description "Specifies the maximum time during which a peer waits for a BGP session reestablishment."; } choice import-policy-type { description "Set route policy or filter."; 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 case xpl-ref { description "Route filter."; container import-filter { description "Configure an import route-filter to filter the routes received from peers. By default, no route-filter is specified to filter the routes imported from peers."; leaf name { type leafref { path "/xpl:xpl/xpl:route-filters/xpl:route-filter/xpl:name"; } description "Specify an import route-filter name."; } leaf parameter { when "../name"; type xpl:filter-parameter-type; description "Specify an import route-filter parameter."; } } // container import-filter } // case xpl-ref } // choice import-policy-type choice export-policy-type { description "Set route policy or filter."; 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 case xpl-ref { description "Route filter."; container export-filter { description "Configure an export route-filter to filter the routes to be advertised to peers. By default, no route-filter is specified to filter the routes to be advertised to peers."; leaf name { type leafref { path "/xpl:xpl/xpl:route-filters/xpl:route-filter/xpl:name"; } description "Specify an export route-filter name."; } leaf parameter { when "../name"; type xpl:filter-parameter-type; description "Specify an export route-filter parameter."; } } // container export-filter } // case xpl-ref } // choice export-policy-type leaf advertise-large-community { type bgp:peer-enable-config-type; default "default"; description "Enable large-community attribute advertisement. The Link-state address family and the RPD address family do not support this element."; } uses bgp:as-path-filter-type; uses bgp:rt-update-interval-type; uses bgp:route-limit-type; uses bgp:path-attr-map-type; } // container ipv4-srpolicy } augment /bgp:bgp/bgp:base-process/bgp-rt:bgp-route { description "BGP IPv4-srpolicy address family routes information."; container ipv4-srpolicy { config false; description "Statistics of IPv4-srpolicy routes."; container routes { config false; description "List of IPv4-srpolicy routing tables."; list route { key "vpn-name prefix from"; description "Statistics of IPv4-srpolicy routing table."; uses routing-table-vpn-name; uses ipv4-srpolicy-route-type; uses worse-reason; } // list route } // container routes container statistic { description "Statistics of BGP routes information of sr-policy address family."; uses bgp-rt:route-total-st-type; } // container statistic } // container ipv4-srpolicy } } // module huawei-bgp-srpolicy
© 2023 YumaWorks, Inc. All rights reserved.