H3C Technologies H3C S12500-X Series Switches User Manual

Page 267

Advertising
background image

256

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

[PE1-xcg-vpna-svc] peer 192.3.3.3 pw-id 3 in-label 100 out-label 200

[PE1-xcg-vpna-svc-192.3.3.3-3] quit

[PE1-xcg-vpna-svc] quit

[PE1-xcg-vpna] quit

3.

Configure the P device:
# Configure an LSR ID.

<P> system-view

[P] interface loopback 0

[P-LoopBack0] ip address 192.4.4.4 32

[P-LoopBack0] quit

[P] mpls lsr-id 192.4.4.4

# Enable global LDP.

[P] mpls ldp

[P-ldp] quit

# Configure VLAN-interface 20 connected to PE 1 and enable LDP on the interface.

[P] interface vlan-interface 20

[P-Vlan-interface20] ip address 10.1.1.2 24

[P-Vlan-interface20] mpls enable

[P-Vlan-interface20] mpls ldp enable

[P-Vlan-interface20] quit

# Configure VLAN-interface 30 connected to PE 2 and enable LDP on the interface.

[P] interface vlan-interface 30

[P-Vlan-interface30] ip address 10.2.2.2 24

[P-Vlan-interface30] mpls enable

[P-Vlan-interface30] mpls ldp enable

[P-Vlan-interface30] quit

# Configure OSPF on the P device for LDP to create LSPs.

[P] ospf

[P-ospf-1] area 0

[P-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 192.4.4.4 0.0.0.0

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

[P-ospf-1] quit

4.

Configure PE 2:
# Configure an LSR ID.

<PE2> system-view

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 192.3.3.3 32

[PE2-LoopBack0] quit

[PE2] mpls lsr-id 192.3.3.3

# Enable L2VPN.

[PE2] l2vpn enable

# Enable global LDP.

Advertising