408
Table 38 Interface and IP address assignment
CE 1 Vlan-int10 100.1.1.1/24 PE 2 Loop0 2.2.2.2/32
PE 1 Loop0 1.1.1.1/32 Vlan-int12 12.1.1.2/24
Vlan-int12 12.1.1.1/24 PE 3 Loop0 3.3.3.3/32
Vlan-int13 13.1.1.1/24 Vlan-int13 13.1.1.3/24
CE 2 Vlan-int10 100.1.1.2/24
Configuration procedure
Before you perform the following configurations, create VLANs on each switch and add ports to the
VLANs.
1. Configure CE 1.
<CE1> system-view
[CE1] interface vlan-interface 10
[CE1-Vlan-interface10] ip address 100.1.1.1 24
[CE1-Vlan-interface10] quit
2. Configure PE 1:
# Configure an LSR ID.
<PE1> system-view
[PE1] interface loopback 0
[PE1-LoopBack0] ip address 1.1.1.1 32
[PE1-LoopBack0] quit
[PE1] mpls lsr-id 1.1.1.1
# Enable global MPLS LDP.
[PE1] mpls ldp
[PE1-ldp] quit
# Establish LDP sessions with PE 2 and PE 3.
[PE1] interface vlan-interface 12
[PE1-Vlan-interface12] ip address 12.1.1.1 24
[PE1-Vlan-interface12] mpls enable
[PE1-Vlan-interface12] mpls ldp enable
[PE1-Vlan-interface12] quit
[PE1] interface vlan-interface 13
[PE1-Vlan-interface13] ip address 13.1.1.1 24
[PE1-Vlan-interface13] mpls enable
[PE1-Vlan-interface13] mpls ldp enable
[PE1-Vlan-interface13] quit
# Configure OSPF for LDP to create LSPs.
[PE1] ospf
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 12.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 13.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Enable L2VPN.