318
[RouterA-bgp-ipv6] quit
[RouterA-bgp] quit
# 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] router-id 2.2.2.2
[RouterB-bgp] peer 3001::1 as-number 100
[RouterB-bgp] peer 3002::2 as-number 200
[RouterB-bgp] address-family ipv6 unicast
[RouterB-bgp-ipv6] peer 3001::1 enable
[RouterB-bgp-ipv6] peer 3002::2 enable
[RouterB-bgp-ipv6] peer 3002::2 next-hop-local
[RouterB-bgp-ipv6] 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] router-id 3.3.3.3
[RouterC-bgp] peer 2001::1 as-number 100
[RouterC-bgp] peer 2002::2 as-number 200
[RouterC-bgp] address-family ipv6 unicast
[RouterC-bgp-ipv6] peer 2001::1 enable
[RouterC-bgp-ipv6] peer 2002::2 enable
[RouterC-bgp-ipv6] peer 2002::2 next-hop-local
[RouterC-bgp-ipv6] quit
[RouterC-bgp] quit
# Configure Router D to establish IBGP sessions with Router B and Router C, and advertise network
4::/64.
<RouterD> system-view
[RouterD] bgp 200
[RouterD-bgp] peer 3002::1 as-number 200
[RouterD-bgp] peer 2002::1 as-number 200
[RouterD-bgp] address-family ipv6 unicast
[RouterD-bgp-ipv6] peer 3002::1 enable
[RouterD-bgp-ipv6] peer 2002::1 enable
[RouterD-bgp-ipv6] network 4:: 64
[RouterD-bgp-ipv6] quit
[RouterD-bgp] quit
4.
Configure preferred values so Link B is used to forward traffic between Router A and Router D:
# Configure Router A to set the preferred value to 100 for routes received from Router B.
[RouterA-bgp-ipv6] peer 3001::2 preferred-value 100
[RouterA-bgp-ipv6] quit
[RouterA-bgp] quit
# Configure Router D to set the preferred value to 100 for routes received from Router B.
[RouterD-bgp-ipv6] peer 3002::1 preferred-value 100