A must-read for newbies of MPLS static configuration! Detailed case explanations help you get started quickly!

A must-read for newbies of MPLS static configuration! Detailed case explanations help you get started quickly!

Today we will look at the basic configuration cases of MPLS and further explore the application of MPLS in practice.

MPLS Basic Configuration Commands

1. Configure LSR ID

 [Huawei] mpls lsr-id lsr-id

The mpls lsr-id command is used to configure the LSR ID. The LSR ID is used to uniquely identify an LSR in the network. LSRs do not have a default LSR ID and must be configured manually. To improve network reliability, it is recommended to use the address of a loopback interface of the LSR as the LSR ID and to plan the LSR IDs of all LSRs in the network in a unified manner before configuration.

2. Enable MPLS

 [Huawei] mpls

The mpls command enables MPLS globally on the local node and enter the MPLS view.

 [Huawei-GigabitEthernet0/0/0] mpls

In the interface view, enable the MPLS function of the current interface. You must enable the MPLS capability globally before executing the MPLS enable command in the interface view.

Static LSP Configuration Commands

1. Ingress LSR Configuration

 [Huawei] static-lsp ingress lsp-name destination ip-address { mask-length | mask } { nexthop next-hop-address | outgoing-interface interface-type interface-number } * out-label out-label

Use the static-lsp ingress command to configure a static LSP for an ingress node.

  • It is recommended to configure static LSP by specifying the next-hop method to ensure that there is a route entry in the local routing table that exactly matches the specified destination IP address, including the destination IP address and the next-hop IP address. If the LSP outbound interface is Ethernet, the nexthop next-hop-address parameter must be configured to ensure normal forwarding of the LSP.
  • The value range of out-label is 16 to 1048575.

2. Transit LSR Configuration

 [Huawei] static-lsp transit lsp-name [ incoming-interface interface-type interface-number ] in-label in-label { nexthop next-hop-address | outgoing-interface interface-type interface-number }* out-label out-label

Use the static-lsp transit command to configure a static LSP for an intermediate forwarding node.

  • The configuration rules of the next hop and outbound interface are consistent with those of the Ingress LSR.
  • The value range of in-label is 16~1023.
  • The value range of out-label is 16 to 1048575.

3. Egress LSR Configuration

 [Huawei] static-lsp egress lsp-name [ incoming-interface interface-type interface-number ] in-label in-label

Use the static-lsp egress command to configure a static LSP on the egress node.

  • The value range of in-label is 16~1023.

4. Check the static LSP configuration

 [Huawei] display mpls static-lsp [ lsp-name ] [ { include | exclude } ip-address mask-length ] [ verbose ]

The display mpls static-lsp command displays information about static LSPs.

Static LSP Configuration Example

1. Case introduction:

IGP has been deployed between R1, R2 and R3, so the 1.1.1.0/24 and 3.3.3.0/24 networks can communicate with each other. Now it is required to configure static LSP so that the two networks can communicate with each other based on MPLS. The label allocation is shown in the figure.

Topology

2. Configuration ideas:

  • Enable OSPF dynamic routing protocol on the device
  • Enable MPLS on the device and interface.
  • Configure static LSPs according to the plan

3. Configuration steps:

(1) The LSR IDs of the three routers are 10.1.1.1, 10.1.1.2, and 10.1.1.3. Take R1 as an example. Enable MPLS globally and on its interfaces.

 [R1]mpls lsr-id 10.1.1.1 [R1]mpls Info: Mpls starting, please wait... OK! [R1-mpls]quit [R1]interface GigabitEthernet 0/0/0 [R1-GigabitEthernet0/0/0]mpls [R1-GigabitEthernet0/0/0]quit]

(2) All three routers have OSPF dynamic routing protocol enabled. Take R1 as an example.

 [R1] osfp 1 router-id 10.1.1.1 [R1-ospf-1] area 0 [R1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.0 [R1-ospf-1-area-0.0.0.0] network 10.0.12.0 0.0.0.255 [R1-ospf-1-area-0.0.0.0]quit

(3) Configure a static LSP from R1 to R3

 [R1] static-lsp ingress 1to3 destination 3.3.3.0 24 nexthop 10.0.12.2 out-label 200 [R2] static-lsp transit 1to3 incoming-interface GigabitEthernet 0/0/0 in-label 200 nexthop 10.0.23.3 out-label 300 [R3] static-lsp egress 1to3 incoming-interface GigabitEthernet 0/0/0 in-label 300

4. Check the configuration

 [R1]display mpls lsp --------------------------------------------------------------------- LSP Information: STATIC LSP --------------------------------------------------------------------- FEC In/Out Label In/Out IF Vrf Name 3.3.3.0/24 NULL/200 -/GE0/0/0
 [R2]display mpls lsp --------------------------------------------------------------------- LSP Information: STATIC LSP --------------------------------------------------------------------- FEC In/Out Label In/Out IF Vrf Name 3.3.3.0/24 200/300 GE0/0/0/GE0/0/1
 [R3]display mpls lsp --------------------------------------------------------------------- LSP Information: STATIC LSP --------------------------------------------------------------------- FEC In/Out Label In/Out IF Vrf Name 3.3.3.0/24 300/NULL GE0/0/0/-

After testing, there is no problem in the ping test from the host in the 1.1.1.0/24 network segment to the host in 3.3.3.0/24.

5. Packet capture analysis

From the packet capture information, we can see that the packets from the host in the 1.1.1.0/24 network segment to the host in 3.3.3.0/24 network segment are forwarded based on the MPLS label, and the packets from the host in the 3.3.3.0/24 network segment to the host in 1.1.1.0/24 network segment are forwarded based on the IP packet header.

<<:  A complete guide to using Go language built-in packages!

>>:  Global 5G patent rankings: Huawei ranks first, ZTE and OPPO perform well

Recommend

Common router configuration NAT/UPNP/DMZ method?

The methods for configuring NAT (Network Address ...

Do you know the differences between different versions of HTTP protocol?

[[420148]] Introduction There are already multipl...

8 predictions for the development of network technology in 2017

The Internet is evolving at an unprecedented pace...

5G operators reshuffle four operators 2.5 networks

China Telecom and China Unicom jointly announced ...

Discussing the future of TOSCA and NFV

Standardization and unification have great advant...

What are the remaining obstacles to China's 5G?

With the news that Nokia and Ericsson won the bid...

Three steps to protect your home network

Today, the typical structure of an internet conne...

Fiber will play a key role in 5G development

CommScope recently said that in the future of bro...