Static PW configuration example
Network requirements
Configure VPLS on each PE, and establish static PWs between the PEs to interconnect the CEs.
Figure 84: Network diagram
Configuration procedure
This task includes the following configurations:
Configure basic MPLS on each PE: configure LSR ID, enable LDP, run IGP (OSPF in this example) to establish LSPs.
Establish static PWs: enable L2VPN, create static PWs, and specify labels.
Configure PE 1:
# Configure an LSR ID.
<PE1> system-view [PE1] interface loopback 0 [PE1-LoopBack0] ip address 1.1.1.9 32 [PE1-LoopBack0] quit [PE1] mpls lsr-id 1.1.1.9
# Enable L2VPN.
[PE1] l2vpn enable
# Enable global LDP.
[PE1] mpls ldp [PE1-ldp] quit
# Configure VLAN-interface 20 connected to PE 2 and enable LDP on the interface.
[PE1] interface vlan-interface 20 [PE1-Vlan-interface20] ip address 20.1.1.1 24 [PE1-Vlan-interface20] mpls enable [PE1-Vlan-interface20] mpls ldp enable [PE1-Vlan-interface20] quit
# Configure VLAN-interface 30 connected to PE 3 and enable LDP on the interface.
[PE1] interface vlan-interface 30 [PE1-Vlan-interface30] ip address 30.1.1.1 24 [PE1-Vlan-interface30] mpls enable [PE1-Vlan-interface30] mpls ldp enable [PE1-Vlan-interface30] quit
# Configure OSPF on PE 1 for LDP to create LSPs.
[PE1] ospf [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255 [PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit
# Create a VSI on PE 1, and configure the peer PEs.
[PE1] vsi svc [PE1-vsi-svc] pwsignaling static [PE1-vsi-svc-static] peer 2.2.2.9 pw-id 3 in-label 100 out-label 100 [PE1-vsi-svc-static-2.2.2.9-3] quit [PE1-vsi-svc-static] peer 3.3.3.9 pw-id 3 in-label 200 out-label 200 [PE1-vsi-svc-static-3.3.3.9-3] quit [PE1-vsi-svc-static] quit [PE1-vsi-svc] quit
# Create service instance 10 on Ten-GigabitEthernet 1/0/1 to match all packets.
[PE1] interface ten-gigabitethernet1/0/1 [PE1-Ten-GigabitEthernet1/0/1] service-instance 10 [PE1-Ten-GigabitEthernet1/0/1-srv10] encapsulation default
# Bind service instance 10 to the VSI svc.
[PE1-Ten-GigabitEthernet1/0/1-srv10] xconnect vsi svc
Configure PE 2:
# Configure an LSR ID.
<PE2> system-view [PE2] interface loopback 0 [PE2-LoopBack0] ip address 2.2.2.9 32 [PE2-LoopBack0] quit [PE2] mpls lsr-id 2.2.2.9
# Enable L2VPN.
[PE2] l2vpn enable
# Enable global LDP.
[PE2] mpls ldp [PE2-ldp] quit
# Configure VLAN-interface 20 connected to PE 1, and enable LDP on the interface.
[PE2] interface vlan-interface 20 [PE2-Vlan-interface20] ip address 20.1.1.2 24 [PE2-Vlan-interface20] mpls enable [PE2-Vlan-interface20] mpls ldp enable [PE2-Vlan-interface20] quit
# Configure VLAN-interface 40 connected to PE 3, and enable LDP on the interface.
[PE2] interface vlan-interface 40 [PE2-Vlan-interface40] ip address 40.1.1.2 24 [PE2-Vlan-interface40] mpls enable [PE2-Vlan-interface40] mpls ldp enable [PE2-Vlan-interface40] quit
# Configure OSPF on PE 2 for LDP to create LSPs.
[PE2] ospf [PE2-ospf-1] area 0 [PE2-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255 [PE2-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255 [PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit
# Create a VSI on PE 2, and configure the peer PEs.
[PE2] vsi svc [PE2-vsi-svc] pwsignaling static [PE2-vsi-svc-static] peer 1.1.1.9 pw-id 3 in-label 100 out-label 100 [PE2-vsi-svc-static-1.1.1.9-3] quit [PE2-vsi-svc-static] peer 3.3.3.9 pw-id 3 in-label 300 out-label 300 [PE2-vsi-svc-static-3.3.3.9-3] quit [PE2-vsi-svc-static] quit [PE2-vsi-svc] quit
# Create service instance 10 on Ten-GigabitEthernet 1/0/1 to match all packets.
[PE2] interface ten-gigabitethernet1/0/1 [PE2-Ten-GigabitEthernet1/0/1] service-instance 10 [PE2-Ten-GigabitEthernet1/0/1-srv10] encapsulation default
# Bind service instance 10 to the VSI svc.
[PE2-Ten-GigabitEthernet1/0/1-srv10] xconnect vsi svc
Configure PE 3:
# Configure an LSR ID.
<PE3> system-view [PE3] interface loopback 0 [PE3-LoopBack0] ip address 3.3.3.9 32 [PE3-LoopBack0] quit [PE3] mpls lsr-id 3.3.3.9
# Enable L2VPN.
[PE3] l2vpn enable
# Enable global LDP.
[PE3] mpls ldp [PE3-ldp] quit
# Configure VLAN-interface 30 connected to PE 1, and enable LDP on the interface.
[PE3] interface vlan-interface 30 [PE3-Vlan-interface30] ip address 30.1.1.3 24 [PE3-Vlan-interface30] mpls enable [PE3-Vlan-interface30] mpls ldp enable [PE3-Vlan-interface30] quit
# Configure VLAN-interface 40 connected to PE 2, and enable LDP on the interface.
[PE3] interface vlan-interface 40 [PE3-Vlan-interface40] ip address 40.1.1.3 24 [PE3-Vlan-interface40] mpls enable [PE3-Vlan-interface40] mpls ldp enable [PE3-Vlan-interface40] quit
# Configure OSPF on PE 3 for LDP to create LSPs.
[PE3] ospf [PE3-ospf-1] area 0 [PE3-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255 [PE3-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255 [PE3-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0 [PE3-ospf-1-area-0.0.0.0] quit [PE3-ospf-1] quit
# Create a VSI on PE 3 and configure the peer PEs.
[PE3] vsi svc [PE3-vsi-svc] pwsignaling static [PE3-vsi-svc-static] peer 1.1.1.9 pw-id 3 in-label 200 out-label 200 [PE3-vsi-svc-static-1.1.1.9-3] quit [PE3-vsi-svc-static] peer 2.2.2.9 pw-id 3 in-label 300 out-label 300 [PE3-vsi-svc-static-2.2.2.9-3] quit [PE3-vsi-svc-static] quit [PE3-vsi-svc] quit
# Create service instance 10 on Ten-GigabitEthernet 1/0/1 to match all packets.
[PE3] interface ten-gigabitethernet1/0/1 [PE3-Ten-GigabitEthernet1/0/1] service-instance 10 [PE3-Ten-GigabitEthernet1/0/1-srv10] encapsulation default
# Bind service instance 10 to the VSI svc.
[PE3-Ten-GigabitEthernet1/0/1-srv10] xconnect vsi svc
Verifying the configuration
# Execute the display l2vpn pw verbose command on PE 1. The output shows that two static PWs in up state have been established.
[PE1] display l2vpn pw verbose VSI Name: svc Peer: 2.2.2.9 PW ID: 3 Signaling Protocol : Static Link ID : 8 PW State : Up In Label : 100 Out Label: 100 MTU : 1500 PW Attributes : Main VCCV CC : - VCCV BFD : - Tunnel Group ID : 0x1800000160000001 Tunnel NHLFE IDs : 137 Peer: 3.3.3.9 PW ID: 3 Signaling Protocol : Static Link ID : 9 PW State : Up In Label : 200 Out Label: 200 MTU : 1500 PW Attributes : Main VCCV CC : - VCCV BFD : - Tunnel Group ID : 0x1800000260000002 Tunnel NHLFE IDs : 138