BGP PW configuration example
Network requirements
CEs are connected to the PEs through Layer 3 Ethernet interfaces (GigabitEthernet 2/1/1).
Configure a VSI on each PE, and establish BGP PWs between the PEs to interconnect CEs.
Figure 125: Network diagram
Configuration procedure
Configure an IGP and public tunnels on each PE. (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 2 and PE 3, and use BGP to advertise VPLS label block information.
[PE1] bgp 100 [PE1-bgp-default] peer 2.2.2.9 as-number 100 [PE1-bgp-default] peer 2.2.2.9 connect-interface loopback 0 [PE1-bgp-default] peer 3.3.3.9 as-number 100 [PE1-bgp-default] peer 3.3.3.9 connect-interface loopback 0 [PE1-bgp-default] address-family l2vpn [PE1-bgp-default-l2vpn] peer 2.2.2.9 enable [PE1-bgp-default-l2vpn] peer 3.3.3.9 enable [PE1-bgp-default-l2vpn] quit [PE1-bgp-default] quit
# Enable L2VPN.
[PE1] l2vpn enable
# Configure VSI aaa to use BGP to establish BGP 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 bgp [PE1-vsi-aaa-auto-bgp] site 1 range 10 default-offset 0 [PE1-vsi-aaa-auto-bgp] quit [PE1-vsi-aaa-auto] quit [PE1-vsi-aaa] quit
# Bind Layer 3 Ethernet interface GigabitEthernet 2/1/1 to VSI aaa.
[PE1] interface gigabitethernet 2/1/1 [PE1-GigabitEthernet2/1/1] xconnect vsi aaa [PE1-GigabitEthernet2/1/1] quit
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 label block information.
[PE2] bgp 100 [PE2-bgp-default] peer 1.1.1.9 as-number 100 [PE2-bgp-default] peer 1.1.1.9 connect-interface loopback 0 [PE2-bgp-default] peer 3.3.3.9 as-number 100 [PE2-bgp-default] peer 3.3.3.9 connect-interface loopback 0 [PE2-bgp-default] address-family l2vpn [PE2-bgp-default-l2vpn] peer 1.1.1.9 enable [PE2-bgp-default-l2vpn] peer 3.3.3.9 enable [PE2-bgp-default-l2vpn] quit [PE2-bgp-default] quit
# Enable L2VPN.
[PE2] l2vpn enable
# Configure VSI aaa to use BGP to establish BGP 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 bgp [PE2-vsi-aaa-auto-bgp] site 2 range 10 default-offset 0 [PE2-vsi-aaa-auto-bgp] quit [PE2-vsi-aaa-auto] quit [PE2-vsi-aaa] quit
# Bind Layer 3 Ethernet interface GigabitEthernet 2/1/1 to VSI aaa.
[PE2] interface gigabitethernet 2/1/1 [PE2-GigabitEthernet2/1/1] xconnect vsi aaa [PE2-GigabitEthernet2/1/1] quit
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 label block information.
[PE3] bgp 100 [PE3-bgp-default] peer 1.1.1.9 as-number 100 [PE3-bgp-default] peer 1.1.1.9 connect-interface loopback 0 [PE3-bgp-default] peer 2.2.2.9 as-number 100 [PE3-bgp-default] peer 2.2.2.9 connect-interface loopback 0 [PE3-bgp-default] address-family l2vpn [PE3-bgp-default-l2vpn] peer 1.1.1.9 enable [PE3-bgp-default-l2vpn] peer 2.2.2.9 enable [PE3-bgp-default-l2vpn] quit [PE3-bgp-default] quit
# Enable L2VPN.
[PE3] l2vpn enable
# Configure VSI aaa to use BGP to establish BGP 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 bgp [PE3-vsi-aaa-auto-bgp] site 3 range 10 default-offset 0 [PE3-vsi-aaa-auto-bgp] quit [PE3-vsi-aaa-auto] quit [PE3-vsi-aaa] quit
# Bind Layer 3 Ethernet interface GigabitEthernet 2/1/1 to VSI aaa.
[PE3] interface gigabitethernet 2/1/1 [PE3-GigabitEthernet2/1/1] xconnect vsi aaa [PE3-GigabitEthernet2/1/1] quit
Verifying the configuration
# Verify that two BGP PWs in up state have been established on PE 1.
[PE1] display l2vpn pw verbose VSI Name: aaa Peer: 2.2.2.9 Remote Site: 2 Signaling Protocol : BGP Link ID : 9 PW State : Up In Label : 1295 Out Label: 1025 MTU : 1500 PW Attributes : Main VCCV CC : - VCCV BFD : - Tunnel Group ID : 0x800000160000001 Tunnel NHLFE IDs : 1027 Peer: 3.3.3.9 Remote Site: 3 Signaling Protocol : BGP Link ID : 10 PW State : Up In Label : 1296 Out Label: 1025 MTU : 1500 PW Attributes : Main VCCV CC : - VCCV BFD : - Tunnel Group ID : 0x800000060000000 Tunnel NHLFE IDs : 1026
# Display VPLS label block information received from PE 2 and PE 3 on PE 1.
[PE1] display l2vpn bgp verbose VSI Name: aaa Remote Site ID : 2 Offset : 0 RD : 1:1 PW State : Up Encapsulation : BGP-VPLS MTU : 1500 Nexthop : 2.2.2.9 Local VC Label : 1295 Remote VC Label : 1025 Link ID : 9 Local Label Block : 1293/10/0 Remote Label Block : 1024/10/0 Export Route Target: 1:1 Remote Site ID : 3 Offset : 0 RD : 1:1 PW State : Up Encapsulation : BGP-VPLS MTU : 1500 Nexthop : 3.3.3.9 Local VC Label : 1296 Remote VC Label : 1025 Link ID : 10 Local Label Block : 1293/10/0 Remote Label Block : 1024/10/0 Export Route Target: 1:1