275
[PE3-bgp-b] quit
[PE3–bgp] ipv4-family vpnv4
[PE3–bgp-af-vpnv4] peer vpn-g enable
[PE3-bgp-af-vpnv4] peer 1.1.1.1 group vpn-g
[PE3–bgp-af-vpnv4] peer 1.1.1.2 group vpn-g
[PE3–bgp-af-vpnv4] quit
[PE3–bgp] quit
With BGP peers configured on PE 3, the interfaces MTI 0 and MTI 1 will automatically obtain IP
addresses, which are the loopback interface addresses specified in the BGP peer configuration.
The PIM mode running on MTI 0 is the same as on the interfaces in VPN instance a, and the
PIM mode running on MTI 1 is the same as on the interfaces in VPN instance b.
# Configure OSPF.
[PE3] ospf 1
[PE3-ospf-1] area 0.0.0.0
[PE3-ospf-1-area-0.0.0.0] network 1.1.1.3 0.0.0.0
[PE3-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.255.255
[PE3-ospf-1-area-0.0.0.0] quit
[PE3-ospf-1] quit
# Configure RIP
[PE3] rip 2 vpn-instance a
[PE3-rip-2] network 10.0.0.0
[PE3-rip-2] import-route bgp
[PE3-rip-2] quit
[PE3] rip 3 vpn-instance b
[PE3-rip-3] network 10.0.0.0
[PE3-rip-3] network 33.0.0.0
[PE3-rip-3] import-route bgp
[PE3-rip-3] return
4.
Configure the P device:
# Enable IP multicast routing on the public network, configure an MPLS LSR ID, and enable the
LDP capability.
<P> system-view
[P] multicast routing-enable
[P] mpls lsr-id 2.2.2.2
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
# Configure an IP address, and enable PIM-SM and LDP capability on the public network
interface VLAN-interface 12.
[P] interface vlan-interface 12
[P-Vlan-interface12] ip address 192.168.6.2 24
[P-Vlan-interface12] pim sm
[P-Vlan-interface12] mpls
[P-Vlan-interface12] mpls ldp
[P-Vlan-interface12] quit
# Configure an IP address, and enable PIM-SM and LDP capability on the public network
interface VLAN-interface 15.
[P] interface vlan-interface 15