The interface MTI 1 will automatically obtain an IP address after BGP peer configuration on PE 3.
This address is the loopback interface address specified in the BGP peer configuration. The PIM
mode running on MTI 1 is the same as the PIM mode running 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.
Configuring the R router:
# Enable IP multicast routing, configure an MPLS LSR ID, and enable the LDP capability on the
public network.
<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
# Assign an IP address, enable PIM-SM and LDP capability on the public network interface
GigabitEthernet 2/1/1.
[P] interface GigabitEthernet 2/1/1
[P-GigabitEthernet2/1/1] ip address 192.168.6.2 24
[P-GigabitEthernet2/1/1] pim sm
[P-GigabitEthernet2/1/1] mpls
[P-GigabitEthernet2/1/1] mpls ldp
[P-GigabitEthernet2/1/1] quit
# Assign an IP address, enable PIM-SM and LDP capability on the public network interface
GigabitEthernet 2/1/2.
[P] interface GigabitEthernet 2/1/2
[P-GigabitEthernet2/1/2] ip address 192.168.7.2 24
[P-GigabitEthernet2/1/2] pim sm
[P-GigabitEthernet2/1/2] mpls
[P-GigabitEthernet2/1/2] mpls ldp
[P-GigabitEthernet2/1/2] quit
268