285
[PE2–bgp] quit
# Configure OSPF.
[PE2] ospf 1
[PE2-ospf-1] area 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 1.1.1.2 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 11.11.11.11 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 10.10.0.0 0.0.255.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure a routing policy.
[PE2] route-policy map1 permit node 10
[PE2-route-policy] apply mpls-label
[PE2-route-policy] quit
[PE2] route-policy map2 permit node 10
[PE2-route-policy] if-match mpls-label
[PE2-route-policy] apply mpls-label
[PE2-route-policy] quit
3.
Configure PE 3:
# Configure a Router ID, enable IP multicast routing on the public network, configure an MPLS
LSR ID, and enable the LDP capability.
<PE3> system-view
[PE3] router id 1.1.1.3
[PE3] multicast routing-enable
[PE3] mpls lsr-id 1.1.1.3
[PE3] mpls
[PE3-mpls] quit
[PE3] mpls ldp
[PE3-mpls-ldp] quit
# Configure an IP address, and enable PIM-SM and LDP capability on the public network
interface VLAN-interface 4.
[PE3] interface vlan-interface 4
[PE3-Vlan-interface4] ip address 10.10.2.1 24
[PE3-Vlan-interface4] pim sm
[PE3-Vlan-interface4] mpls
[PE3-Vlan-interface4] mpls ldp
[PE3-Vlan-interface4] quit
# Configure an IP address, and enable PIM-SM and MPLS capability on the public network
interface VLAN-interface 3.
[PE3] interface vlan-interface 3
[PE3-Vlan-interface3] ip address 192.168.1.2 24
[PE3-Vlan-interface3] pim sm
[PE3-Vlan-interface3] mpls
[PE3-Vlan-interface3] quit
# Configure an IP address for Loopback 1, and enable PIM-SM.
[PE3] interface loopback 1
[PE3-LoopBack1] ip address 1.1.1.3 32
[PE3-LoopBack1] pim sm
[PE3-LoopBack1] quit