R2511-HP MSR Router Series MPLS Configuration Guide(V5)

94
[PE1-l2vpn] mpls l2vpn
# Enable Soft GRE in L2VPN view.
[PE1-l2vpn] mpls l2vpn soft-gre
[PE1-l2vpn] quit
# Configure Ethernet1/2 (the interface connected to PE 2).
[PE1] interface ethernet 1/2
[PE1-Ethernet1/2] ip address 10.1.1.1 24
[PE1-Ethernet1/2] mpls
[PE1-Ethernet1/2] quit
# Configure OSPF.
[PE1] ospf
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 10.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
# Create a static VC on Ethernet 1/1 (the interface connected to CE 1). The interface requires no
IP address.
[PE1] interface ethernet 1/1
[PE1-Ethernet1/1] mpls static-l2vc destination 192.3.3.3 transmit-vpn-label 100
receive-vpn-label 200
[PE1-Ethernet1/1] quit
3. Configure the P device:
# Configure an LSR ID and enable MPLS globally.
<Sysname> system-view
[Sysname] sysname P
[P] interface loopback 0
[P-LoopBack0] ip address 192.4.4.4 32
[P-LoopBack0] quit
[P] mpls lsr-id 192.4.4.4
[P] mpls
[P-mpls] quit
# Configure Ethernet 1/1 (the interface connected to PE 1).
[P] interface ethernet 1/1
[P-Ethernet1/1] ip address 10.1.1.2 24
[P-Ethernet1/1] mpls
[P-Ethernet1/1] quit
# Configure Ethernet 1/2 (the interface connected to PE 2).
[P] interface ethernet 1/2
[P-Ethernet1/2] ip address 10.2.2.2 24
[P-Ethernet1/2] mpls
[P-Ethernet1/2] quit
# Configure OSPF.
[P] ospf
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 10.2.2.2 0.0.0.255