Displaying and maintaining ipv6 mpls l3vpn – H3C Technologies H3C S12500-X Series Switches User Manual

Page 278

Advertising
background image

267

2.

Configure PE 1:
# Configure an LSR ID.

<PE1> system-view

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.1 32

[PE1-LoopBack0] quit

[PE1] mpls lsr-id 1.1.1.1

# Enable global MPLS LDP.

[PE1] mpls ldp

[PE1-ldp] quit

# 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-interface12] ip address 13.1.1.1 24

[PE1-Vlan-interface12] mpls enable

[PE1-Vlan-interface12] mpls ldp enable

[PE1-Vlan-interface12] quit

# Configure OSPF on PE 1 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 Ten-GigabitEthernet 1/0/1 to match all packets.

[PE1] interface ten-gigabitethernet1/0/1

[PE1-Ten-GigabitEthernet1/0/1] service-instance 10

[PE1-Ten-GigabitEthernet1/0/1-srv10] encapsulation default

[PE1-Ten-GigabitEthernet1/0/1-srv10] quit

[PE1-Ten-GigabitEthernet1/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 Ten-GigabitEthernet 1/0/1 to the cross-connect.

[PE1] xconnect-group vpna

[PE1-xcg-vpna] connection ldp

[PE1-xcg-vpna-ldp] ac interface ten-gigabitethernet 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

Advertising