BGP route reflector configuration example
Network requirements
In Figure 64, all switches run BGP.
Between Switch A and Switch B is an EBGP connection, between Switch C and Switch B, and between Switch C and Switch D are IBGP connections.
Switch C is a route reflector with clients Switch B and D.
Switch D can learn route 20.0.0.0/8 from Switch C.
Figure 64: Network diagram
Configuration procedure
Configure IP addresses for interfaces. (Details not shown.)
Configure BGP connections:
# Configure Switch A.
<SwitchA> system-view [SwitchA] bgp 100 [SwitchA-bgp] router-id 1.1.1.1 [SwitchA-bgp] peer 192.1.1.2 as-number 200 [SwitchA-bgp] address-family ipv4 unicast [SwitchA-bgp-ipv4] peer 192.1.1.2 enable
# Inject network 20.0.0.0/8 to the BGP routing table.
[SwitchA-bgp-ipv4] network 20.0.0.0 [SwitchA-bgp-ipv4] quit [SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view [SwitchB] bgp 200 [SwitchB-bgp] router-id 2.2.2.2 [SwitchB-bgp] peer 192.1.1.1 as-number 100 [SwitchB-bgp] peer 193.1.1.1 as-number 200 [SwitchB-bgp] address-family ipv4 unicast [SwitchB-bgp-ipv4] peer 192.1.1.1 enable [SwitchB-bgp-ipv4] peer 193.1.1.1 enable [SwitchB-bgp-ipv4] peer 193.1.1.1 next-hop-local [SwitchB-bgp-ipv4] quit [SwitchB-bgp] quit
# Configure Switch C.
<SwitchC> system-view [SwitchC] bgp 200 [SwitchC-bgp] router-id 3.3.3.3 [SwitchC-bgp] peer 193.1.1.2 as-number 200 [SwitchC-bgp] peer 194.1.1.2 as-number 200 [SwitchC-bgp] address-family ipv4 unicast [SwitchC-bgp-ipv4] peer 193.1.1.2 enable [SwitchC-bgp-ipv4] peer 194.1.1.2 enable [SwitchC-bgp-ipv4] quit [SwitchC-bgp] quit
# Configure Switch D.
<SwitchD> system-view [SwitchD] bgp 200 [SwitchD-bgp] router-id 4.4.4.4 [SwitchD-bgp] peer 194.1.1.1 as-number 200 [SwitchD-bgp] address-family ipv4 unicast [SwitchD-bgp-ipv4] peer 194.1.1.1 enable [SwitchD-bgp-ipv4] quit [SwitchD-bgp] quit
Configure Switch C as the route reflector.
[SwitchC] bgp 200 [SwitchC-bgp] address-family ipv4 unicast [SwitchC-bgp-ipv4] peer 193.1.1.2 reflect-client [SwitchC-bgp-ipv4] peer 194.1.1.2 reflect-client [SwitchC-bgp-ipv4] quit [SwitchC-bgp] quit
Verifying the configuration
# Display the BGP routing table on Switch B.
[SwitchB] display bgp routing-table ipv4 Total number of routes: 1 BGP local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - damped, h - history, s - suppressed, S - Stale, i - internal, e - external Origin: i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn * >e 20.0.0.0 192.1.1.1 0 0 100i
# Display the BGP routing table on Switch D.
[SwitchD] display bgp routing-table ipv4 Total number of routes: 1 BGP local router ID is 4.4.4.4 Status codes: * - valid, > - best, d - damped, h - history, s - suppressed, S - Stale, i - internal, e - external Origin: i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn i 20.0.0.0 193.1.1.2 0 100 0 100i
Switch D has learned route 20.0.0.0/8 from Switch C.