397
[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
# Create Ethernet service instance 10 on Ten-GigabitEthernet 1/0/1 to match all packets.
[PE1] interface ten-gigabitethernet 1/0/1
[PE1-Ten-GigabitEthernet1/0/1] service-instance 10
[PE1-Ten-GigabitEthernet1/0/1-srv10] encapsulation default
# Bind Ethernet service instance 10 to the VSI
aaa
.
[PE1-Ten-GigabitEthernet1/0/1-srv10] xconnect vsi aaa
3.
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 2 and PE 3, and use BGP to advertise VPLS label block
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 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
# Create Ethernet service instance 10 on Ten-GigabitEthernet 1/0/1 to match all packets.
[PE2] interface ten-gigabitethernet 1/0/1
[PE2-Ten-GigabitEthernet1/0/1] service-instance 10