H3C Technologies H3C S12500-X Series Switches User Manual

Page 290

Advertising
background image

279

[ASBR2] route-policy policy1 permit node 1

[ASBR2-route-policy-policy1-1] apply mpls-label

[ASBR2-route-policy-policy1-1] quit

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

create two LDP PWs for the cross-connect to form a multi-segment PW.

[ASBR2] xconnect-group vpn1

[ASBR2-xcg-vpn1] connection ldp

[ASBR2-xcg-vpn1-ldp] peer 192.2.2.2 pw-id 1000

[ASBR2-xcg-vpn1-ldp-192.2.2.2-1000] quit

[ASBR2-xcg-vpn1-ldp] peer 192.4.4.4 pw-id 1000

[ASBR2-xcg-vpn1-ldp-192.4.4.4-1000] quit

[ASBR2-xcg-vpn1-ldp] quit

[ASBR2-xcg-vpn1] quit

5.

Configure PE 2:
# Configure an LSR ID.

<PE2> system-view

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 192.4.4.4 32

[PE2-LoopBack0] quit

[PE2] mpls lsr-id 192.4.4.4

# Enable L2VPN.

[PE2] l2vpn enable

# Enable global LDP.

[PE2] mpls ldp

[PE2-ldp] quit

# Configure VLAN-interface 22 connected to ASBR 1 and enable LDP on the interface.

[PE2] interface vlan-interface 22

[PE2-Vlan-interface22] ip address 22.2.2.1 24

[PE2-Vlan-interface22] mpls enable

[PE2-Vlan-interface22] mpls ldp enable

[PE2-Vlan-interface22] 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 192.4.4.4 0.0.0.0

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

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

[PE2-ospf-1] quit

# Create service instance 1000 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 1000

[PE2-Ten-GigabitEthernet1/0/1-srv1000] encapsulation s-vid 10

[PE2-Ten-GigabitEthernet1/0/1-srv1000] quit

[PE2-Ten-GigabitEthernet1/0/1] quit

Advertising