H3C Technologies H3C S6800 Series Switches User Manual
Page 378
365
[ASBR1-bgp-ipv4] peer 26.2.2.3 enable
[ASBR1-bgp-ipv4] peer 26.2.2.3 route-policy policy1 export
[ASBR1-bgp-ipv4] peer 26.2.2.3 label-route-capability
[ASBR1-bgp-ipv4] quit
[ASBR1-bgp] quit
[ASBR1] route-policy policy1 permit node 1
[ASBR1-route-policy-policy1-1] apply mpls-label
[ASBR1-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.
[ASBR1] xconnect-group vpn1
[ASBR1-xcg-vpn1] connection ldp
[ASBR1-xcg-vpn1-ldp] peer 192.1.1.1 pw-id 1000
[ASBR1-xcg-vpn1-ldp-192.1.1.1-1000] quit
[ASBR1-xcg-vpn1-ldp] peer 192.3.3.3 pw-id 1000
[ASBR1-xcg-vpn1-ldp-192.3.3.3-1000] quit
[ASBR1-xcg-vpn1-ldp] quit
[ASBR1-xcg-vpn1] quit
4.
Configure ASBR 2:
# Configure an LSR ID.
[ASBR2] interface loopback 0
[ASBR2-LoopBack0] ip address 192.3.3.3 32
[ASBR2-LoopBack0] quit
[ASBR2] mpls lsr-id 192.3.3.3
# Enable L2VPN.
[ASBR2] l2vpn enable
# Enable global LDP.
[ASBR2] mpls ldp
[ASBR2-ldp] quit
# Configure VLAN-interface 22 (the interface connected to PE 2), and enable LDP on the interface.
[ASBR2] interface vlan-interface 22
[ASBR2-Vlan-interface22] ip address 22.2.2.3 24
[ASBR2-Vlan-interface22] mpls enable
[ASBR2-Vlan-interface22] mpls ldp enable
[ASBR2-Vlan-interface22] quit
# Configure VLAN-interface 26 (the interface connected to ASBR 1), and enable MPLS on the
interface.
[ASBR2] interface vlan-interface 26
[ASBR2-Vlan-interface26] ip address 26.2.2.3 24
[ASBR2-Vlan-interface26] mpls enable
[ASBR2-Vlan-interface26] quit
# Configure OSPF for LDP to create LSPs.
[ASBR2] ospf
[ASBR2-ospf-1] area 0
[ASBR2-ospf-1-area-0.0.0.0] network 22.2.2.3 0.0.0.255
[ASBR2-ospf-1-area-0.0.0.0] network 192.3.3.3 0.0.0.0