H3C Technologies H3C S7500E Series Switches User Manual
Page 178

4-18
[P-Vlan-interface2] mpls ldp
[P-Vlan-interface2] quit
# Configure the interface connected with PE 2 and enable LDP on the interface.
[P] interface vlan-interface 3
[P-Vlan-interface3] ip address 26.2.2.2 24
[P-Vlan-interface3] mpls
[P-Vlan-interface3] mpls ldp
[P-Vlan-interface3] quit
# Configure OSPF.
[P] ospf
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 23.1.1.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 26.2.2.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[P-ospf-1-area-0.0.0.0] quit
3) Configure PE 2
[Sysname] sysname PE2
[PE2] interface loopback 0
[PE2-LoopBack0] ip address 3.3.3.9 32
[PE2-LoopBack0] quit
# Configure the LSR-ID and enable MPLS globally.
[PE2] mpls lsr-id 3.3.3.9
[PE2] mpls
[PE2-mpls] quit
# Enable MPLS L2VPN and LDP globally.
[PE2] mpls l2vpn
[PE2] mpls ldp
[PE2-mpls-ldp] quit
# Configure PE 2 to establish a remote LDP session with PE 1.
[PE2] mpls ldp remote-peer 2
[PE2-mpls-ldp-remote-2] remote-ip 1.1.1.9
[PE2-mpls-ldp-remote-2] quit
# Configure the interface connected with the P device and enable LDP on the interface.
[PE2] interface vlan-interface 3
[PE2-Vlan-interface3] ip address 26.2.2.1 24
[PE2-Vlan-interface3] mpls
[PE2-Vlan-interface3] mpls ldp
[PE2-Vlan-interface3] quit
# Configure OSPF.
[PE2] ospf
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 26.2.2.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure BGP extensions.
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.9 as-number 100