120
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
# Configure Router C.
<RouterC> system-view
[RouterC] ospf
[RouterC-ospf-1] import-route direct
[RouterC-ospf-1] import-route bgp
[RouterC-ospf-1] area 0
[RouterC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
[RouterC-ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit
# Configure Router D.
<RouterD> system-view
[RouterD] ospf
[RouterD-ospf-1] area 0
[RouterD-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[RouterD-ospf-1-area-0.0.0.0] network 4.4.4.9 0.0.0.0
[RouterD-ospf-1-area-0.0.0.0] quit
[RouterD-ospf-1] quit
# Verify that the routers have learned the routes to one another, including the routes to the
loopback interfaces. This example uses Router A.
[RouterA] display ip routing-table
Destinations : 6 Routes : 6
Destination/Mask Proto Pre Cost NextHop Interface
1.1.1.9/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.9/32 O_INTRA 10 1 10.1.1.2 GE1/1/1
10.1.1.0/24 Direct 0 0 10.1.1.1 GE1/1/1
10.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
3.
Configure BGP on Router B and Router C to ensure that the ASs can communicate with each
other:
# Configure Router B.
[RouterB] bgp 100
[RouterB-bgp] peer 20.1.1.2 as-number 200
[RouterB-bgp] address-family ipv4 unicast
[RouterB-bgp-ipv4] peer 20.1.1.2 enable
[RouterB-bgp-ipv4] import-route ospf
[RouterB-bgp-ipv4] import-route direct
[RouterB-bgp-ipv4] quit
[RouterB-bgp] quit
# Configure Router C.
[RouterC] bgp 200
[RouterC-bgp] peer 20.1.1.1 as-number 100
[RouterC-bgp] address-family ipv4 unicast