H3C Technologies H3C S6800 Series Switches User Manual

Page 367

Advertising
background image

354

# Configure VLAN interface 12 (the interface connected to PE 2) and VLAN interface 13 (the

interface connected to PE 3), and enable LDP for the interfaces.

[PE1] interface vlan-interface 12

[PE1-Vlan-interface12] ip address 12.1.1.1 24

[PE1-Vlan-interface12] mpls enable

[PE1-Vlan-interface12] mpls ldp enable

[PE1-Vlan-interface12] quit

[PE1] interface vlan-interface 13

[PE1-Vlan-interface13] ip address 13.1.1.1 24

[PE1-Vlan-interface13] mpls enable

[PE1-Vlan-interface13] mpls ldp enable

[PE1-Vlan-interface13] quit

# Configure OSPF for LDP to create LSPs.

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

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

[PE1-ospf-1-area-0.0.0.0] network 13.1.1.0 0.0.0.255

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

[PE1-ospf-1] quit

# Enable L2VPN.

[PE1] l2vpn enable

# Create service instance 10 on FortyGigE 1/0/1 to match packets that have an outer VLAN ID

of 10.

[PE1] interface fortygige1/0/1

[PE1-FortyGigE1/0/1] port link-type trunk

[PE1-FortyGigE1/0/1] port trunk permit vlan 10

[PE1-FortyGigE1/0/1] service-instance 10

[PE1-FortyGigE1/0/1-srv10] encapsulation s-vid 10

[PE1-FortyGigE1/0/1-srv10] quit

[PE1-FortyGigE1/0/1] quit

# Create a cross-connect group named vpna, create a cross-connect named ldp in the group, and
bind service instance 10 on FortyGigE 1/0/1 to the cross-connect.

[PE1] xconnect-group vpna

[PE1-xcg-vpna] connection ldp

[PE1-xcg-vpna-ldp] ac interface fortygige 1/0/1 service-instance 10

# Create primary and backup LDP PWs for the cross-connect to bind the AC to the PWs and
implement PW redundancy.

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

[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-30-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 LSR ID.

Advertising