*>e 1.0.0.0/24 195.1.1.2 100 0 100i
18.
You can ensure that route 1.0.0.0/8 is the optimal route. Configure different local preferences on Switch B
and C for route 1.0.0.0/ 8, making Switch D give priority to the route from Switch C.
19.
# Define an ip prefix-list on Router C, permitting route 1.0.0.0/8.
switch(config)# ip prefix-list pl_1 permit 1.0.0.0/8
20.
# Configure a routing policy named
localpref
on Switch C, setting the local preference of route 1.0.0.0/8 to
200 (the default is 100.)
switch(config)# route-map localpref permit seq 10
switch(route-policy)# match ip address prefix-list pl_1
switch(route-policy)# set local-preference 200
switch(route-policy)# route-map localpref permit seq 20
21.
# Apply routing policy
localpref
to routes from peer 193.1.1.1.
switch(config)# router bgp 200
switch(bgp)# neighbor 193.1.1.1 route-map localpref in
switch(bgp)# exit
22.
# Display the routing table on Switch D.
switch(config)# show ip bgp
Local AS : 100
Local Router-id : 194.1.1.1
BGP Table Version : 1
Status codes: * - valid, > - best, i - internal, e - external, s - stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Nexthop Metric LocalPref Weight AsPath
-------------------------------------------------------
*>e 1.0.0.0/24 200.1.3.1 200 0 100i
* i 1.0.0.0/24 100 0 100i
23.
You can see that route 1.0.0.0/8 from Switch D to Switch C is the optimal route.
BGP GR configuration
Network requirements
In the following figure, all switches are BGP switches. There is a eBGP connection between Switch A and Switch
B. Switch B and Switch C are connected over an iBGP connection. Enable GR for BGP so that the
Chapter 17 Border Gateway Protocol (BGP)
399