H3C Technologies H3C SR8800 User Manual

Page 218

Advertising
background image

207

# Enable L2VPN and MPLS L2VPN.

[PE1] l2vpn

[PE1-l2vpn] mpls l2vpn

[PE1-l2vpn] quit

# Configure interface GigabitEthernet 4/1/1.

[PE1] interface GigabitEthernet 4/1/1

[PE1-GigabitEthernet4/1/1] quit

# Configure interface GigabitEthernet 4/1/2, and enable MPLS.

[PE1] interface GigabitEthernet 4/1/2

[PE1-GigabitEthernet4/1/2] ip address 10.1.1.1 24

[PE1-GigabitEthernet4/1/2] mpls

[PE1-GigabitEthernet4/1/2] quit

# Create a remote connection from CE 1 to CE 2, using the interface connecting CE 1 as the

incoming interface and the interface connecting the P router as the outgoing interface, setting the

incoming label to 100 and the outgoing label to 200.

[PE1] ccc ce1-ce2 interface GigabitEthernet 4/1/1 in-label 100 out-label 200 nexthop

10.1.1.2

3.

Configure the P router.
# Configure the LSR ID and enable MPLS globally.

<Sysname> system-view

[Sysname] sysname P

[P] interface loopback 0

[P-LoopBack0] ip address 10.0.0.2 32

[P-LoopBack0] quit

[P] mpls lsr-id 10.0.0.2

[P] mpls

[P-mpls] quit

# Configure interface GigabitEthernet 4/1/2, and enable MPLS.

[P] interface GigabitEthernet 4/1/2

[P-GigabitEthernet4/1/2] ip address 10.1.1.2 24

[P-GigabitEthernet4/1/2] mpls

[P-GigabitEthernet4/1/2] quit

# Configure interface GigabitEthernet 4/1/1, and enable MPLS.

[P] interface GigabitEthernet 4/1/1

[P-GigabitEthernet4/1/1] ip address 10.2.2.2 24

[P-GigabitEthernet4/1/1] mpls

[P-GigabitEthernet4/1/1] quit

# Create a static LSP for forwarding packets from PE 1 to PE 2.

[P] static-lsp transit pe1_pe2 incoming-interface GigabitEthernet 4/1/2 in-label 200

nexthop 10.2.2.1 out-label 201

# Create a static LSP for forwarding packets from PE 2 to PE 1.

[P] static-lsp transit pe2_pe1 incoming-interface GigabitEthernet 4/1/1 in-label 101

nexthop 10.1.1.1 out-label 100

4.

Configure PE 2.
# Configure the LSR ID and enable MPLS globally.

<Sysname> system-view

Advertising