BGP auto-discovery LDP PW configuration example
Network requirements
Use BGP to discover remote PEs and use LDP to create PWs among PEs so CEs in different sites of VPN 1 can communicate with each other.
Figure 87: Network diagram
Configuration procedure
Configure the IGP and public tunnels. (Details not shown.)
Configure PE 1:
# Configure basic MPLS.
<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 [PE1] mpls ldp [PE1-ldp] quit
# Establish IBGP connections to PE 1 and PE 2 and use BGP to advertise VPLS PE information.
[PE1] bgp 100 [PE1-bgp] peer 2.2.2.9 as-number 100 [PE1-bgp] peer 2.2.2.9 connect-interface loopback 0 [PE1-bgp] peer 3.3.3.9 as-number 100 [PE1-bgp] peer 3.3.3.9 connect-interface loopback 0 [PE1-bgp] address-family l2vpn [PE1-bgp-l2vpn] peer 2.2.2.9 enable [PE1-bgp-l2vpn] peer 3.3.3.9 enable [PE1-bgp-l2vpn] quit [PE1-bgp] quit
# Enable L2VPN.
[PE1] l2vpn enable
# Configure the VSI aaa to use BGP to discover remote PEs and use LDP to establish LDP PWs to PE 2 and PE 3.
[PE1] vsi aaa [PE1-vsi-aaa] auto-discovery bgp [PE1-vsi-aaa-auto] route-distinguisher 1:1 [PE1-vsi-aaa-auto] vpn-target 1:1 [PE1-vsi-aaa-auto] signaling-protocol ldp [PE1-vsi-aaa-auto-ldp] vpls-id 100:100 [PE1-vsi-aaa-auto-ldp] quit [PE1-vsi-aaa-auto] quit [PE1-vsi-aaa] 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 aaa.
[PE1-Ten-GigabitEthernet1/0/1-srv10] xconnect vsi aaa
Configure PE 2:
# Configure basic MPLS.
<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 [PE2] mpls ldp [PE2-ldp] quit
# Establish IBGP connections to PE 1 and PE 3 and use BGP to advertise VPLS PE information.
[PE2] bgp 100 [PE2-bgp] peer 1.1.1.9 as-number 100 [PE2-bgp] peer 1.1.1.9 connect-interface loopback 0 [PE2-bgp] peer 3.3.3.9 as-number 100 [PE2-bgp] peer 3.3.3.9 connect-interface loopback 0 [PE2-bgp] address-family l2vpn [PE2-bgp-l2vpn] peer 1.1.1.9 enable [PE2-bgp-l2vpn] peer 3.3.3.9 enable [PE2-bgp-l2vpn] quit [PE2-bgp] quit
# Enable L2VPN.
[PE2] l2vpn enable
# Configure the VSI aaa to use BGP to discover remote PEs and use LDP to establish LDP PWs to PE 1 and PE 3.
[PE2] vsi aaa [PE2-vsi-aaa] auto-discovery bgp [PE2-vsi-aaa-auto] route-distinguisher 1:1 [PE2-vsi-aaa-auto] vpn-target 1:1 [PE2-vsi-aaa-auto] signaling-protocol ldp [PE2-vsi-aaa-auto-ldp] vpls-id 100:100 [PE2-vsi-aaa-auto-ldp] quit [PE2-vsi-aaa-auto] quit [PE2-vsi-aaa] 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 aaa.
[PE2-Ten-GigabitEthernet1/0/1-srv10] xconnect vsi aaa
Configure PE 3:
# Configure basic MPLS.
<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 [PE3] mpls ldp [PE3-ldp] quit
# Establish IBGP connections to PE 1 and PE 2 and use BGP to advertise VPLS PE information.
[PE3] bgp 100 [PE3-bgp] peer 1.1.1.9 as-number 100 [PE3-bgp] peer 1.1.1.9 connect-interface loopback 0 [PE3-bgp] peer 2.2.2.9 as-number 100 [PE3-bgp] peer 2.2.2.9 connect-interface loopback 0 [PE3-bgp] address-family l2vpn [PE3-bgp-l2vpn] peer 1.1.1.9 enable [PE3-bgp-l2vpn] peer 2.2.2.9 enable [PE3-bgp-l2vpn] quit [PE3-bgp] quit
# Enable L2VPN.
[PE3] l2vpn enable
# Configure the VSI aaa to use BGP to discover remote PEs and use LDP to establish LDP PWs to PE 1 and PE 2.
[PE3] vsi aaa [PE3-vsi-aaa] auto-discovery bgp [PE3-vsi-aaa-auto] route-distinguisher 1:1 [PE3-vsi-aaa-auto] vpn-target 1:1 [PE3-vsi-aaa-auto] signaling-protocol ldp [PE3-vsi-aaa-auto-ldp] vpls-id 100:100 [PE3-vsi-aaa-auto-ldp] quit [PE3-vsi-aaa-auto] quit [PE3-vsi-aaa] 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 aaa.
[PE3-Ten-GigabitEthernet1/0/1-srv10] xconnect vsi aaa
Verifying the configuration
# Execute the display l2vpn pw verbose command on PE 1. The output shows that two LDP PWs have been established.
[PE1] display l2vpn pw verbose VSI Name: aaa Peer: 2.2.2.9 VPLS ID: 100:100 Signaling Protocol : LDP Link ID : 8 PW State : Up In Label : 131155 Out Label: 131155 MTU : 1500 PW Attributes : Main VCCV CC : - VCCV BFD : - Tunnel Group ID : 0x1800000060000000 Tunnel NHLFE IDs : 139 Peer: 3.3.3.9 VPLS ID: 100:100 Signaling Protocol : LDP Link ID : 9 PW State : Up In Label : 131154 Out Label: 131116 MTU : 1500 PW Attributes : Main VCCV CC : - VCCV BFD : - Tunnel Group ID : 0x1800000160000001 Tunnel NHLFE IDs : 140
# Execute the display l2vpn ldp verbose command on PE 1 to view LDP PW label information.
[PE1] display l2vpn ldp verbose Peer: 2.2.2.9 VPLS ID: 100:100 VSI Name: aaa PW State: Up PW Status Communication: Notification method PW ID FEC (Local/Remote): Local AII : (1.1.1.9, 2.2.2.9) Remote AII : (2.2.2.9, 1.1.1.9) PW Type : VLAN/VLAN Group ID : 0/0 Label : 131155/131155 Control Word: Disabled/Disabled VCCV CV Type: -/- VCCV CC Type: -/- MTU : 1500/1500 PW Status : PW forwarding/PW forwarding Peer: 3.3.3.9 VPLS ID: 100:100 VSI Name: aaa PW State: Up PW Status Communication: Notification method PW ID FEC (Local/Remote): Local AII : (1.1.1.9, 3.3.3.9) Remote AII : (3.3.3.9, 1.1.1.9) PW Type : VLAN/VLAN Group ID : 0/0 Label : 131154/131116 Control Word: Disabled/Disabled VCCV CV Type: -/- VCCV CC Type: -/- MTU : 1500/1500 PW Status : PW forwarding/PW forwarding