Table 4. Feature History Table
Feature Name
|
Release Information
|
Feature Description
|
BGP Best Path Computation using SR Policy Paths
|
Release 7.5.2
Release 7.3.4
|
BGP best-path selection is modified for a prefix when at least one of its paths resolves over the next hop using SR policies
(SR policy in “up” state). Under this condition, paths not steered over an SR policy (those using native next-hop resolution)
are considered ineligible during best-path selection.
You can thus control the best path selection in order to steer traffic, preferably or exclusively, over SR policies with the
desired SLA.
This feature introduces the bgp bestpath sr-policy {force | prefer} command.
|
BGP selects the best path from the available pool of paths such as iBGP, eBGP, color, or noncolor paths with native next hop
and SR policy next hop. BGP uses either native next hop or an SR policy next hop for best path computation. However, BGP might
not consider SR policy next hop for best path computation due to other factors in best path selection. By default, BGP considers
a native next hop for the best path computation during the failure.
For more information, see Best path calculation algorithm.
When multiple advertisements of the same BGP prefix are received where some have extended community color, SRTE headend with
BGP multi-path enabled installs multiple routes with or without extended community color. It may be required to exclude the
path resolving over native next hop SR policy paths from BGP best path selection when a prefix has multiple paths in the presence
of one BGP path with the extended community color that is resolved over the SR policy.
You may want to use the egress PE to exit a domain using local preference or other attributes before the next hop metric selection.
In such scenarios, when SR policy of the primary path fails, the best path is resolved over a regular IGP next hop that is
the default mode of operation. Traffic doesn't select the backup path with SR policy, instead traffic moves to native LSP
on the primary path.
The BGP Best Path Computation using SR Policy Paths feature allows the BGP to use the path with SR policy as the best-path,
backup, and multipath.
When this feature is enabled, some paths are marked as an ineligible path for BGP best path selection. Existing BGP best path
selection order is applied to the eligible paths.
Use either of the following modes for the BGP to select the SR policy path as the best path for the backup path:
-
Force mode: When force mode is enabled, only SR policy paths are considered for best path calculation. Use the bgp bestpath sr-policy force command to enable this mode.
In a network, when at least one path has an active SR policy, the following paths are marked as ineligible for best path selection:
-
Prefer mode: When prefer mode is enabled, SR policy paths and eBGP noncolor paths are eligible for best path calculation.
Use the bgp bestpath sr-policy prefer command to enable this mode.
In a network, when at least one path has an active SR policy, the following paths are marked as ineligible for best path selection:
Configure BGP Best Path Computation using SR Policy Paths
To enable the feature, perform the following tasks on the ingress PE router that is the head-end of SR policy:
Configuration Example
Configure route policies on the egress PE router:
Router(config)#extcommunity-set opaque color9001
Router(config-ext)#9001 co-flag 01
Router(config-ext)#end-set
Router(config)#extcommunity-set opaque color9002
Router(config-ext)#9002 co-flag 01
Router(config-ext)#end-set
Router(config)#commitC
Router(config)#route-policy for9001
Router(config-rpl)#set extcommunity color color9001
Router(config-rpl)# pass
Router(config-rpl)#end-policy
Router(config)#route-policy for9002
Router(config-rpl)#set extcommunity color color9002
Router(config-rpl)#pass
Router(config-rpl)#end-policy
Router(config)#commit
Router#configure
Router(config)#route-policy add_path
Router(config-rpl)#set path-selection backup 1 install multipath-protect advertise multipath-protect-advertise
Router(config-rpl)#end-policy
Router(config)#route-policy pass-all
Router(config-rpl)#pass
Router(config-rpl)#end-policy
Router(config)#commit
Configure SR policy on the egress PE router:
Router#configure
Router(config)#segment-routing
Router(config-sr)#traffic-eng
Router(config-sr-te)#segment-list SL201
Router(config-sr-te-sl)#index 1 mpls label 25000
Router(config-sr-te-sl)#policy POLICY_9001
Router(config-sr-te-policy)#binding-sid mpls 47700
Router(config-sr-te-policy)#color 9001 end-point ipv6 ::
Router(config-sr-te-policy)#candidate-paths
Router(config-sr-te-policy-path)#preference 10
Router(config-sr-te-policy-path-pref)#explicit segment-list SL201
Router(config-sr-te-sl)#policy POLICY_9002
Router(config-sr-te-policy)#binding-sid mpls 47701
Router(config-sr-te-policy)#color 9002 end-point ipv6 ::
Router(config-sr-te-policy)#candidate-paths
Router(config-sr-te-policy-path)#preference 10
Router(config-sr-te-policy-path-pref)#explicit segment-list SL201
Router(config-sr-te-policy-path-pref)#commit
Configure BGP on the Egress PE router:Router(config)#router bgp 100
Router(config-bgp)#nsr
Router(config-bgp)#bgp router-id 10.1.1.2
Router(config-bgp)#bgp best-path sr-policy force
Router(config-bgp)#address-family ipv6 unicast
Router(config-bgp-af)#maximum-paths eibgp 25
Router(config-bgp-af)#additional-paths receive
Router(config-bgp-af)#additional-paths send
Router(config-bgp-af)#additional-paths selection route-policy add_path
Router(config-bgp-af)#redistribute connected
Router(config-bgp-af)#redistribute static
Router(config-bgp-af)#allocate-label all
Router(config-bgp-af)#commit
Router(config-bgp-af)#exit
Router(config-bgp)#neighbor 31::2
Router(config-bgp-nbr)#remote-as 2
Router(config-bgp-nbr)#address-family ipv6 unicast
Router(config-bgp-nbr-af)#route-policy for9001 in
Router(config-bgp-nbr-af)#route-policy pass-all out
Router(config-bgp-nbr-af)#commit
Router(config-bgp-nbr-af)#exit
Router(config-bgp)#neighbor 32::2
Router(config-bgp-nbr)#remote-as 2
Router(config-bgp-nbr)#address-family ipv6 unicast
Router(config-bgp-nbr-af)#route-policy for9002 in
Router(config-bgp-nbr-af)#route-policy pass-all out
Router(config-bgp-nbr-af)#commit
Verification
The following show output shows that when the force option is enabled, the configured SR policy path is selected as the best path instead of the default best path.
Router#show bgp ipv6 unicast 2001:DB8::1 brief
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 2001:DB8::1 10:1:1::55 100 0 2 i
* i 10:1:1::55 100 0 2 i
* 30::2 0 2 I
*> 31::2 C:9001 0 2 I
* 32::2 C:9002 0 2 I
Router#
Use the following command to compare the best paths:
Router#show bgp ipv6 unicast 2001:DB8::1 bestpath-compare
BGP routing table entry for 2001:DB8::1
Versions:
Process bRIB/RIB SendTblVer
Speaker 7641 7641
Flags: 0x240232b2+0x20050000; multipath; backup available;
Last Modified: Dec 7 03:43:57.200 for 00:34:48
Paths: (24 available, best #4)
Advertised IPv6 Unicast paths to update-groups (with more than one peer):
0.3 0.4
Advertised IPv6 Unicast paths to peers (in unique update groups):
10.1.1.55
Path #1: Received by speaker 0
Flags: 0x2000000000020005, import: 0x20
Flags2: 0x00
Not advertised to any peer
2
10:1:1::55 (metric 30) from 10.1.1.55 (10.1.1.55), if-handle 0x00000000
Origin IGP, localpref 100, valid, internal
Received Path ID 1, Local Path ID 0, version 0
Extended community: Color[CO-Flag]:8001[01]
Non SR-policy path is ignored due to config knob
Path #2: Received by speaker 0
Flags: 0x2000000000020005, import: 0x20
Flags2: 0x00
Not advertised to any peer
2
10:1:1::55 (metric 30) from 10.1.1.55 (10.1.1.55), if-handle 0x00000000
Origin IGP, localpref 100, valid, internal
Received Path ID 3, Local Path ID 0, version 0
Extended community: Color[CO-Flag]:8002[01]
Non SR-policy path is ignored due to config knob
Path #3: Received by speaker 0
Flags: 0x3000000000060001, import: 0x20
Flags2: 0x00
Advertised IPv6 Unicast paths to update-groups (with more than one peer):
0.4
Advertised IPv6 Unicast paths to peers (in unique update groups):
10.1.1.55
2
30::2 from 30::2 (198.51.100.1), if-handle 0x00000000
Origin IGP, localpref 100, weight 65534, valid, external, backup, add-path
Received Path ID 0, Local Path ID 2, version 7641
Origin-AS validity: (disabled)
Non SR-policy path is ignored due to config knob
Path #4: Received by speaker 0
Flags: 0xb000000001070001, import: 0x20
Flags2: 0x00
Advertised IPv6 Unicast paths to update-groups (with more than one peer):
0.3 0.4
Advertised IPv6 Unicast paths to peers (in unique update groups):
10.1.1.55
2
31::2 C:9001 (bsid:48900) from 31::2 (198.51.100.2), if-handle 0x00000000
Origin IGP, localpref 100, valid, external, best, group-best, multipath
Received Path ID 0, Local Path ID 1, version 7641
Extended community: Color[CO-Flag]:9001[01]
Origin-AS validity: (disabled)
SR policy color 9001, ipv6 null endpoint, up, not-registered, bsid 48900
best of AS 2, Overall best
Path #5: Received by speaker 0
Flags: 0xb000000000030001, import: 0x20
Flags2: 0x00
Not advertised to any peer
2
32::2 C:9002 (bsid:48901) from 32::2 (198.51.100.3), if-handle 0x00000000
Origin IGP, localpref 100, valid, external, multipath
Received Path ID 0, Local Path ID 0, version 0
Extended community: Color[CO-Flag]:9002[01]
Origin-AS validity: (disabled)
SR policy color 9002, up, not-registered, bsid 48901
Higher router ID than best path (path #4)
Use the show bgp process command to verify which mode is enabled.
In the following example, you see that the force mode is enabled.
Router#show bgp process
BGP Process Information:
BGP is operating in STANDALONE mode
Autonomous System number format: ASPLAIN
Autonomous System: 100
Router ID: 10.1.1.2 (manually configured)
Default Cluster ID: 10.1.1.2
Active Cluster IDs: 10.1.1.2
Fast external fallover enabled
Platform Loadbalance paths max: 64
Platform RLIMIT max: 8589934592 bytes
Maximum limit for BMP buffer size: 1638 MB
Default value for BMP buffer size: 1228 MB
Current limit for BMP buffer size: 1228 MB
Current utilization of BMP buffer limit: 0 B
Neighbor logging is enabled
Enforce first AS enabled
Use SR-Policy admin/metric of color-extcomm Nexthop during path comparison: disabled
SR policy path force is enabled
Default local preference: 100
Default keepalive: 60
Non-stop routing is enabled
Slow peer detection enabled
ExtComm Color Nexthop validation: RIB
Update delay: 120
Generic scan interval: 60
Configured Segment-routing Local Block: [0, 0]
In use Segment-routing Local Block: [15000, 15999]
Platform support mix of sr-policy and native nexthop: Yes
Address family: IPv4 Unicast
Dampening is not enabled
Client reflection is enabled in global config
Dynamic MED is Disabled
Dynamic MED interval : 10 minutes
Dynamic MED Timer : Not Running
Dynamic MED Periodic Timer : Not Running
Scan interval: 60
Total prefixes scanned: 33
Prefixes scanned per segment: 100000
Number of scan segments: 1
Nexthop resolution minimum prefix-length: 0 (not configured)
IPv6 Nexthop resolution minimum prefix-length: 0 (not configured)
Main Table Version: 12642
Table version synced to RIB: 12642
Table version acked by RIB: 12642
IGP notification: IGPs notified
RIB has converged: version 2
RIB table prefix-limit reached ? [No], version 0
Permanent Network Unconfigured
Node Process Nbrs Estb Rst Upd-Rcvd Upd-Sent Nfn-Rcv Nfn-Snt
node0_RSP1_CPU0 Speaker 53 3 2 316 823 0 53