Verifying the configuration – H3C Technologies H3C S12500-X Series Switches User Manual
Page 276

265
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Create an IBGP connection to PE 1 and enable BGP to advertise L2VPN information to PE 1.
[PE2] bgp 100
[PE2-bgp] peer 192.2.2.2 as-number 100
[PE2-bgp] peer 192.2.2.2 connect-interface loopback 0
[PE2-bgp] address-family l2vpn
[PE2-bgp-l2vpn] peer 192.2.2.2 enable
[PE2-bgp-l2vpn] quit
[PE2-bgp] quit
# Create service instance 10 on Ten-GigabitEthernet 1/0/1 to match packets that have an outer
VLAN ID of 10.
[PE2] interface ten-gigabitethernet1/0/1
[PE2-Ten-GigabitEthernet1/0/1] service-instance 10
[PE2-Ten-GigabitEthernet1/0/1-srv10]encapsulation s-vid 10
[PE2-Ten-GigabitEthernet1/0/1-srv10] quit
[PE2-Ten-GigabitEthernet1/0/1] quit
# Create a cross-connect group named vpnb, create a local site named site 2, create a BGP PW
from site 2 to the remote site site 1, and bind service instance 10 on Ten-GigabitEthernet 1/0/1 to
the PW.
[PE2] xconnect-group vpnb
[PE2-xcg-vpnb] auto-discovery bgp
[PE2-xcg-vpnb-auto] route-distinguisher 2:2
[PE2-xcg-vpnb-auto] vpn-target 2:2 export-extcommunity
[PE2-xcg-vpnb-auto] vpn-target 2:2 import-extcommunity
[PE2-xcg-vpnb-auto] site 2 range 10 default-offset 0
[PE2-xcg-vpnb-auto-2] connection remote-site-id 1
[PE2-xcg-vpnb-auto-2-1] ac interface Ten-GigabitEthernet 1/0/1 service-instance 10
[PE2-xcg-vpnb-auto-2-1] return
5.
Configure CE 2.
[CE2] interface ten-gigabitethernet 1/0/1
[CE2-Ten-GigabitEthernet1/0/1] port link-type trunk
[CE2-Ten-GigabitEthernet1/0/1] port trunk permit vlan 10
[CE2-Ten-GigabitEthernet1/0/1] quit
Verifying the configuration
# Display L2VPN PW information on PE 1. The output shows that a PW has been established.
Flags: M - main, B - backup, H - hub link, S - spoke link, N - no split horizon
Total number of PWs: 1, 1 up, 0 blocked, 0 down, 0 defect
Xconnect-group Name: vpnb
Peer PW ID/Rmt Site In/Out Label Proto Flag Link ID State
192.3.3.3 2 65665/65663 BGP M 1 Up
# Display L2VPN PW information on PE 2. The output shows that a PW has been established.