Lab Mpls LDP Configuration
Lab Mpls LDP Configuration
Learning Objectives
Topology
Scenario
Assume that you are a network administrator of an enterprise. Your enterprise uses
an IP network with poor forwarding performance. You need to use MPLS to improve
the forwarding rate of routers. Static LSPs are configured manually, while LDP is a
protocol developed for label distribution. To perform flexible configuration, use LDP
to set up MPLS LSPs.
HUAWEI TECHNOLOGIES 1
HCIP-Routing & Switching-IENP Lab Guide
Tasks
<Huawei>system-view
[Huawei]sysname S1
[S1]interface Vlanif 1
<Huawei>system-view
[Huawei]sysname R1
[R1-GigabitEthernet0/0/1]quit
[R1-Serial1/0/0]quit
[R1]interface loopback 0
<Huawei>system-view
[Huawei]sysname R2
[R2-Serial1/0/0]quit
HUAWEI TECHNOLOGIES 2
HCIP-Routing & Switching-IENP Lab Guide
[R2-Serial2/0/0]quit
[R2]interface loopback 0
<Huawei>system-view
[Huawei]sysname R3
[R3-GigabitEthernet0/0/2]quit
[R3-Serial2/0/0]quit
[R3]interface loopback 0
<Huawei>system-view
[Huawei]sysname S2
[S2]interface Vlanif 1
After the configurations are complete, test the connectivity of direct links.
[S1-ospf-1]area 0
HUAWEI TECHNOLOGIES 3
HCIP-Routing & Switching-IENP Lab Guide
[R1-ospf-1]area 0
[R2-ospf-1]area 0
[R3-ospf-1]area 0
[S2-ospf-1]area 0
Check the routing table and test connectivity on the entire network.
[R2]ping 10.0.1.2
HUAWEI TECHNOLOGIES 4
HCIP-Routing & Switching-IENP Lab Guide
5 packet(s) transmitted
5 packet(s) received
[R2]ping 10.0.2.2
5 packet(s) transmitted
5 packet(s) received
Run the display ip routing-table command to check the OSPF routing table.
[R2]display ip routing-table
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 5
HCIP-Routing & Switching-IENP Lab Guide
Destinations : 19 Routes : 19
HUAWEI TECHNOLOGIES 6
HCIP-Routing & Switching-IENP Lab Guide
[R1]mpls
[R1-mpls]mpls ldp
[R2]mpls
[R2-mpls]mpls ldp
[R3]mpls
[R3-mpls]mpls ldp
[R1-Serial1/0/0]mpls
[R1-Serial1/0/0]mpls ldp
[R2-Serial1/0/0]mpls
[R2-Serial1/0/0]mpls ldp
[R2-Serial1/0/0]quit
[R2-Serial2/0/0]mpls
[R2-Serial2/0/0]mpls ldp
[R3-Serial2/0/0]mpls
HUAWEI TECHNOLOGIES 7
HCIP-Routing & Switching-IENP Lab Guide
[R3-Serial2/0/0]mpls ldp
After the configurations are complete, run the display mpls ldp session command
on Routers. You can see that the status of local LDP sessions between R1 and R2
and between R1 and R3 are Operational.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 8
HCIP-Routing & Switching-IENP Lab Guide
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
All LSRs are triggered to establish LDP LSPs based on the host route, which is the
default trigger policy.
Run the display mpls ldp lsp command on LSRs. All host routes are triggered to
establish LDP LSPs.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 9
HCIP-Routing & Switching-IENP Lab Guide
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 10
HCIP-Routing & Switching-IENP Lab Guide
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 11
HCIP-Routing & Switching-IENP Lab Guide
In most cases, the default trigger policy is used. The establishment of an LDP LSP is
triggered in Host mode.
Change the trigger policy to All on LSRs so that all static routes and IGP entries can
trigger the establishment of the LDP LSPs.
[R1]mpls
[R1-mpls]lsp-trigger all
[R2]mpls
[R2-mpls]lsp-trigger all
[R3]mpls
[R3-mpls]lsp-trigger all
After the configuration is complete, run the display mpls ldp lsp command on each
node to view the established LDP LSPs.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 12
HCIP-Routing & Switching-IENP Lab Guide
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 13
HCIP-Routing & Switching-IENP Lab Guide
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 14
HCIP-Routing & Switching-IENP Lab Guide
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 15
HCIP-Routing & Switching-IENP Lab Guide
After an inbound LDP policy is configured, R1 receives label mapping messages only
from R2 and establishes LSPs to R2, saving resources.
Run the display mpls lsp command on R1. Information about established LSPs is
displayed.
[R1]display mpls lsp
----------------------------------------------------------------------------
----------------------------------------------------------------------------
HUAWEI TECHNOLOGIES 16
HCIP-Routing & Switching-IENP Lab Guide
You can see that LSPs to R2 and R3 are established on R1. Configure the inbound
policy on R1 to allow only the routes to R2.
[R1]mpls ldp
[R1-mpls-ldp]quit
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----End
How can you configure R1 to receive Label Mapping messages from R1 to R3?
Device Configuration
<S1>display current-configuration
HUAWEI TECHNOLOGIES 17