R3303-HP HSR6800 Routers MPLS Configuration Guide

202
[PE1] l2vpn
[PE1-l2vpn] mpls l2vpn
[PE1-l2vpn] quit
# Enable LDP globally.
[PE1] mpls ldp
[PE1-mpls-ldp] quit
# Configure PE 1 to establish an LDP remote session with PE 2.
[PE1] mpls ldp remote-peer 1
[PE1-mpls-ldp-remote-1] remote-ip 192.3.3.3
[PE1-mpls-ldp-remote-1] quit
# Configure the interface connected with the P device and enable LDP on the interface.
[PE1] interface ten-GigabitEthernet 1/0/2
[PE1-Ten-GigabitEthernet1/0/2] ip address 23.1.1.1 24
[PE1-Ten-GigabitEthernet1/0/2] mpls
[PE1-Ten-GigabitEthernet1/0/2] mpls ldp
[PE1-Ten-GigabitEthernet1/0/2] quit
# Configure OSPF.
[PE1] ospf
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 23.1.1.1 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 192.2.2.2 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# On the interface connected to CE 1, create a service instance and then create a VC.
[PE1] interface ten-gigabitethernet1/0/1
[PE1-Ten-GigabitEthernet1/0/1] port link-mode bridge
[PE1-Ten-GigabitEthernet1/0/1] service-instance 1
[PE1-Ten-GigabitEthernet1/0/1-srv1] encapsulation untagged
[PE1-Ten-GigabitEthernet1/0/1-srv1]xconnect peer 192.3.3.3 pw-id 1000 access-mode
ethernet
[PE1-Ten-GigabitEthernet1/0/1-srv1] quit
[PE1-Ten-GigabitEthernet1/0/1] quit
3. Configure the P device:
<Sysname> system-view
[Sysname] sysname P
[P] interface loopback 0
[P-LoopBack0] ip address 192.4.4.4 32
[P-LoopBack0] quit
# Configure the MPLS LSR ID and enable MPLS globally.
[P] mpls lsr-id 192.4.4.4
[P] mpls
[P-mpls] quit
# Enable LDP globally.
[P] mpls ldp
[P-mpls-ldp] quit
# Configure the interface connected with PE 1 and enable LDP on the interface.
[P] interface ten-GigabitEthernet1/0/2