302
[RouterA] bgp 100
[RouterA-bgp] router-id 1.1.1.1
[RouterA-bgp] peer 10.1.1.2 as-number 200
[RouterA-bgp] peer 30.1.1.3 as-number 200
[RouterA-bgp] address-family ipv4 unicast
[RouterA-bgp-ipv4] peer 10.1.1.2 enable
[RouterA-bgp-ipv4] peer 30.1.1.3 enable
[RouterA-bgp-ipv4] network 1.1.1.1 32
# Configure Router B to establish an EBGP session with Router A, and an IBGP session with Router
D.
<RouterB> system-view
[RouterB] bgp 200
[RouterB-bgp] router-id 2.2.2.2
[RouterB-bgp] peer 10.1.1.1 as-number 100
[RouterB-bgp] peer 4.4.4.4 as-number 200
[RouterB-bgp] peer 4.4.4.4 connect-interface loopback 0
[RouterB-bgp] address-family ipv4 unicast
[RouterB-bgp-ipv4] peer 10.1.1.1 enable
[RouterB-bgp-ipv4] peer 4.4.4.4 enable
[RouterB-bgp-ipv4] peer 4.4.4.4 next-hop-local
[RouterB-bgp-ipv4] quit
[RouterB-bgp] quit
# Configure Router C to establish an EBGP session with Router A, and an IBGP session with Router
D.
<RouterC> system-view
[RouterC] bgp 200
[RouterC-bgp] router-id 3.3.3.3
[RouterC-bgp] peer 30.1.1.1 as-number 100
[RouterC-bgp] peer 4.4.4.4 as-number 200
[RouterC-bgp] peer 4.4.4.4 connect-interface loopback 0
[RouterC-bgp] address-family ipv4 unicast
[RouterC-bgp-ipv4] peer 30.1.1.1 enable
[RouterC-bgp-ipv4] peer 4.4.4.4 enable
[RouterC-bgp-ipv4] peer 4.4.4.4 next-hop-local
[RouterC-bgp-ipv4] quit
[RouterC-bgp] quit
# Configure Router D to establish IBGP sessions with Router B and Router C, and advertise network
4.4.4.4/32.
<RouterD> system-view
[RouterD] bgp 200
[RouterD-bgp] router-id 4.4.4.4
[RouterD-bgp] peer 2.2.2.2 as-number 200
[RouterD-bgp] peer 2.2.2.2 connect-interface loopback 0
[RouterD-bgp] peer 3.3.3.3 as-number 200
[RouterD-bgp] peer 3.3.3.3 connect-interface loopback 0
[RouterD-bgp] address-family ipv4 unicast
[RouterD-bgp-ipv4] peer 2.2.2.2 enable
[RouterD-bgp-ipv4] peer 3.3.3.3 enable