105
2.
Configure Router A:
# Configure a BGP connection.
<RouterA> system-view
[RouterA] bgp 100
[RouterA-bgp] peer 167.1.1.2 as-number 200
[RouterA-bgp] import-route direct
[RouterA-bgp] quit
3.
Configure Router B:
# Configure a VPN instance.
<RouterB> system-view
[RouterB] ip vpn-instance vpn1
[RouterB-vpn-instance-vpn1] route-distinguisher 200:1
[RouterB-vpn-instance-vpn1] vpn-target 200:1 export-extcommunity
[RouterB-vpn-instance-vpn1] vpn-target 200:1 import-extcommunity
[RouterB-vpn-instance-vpn1] quit
# Configure a BGP connection.
[RouterB] router id 1.1.1.1
[RouterB] bgp 200
[RouterB-bgp] peer 2.2.2.2 as-number 200
[RouterB-bgp] peer 2.2.2.2 connect-interface LoopBack0
[RouterB-bgp] ipv4-family vpn-instance vpn1
[RouterB-bgp-vpn1] peer 167.1.1.2 as-number 100
[RouterB-bgp-vpn1] quit
[RouterB-bgp] ipv4-family vpnv4
[RouterB-bgp-af-vpnv4] peer 2.2.2.2 enable
[RouterB-bgp-af-vpnv4] quit
[RouterB-bgp] quit
# Configure MPLS.
[RouterB] mpls lsr-id 1.1.1.1
[RouterB] mpls
[RouterB-mpls] quit
[RouterB] mpls ldp
[RouterB-mpls-ldp] quit
# Configure OSPF.
[RouterB] ospf
[RouterB-ospf-1] area 0
[RouterB ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[RouterB ospf-1-area-0.0.0.0] network 168.1.1.0 0.0.0.255
[RouterB ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
# Bind interface GigabitEthernet 1/0/1 to VPN instance vpn1.
[RouterB] interface gigabitethernet 1/0/1
[RouterB-GigabitEthernet1/0/1] ip binding vpn-instance vpn1
[RouterB-GigabitEthernet1/0/1] ip address 167.1.1.2 24
[RouterB-GigabitEthernet1/0/1] quit
# Enable MPLS on interface Serial 2/1/1.
[RouterB] interface serial 2/1/1
[RouterB-Serial2/1/1] mpls