253
[SwitchC-route-policy] apply local-preference 200
[SwitchC-route-policy] quit
# Apply routing policy localpref to routes from peer 193.1.1.1.
[SwitchC] bgp 200
[SwitchC-bgp] peer 193.1.1.1 route-policy localpref import
[SwitchC-bgp] quit
# Display the routing table on Switch D.
[SwitchD] display bgp routing-table
Total Number of Routes: 2
BGP Local router ID is 194.1.1.1
Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 1.0.0.0 193.1.1.1 0 200 0 100i
* i 192.1.1.1 0 100 0 100i
Route 1.0.0.0/8 from Switch D to Switch C is the optimal.
BGP GR configuration
Network requirements
All switches run BGP in
. Between Switch A and Switch B is an eBGP connection. Switch B and
Switch C are connected over an iBGP connection. Enable GR capability for BGP so that the
communication between Switch A and Switch C is not affected when a master/slave switchover occurs
on Switch B.
Figure 97
Network diagram
Configuration procedure
1.
Configure Switch A.
# Configure IP addresses for interfaces. (Details not shown)
# Configure the eBGP connection.
<SwitchA> system-view
[SwitchA] bgp 65008
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 200.1.1.1 as-number 65009