H3C Technologies H3C S5560 Series Switches User Manual
Page 318

302
# Configure Switch A to establish EBGP sessions with Switch B and Switch C, and advertise
network 1.1.1.1/32.
[SwitchA] bgp 100
[SwitchA-bgp] router-id 1.1.1.1
[SwitchA-bgp] peer 10.1.1.2 as-number 200
[SwitchA-bgp] peer 30.1.1.3 as-number 200
[SwitchA-bgp] address-family ipv4 unicast
[SwitchA-bgp-ipv4] peer 10.1.1.2 enable
[SwitchA-bgp-ipv4] peer 30.1.1.3 enable
[SwitchA-bgp-ipv4] network 1.1.1.1 32
# Configure Switch B to establish an EBGP session with Switch A, and an IBGP session with Switch
D.
[SwitchB] bgp 200
[SwitchB-bgp] router-id 2.2.2.2
[SwitchB-bgp] peer 10.1.1.1 as-number 100
[SwitchB-bgp] peer 4.4.4.4 as-number 200
[SwitchB-bgp] peer 4.4.4.4 connect-interface loopback 0
[SwitchB-bgp] address-family ipv4 unicast
[SwitchB-bgp-ipv4] peer 10.1.1.1 enable
[SwitchB-bgp-ipv4] peer 4.4.4.4 enable
[SwitchB-bgp-ipv4] peer 4.4.4.4 next-hop-local
[SwitchB-bgp-ipv4] quit
[SwitchB-bgp] quit
# Configure Switch C to establish an EBGP session with Switch A, and an IBGP session with Switch
D.
[SwitchC] bgp 200
[SwitchC-bgp] router-id 3.3.3.3
[SwitchC-bgp] peer 30.1.1.1 as-number 100
[SwitchC-bgp] peer 4.4.4.4 as-number 200
[SwitchC-bgp] peer 4.4.4.4 connect-interface loopback 0
[SwitchC-bgp] address-family ipv4 unicast
[SwitchC-bgp-ipv4] peer 30.1.1.1 enable
[SwitchC-bgp-ipv4] peer 4.4.4.4 enable
[SwitchC-bgp-ipv4] peer 4.4.4.4 next-hop-local
[SwitchC-bgp-ipv4] quit
[SwitchC-bgp] quit
# Configure Switch D to establish IBGP sessions with Switch B and Switch C, and advertise
network 4.4.4.4/32.
[SwitchD] bgp 200
[SwitchD-bgp] router-id 4.4.4.4
[SwitchD-bgp] peer 2.2.2.2 as-number 200
[SwitchD-bgp] peer 2.2.2.2 connect-interface loopback 0
[SwitchD-bgp] peer 3.3.3.3 as-number 200
[SwitchD-bgp] peer 3.3.3.3 connect-interface loopback 0