251
<P> system-view
[P] multicast routing
[P-mrib] quit
# Configure an LSR ID, and enable LDP globally.
[P] mpls lsr-id 2.2.2.2
[P] mpls ldp
[P-ldp] quit
# Assign an IP address to VLAN-interface 12.
[P] interface vlan-interface 12
[P-Vlan-interface12] ip address 192.168.6.2 24
# Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 12.
[P-Vlan-interface12] pim sm
[P-Vlan-interface12] mpls enable
[P-Vlan-interface12] mpls ldp enable
[P-Vlan-interface12] quit
# Assign an IP address to VLAN-interface 15.
[P] interface vlan-interface 15
[P-Vlan-interface15] ip address 192.168.7.2 24
# Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 15.
[P-Vlan-interface15] pim sm
[P-Vlan-interface15] mpls enable
[P-Vlan-interface15] mpls ldp enable
[P-Vlan-interface15] quit
# Assign an IP address to VLAN-interface 19.
[P] interface vlan-interface 19
[P-Vlan-interface19] ip address 192.168.8.2 24
# Enable PIM-SM, MPLS, and IPv4 LDP on VLAN-interface 19.
[P-Vlan-interface19] pim sm
[P-Vlan-interface19] mpls enable
[P-Vlan-interface19] mpls ldp enable
[P-Vlan-interface19] quit
# Assign an IP address to Loopback 1, and enable PIM-SM on the interface.
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.2 32
[P-LoopBack1] pim sm
[P-LoopBack1] quit
# Configure Loopback 1 as a C-BSR and a C-RP.
[P] pim
[P-pim] c-bsr 2.2.2.2
[P-pim] c-rp 2.2.2.2
[P-pim] quit
# Configure OSPF.
[P] ospf 1
[P-ospf-1] area 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 192.168.6.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 192.168.7.0 0.0.0.255