beautypg.com

H3C Technologies H3C S6800 Series Switches User Manual

Page 438

background image

425

# Create cross-connect group vpna and create a cross-connect named ldp in the cross-connect

group. Bind the cross-connect to interface VLAN-interface 10 and create the primary and backup
LDP PWs in the cross-connect. The primary PW references the PW class pwa.

[PE1] xconnect-group vpna

[PE1-xcg-vpna] connection ldp

[PE1-xcg-vpna-ldp] ac interface vlan-interface 10

[PE1-xcg-vpna-ldp] peer 2.2.2.2 pw-id 20 pw-class pwa

[PE1-xcg-vpna-ldp-2.2.2.2-20] backup-peer 3.3.3.3 pw-id 30

[PE1-xcg-vpna-ldp-3.3.3.3-20-backup] quit

[PE1-xcg-vpna-ldp-2.2.2.2-20] quit

[PE1-xcg-vpna-ldp] quit

[PE1-xcg-vpna] quit

[PE1] quit

3.

Configure PE 2:
# Configure an LSR ID.

system-view

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 2.2.2.2 32

[PE2-LoopBack0] quit

[PE2] mpls lsr-id 2.2.2.2

# Enable global MPLS LDP.

[PE2] mpls ldp

[PE2-ldp] quit

# Establish an LDP session with PE 1.

[PE2] interface vlan-interface 12

[PE2-Vlan-interface12] ip address 12.1.1.2 24

[PE2-Vlan-interface12] mpls enable

[PE2-Vlan-interface12] mpls ldp enable

[PE2-Vlan-interface12] quit

# Configure OSPF for LDP to create LSPs.

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 12.1.1.0 0.0.0.255

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

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

[PE2-ospf-1] quit

# Enable L2VPN.

[PE2] l2vpn enable

# Enable BFD for MPLS.

[PE2] mpls bfd enable

# Create interface VLAN-interface 10 connected to CE 2. This interface does not need an IP

address.

[PE2] interface vlan-interface 10

[PE2-Vlan-interface10] quit

# Create PW class pwa. In the PW class, configure BFD to verify PW connectivity and configure
the VCCV CC type as router-alert.

[PE2] pw-class pwa