Cisco Systems IOS XR Laptop User Manual


 
Implementing Routing Policy on Cisco IOS XR Software
Information About Implementing Routing Policy
RC-228
Cisco IOS XR Routing Configuration Guide
Show bgp
The show bgp attach point allows the user to display selected BGP routes that pass the given policy. Any
routes that are not dropped by the attached policy are displayed in a manner similar to the output of the
show ip bgp command.
In the following example, the show bgp route-policy command is used to display any BGP routes
carrying a MED of 5:
route-policy sample-display
if med eq 5 then
pass
endif
end-policy
!
show bgp route-policy sample-display
A show bgp policy route-policy command also exists, which runs all routes in the RIB past the named
policy as if the RIB were an outbound BGP policy. This command then displays what each route looked
like before it was modified and after it was modified, as shown in the following example:
RP/0/RP0/CPU0:router# show rpl route-policy test2
route-policy test2
if (destination in (10.0.0.0/8 ge 8 le 32)) then
set med 333
endif
end-policy
!
RP/0/RP0/CPU0:router# show bgp
BGP router identifier 10.0.0.1, local AS number 2
BGP main routing table version 11
BGP scan interval 60 secs
Status codes:s suppressed, d damped, h history, * valid, > best
i - internal, S stale
Origin codes:i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0 10.0.1.2 10 0 3 ?
*> 10.0.0.0/9 10.0.1.2 10 0 3 ?
*> 10.0.0.0/10 10.0.1.2 10 0 3 ?
*> 10.0.0.0/11 10.0.1.2 10 0 3 ?
*> 10.1.0.0/16 10.0.1.2 10 0 3 ?
*> 10.3.30.0/24 10.0.1.2 10 0 3 ?
*> 10.3.30.128/25 10.0.1.2 10 0 3 ?
*> 10.128.0.0/9 10.0.1.2 10 0 3 ?
*> 10.255.0.0/24 10.0.101.2 1000 555 0 100 e
*> 10.255.64.0/24 10.0.101.2 1000 555 0 100 e
....