beautypg.com

H3C Technologies H3C S10500 Series Switches User Manual

Page 192

background image

181

# Configure basic MPLS.

system-view

[Sysname] sysname NPE3

[NPE3] interface loopback 0

[NPE3-LoopBack0] ip address 4.4.4.4 32

[NPE3-LoopBack0] quit

[NPE3] mpls lsr-id 4.4.4.4

[NPE3] mpls

[NPE3–mpls] quit

[NPE3] mpls ldp

[NPE3–mpls-ldp] quit

# Configure an IP address for the interface connected with NPE 1, and enable MPLS and MPLS LDP.

[NPE3] interface vlan-interface 15

[NPE3-Vlan-interface15] ip address 15.1.1.2 24

[NPE3-Vlan-interface15] mpls

[NPE3-Vlan-interface15] mpls ldp

[NPE3-Vlan-interface15] quit

# Configure an IP address for the interface connected with NPE 2, and enable MPLS and MPLS LDP.

[NPE3] interface vlan-interface 16

[NPE3-Vlan-interface16] ip address 16.1.1.2 255.255.255.0

[NPE3-Vlan-interface16] mpls

[NPE3-Vlan-interface16] mpls ldp

[NPE3-Vlan-interface16] quit

# Configure the remote LDP session.

[NPE3] mpls ldp remote-peer 1

[NPE3-mpls-remote-1] remote-ip 2.2.2.2

[NPE3-mpls-remote-1] quit

[NPE3] mpls ldp remote-peer 2

[NPE3-mpls-remote-2] remote-ip 3.3.3.3

[NPE3-mpls-remote-2] quit

# Enable L2VPN and MPLS L2VPN.

[NPE3] l2vpn

[NPE3-l2vpn] mpls l2vpn

[NPE3-l2vpn] quit

# Configure the basic attributes of VPLS instance aaa, which uses LDP.

[NPE3] vsi aaa static

[NPE3-vsi-aaa] pwsignal ldp

[NPE3-vsi-aaa-ldp] vsi-id 500

[NPE3-vsi-aaa-ldp] peer 2.2.2.2

[NPE3-vsi-aaa-ldp] peer 3.3.3.3

[NPE3-vsi-aaa-ldp] quit

[NPE3-vsi-aaa] quit

# Create service instance on GigabitEthernet 1/0/1, the interface connecting CE 3, and bind the VSI.

[NPE3] interface gigabitethernet 1/0/1

[NPE3-GigabitEthernet1/0/1] service-instance 1000

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