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

Page 268

Advertising
background image

257

[PE2] mpls ldp

[PE2-ldp] quit

# Configure VLAN-interface 30 connected to the P device and enable LDP on the interface.

[PE2] interface vlan-interface 30

[PE2-Vlan-interface30] ip address 10.2.2.1 24

[PE2-Vlan-interface30] mpls enable

[PE2-Vlan-interface30] mpls ldp enable

[PE2-Vlan-interface30] 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 10.2.2.1 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 192.3.3.3 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] quit

[PE2-ospf-1] 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 vpna, create a cross-connect named svc in the group, and

bind service instance 10 on Ten-GigabitEthernet 1/0/1 to the cross-connect.

[PE2] xconnect-group vpna

[PE2-xcg-vpna] connection svc

[PE2-xcg-vpna-svc] ac interface Ten-GigabitEthernet 1/0/1 service-instance 10

# Create a static PW for the cross-connect to bind the AC to the PW.

[PE2-xcg-vpna-svc] peer 192.2.2.2 pw-id 3 in-label 200 out-label 100

[PE2-xcg-vpna-svc-192.2.2.2-3] quit

[PE2-xcg-vpna-svc] quit

[PE2-xcg-vpna] quit

5.

Configure CE 2:

<CE2> system-view

[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 static PW has been established.

[PE1] display l2vpn pw

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: vpna

Peer PW ID In/Out Label Proto Flag Link ID State

Advertising