beautypg.com

H3C Technologies H3C S7500E Series Switches User Manual

Page 224

background image

5-32

[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 192.4.4.4 0.0.0.0

[P-ospf-1-area-0.0.0.0] quit

[P-ospf-1] quit

4) Configure PE 2

system-view

[Sysname] sysname PE2

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 192.3.3.3 32

[PE2-LoopBack0] quit

# Configure the LSR ID and enable MPLS globally.

[PE2] mpls lsr-id 192.3.3.3

[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 connection with PE 1.

[PE2] mpls ldp remote-peer 2

[PE2-mpls-ldp-remote-2] remote-ip 192.2.2.2

[PE2-mpls-ldp-remote-2] quit

# Configure the interface connected with the P device and enable LDP on the interface.

[PE2] interface vlan-interface 26

[PE2-Vlan-interface26] ip address 26.2.2.1 24

[PE2-Vlan-interface26] mpls

[PE2-Vlan-interface26] mpls ldp

[PE2-Vlan-interface26] quit

# Configure OSPF.

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 192.3.3.3 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

# On the interface connecting CE 2, create a service instance and establish an MPLS L2VPN
connection.

[PE2] interface gigabitethernet2/0/1

[PE2-GigabitEthernet2/0/1] port access vlan 10

[PE2-GigabitEthernet2/0/1] service-instance 1000

[PE2-GigabitEthernet2/0/1-srv1000] encapsulation s-vid 10

[PE2-GigabitEthernet2/0/1-srv1000] xconnect peer 192.2.2.2 pw-id 1000

[PE2-GigabitEthernet2/0/1-srv1000] quit

[PE2-GigabitEthernet2/0/1] quit

5) Configure

CE

2

system-view

[Sysname] sysname CE2

[CE2] interface vlan-interface 10