Example for Disabling Devices from Distributing LDP Labels to Remote Peers
Networking Requirements
As shown in Figure 3-26, PE1, PE2, and PE3 are connected through P, and IS-IS runs among devices. PE1 uses the public network LSP to establish remote LDP sessions with PE2 and PE3 to transmit private network label information. Dynamic PWs are established between PE1 and PE2, between PE1 and PE3.
On an MPLS network, LDP transmits private network label and distributes common LDP labels to remote peers. Multiple remote LDP peers on the network lead to a large number of null labels, which occupies many system resources. The label distribution to remote LDP peers needs to be controlled to save system resources.
Configuration Roadmap
To meet the preceding requirements, disable devices from distributing LDP labels to remote peers. The configuration roadmap is as follows:
Disable devices from distributing LDP labels to remote peers on PEs to prohibit them from distributing common LDP labels to each other.
Procedure
- Configure IP addresses for interfaces.
# Configure PE1. The configurations of P, PE2, and PE3 are similar to the configuration of PE1, and are not mentioned here.
<Huawei> system-view [Huawei] sysname PE1 [PE1] interface loopback0 [PE1-LoopBack0] ip address 10.10.1.1 32 [PE1-LoopBack0] quit [PE1] interface gigabitethernet 1/0/1 [PE1-GigabitEthernet1/0/1] ip address 10.1.1.1 24 [PE1-GigabitEthernet1/0/1] quit
- Configure IS-IS to advertise the network segments connecting
to interfaces on each node and to advertise the routes of hosts with
LSR IDs.
# Configure PE1.
[PE1] isis 1 [PE1-isis-1] is-level level-2 [PE1-isis-1] network-entity 86.4501.0010.0100.0001.00 [PE1-isis-1] quit [PE1] interface gigabitethernet 1/0/1 [PE1-GigabitEthernet1/0/1] isis enable 1 [PE1-GigabitEthernet1/0/1] quit [PE1] interface loopback 0 [PE1-LoopBack0] isis enable 1 [PE1-LoopBack0] quit
# Configure P.
[P] isis 1 [P-isis-1] is-level level-2 [P-isis-1] network-entity 86.4501.0030.0300.0003.00 [P-isis-1] quit [P] interface gigabitethernet 1/0/1 [P-GigabitEthernet1/0/1] isis enable 1 [P-GigabitEthernet1/0/1] quit [P] interface gigabitethernet 1/0/3 [P-GigabitEthernet1/0/3] isis enable 1 [P-GigabitEthernet1/0/3] quit [P] interface gigabitethernet 1/0/2 [P-GigabitEthernet1/0/2] isis enable 1 [P-GigabitEthernet1/0/2] quit [P] interface loopback 0 [P-LoopBack0] isis enable 1 [P-LoopBack0] quit
# Configure PE2.
[PE2] isis 1 [PE2-isis-1] is-level level-2 [PE2-isis-1] network-entity 86.4501.0050.0500.0005.00 [PE2-isis-1] quit [PE2] interface gigabitethernet 1/0/1 [PE2-GigabitEthernet1/0/1] isis enable 1 [PE2-GigabitEthernet1/0/1] quit [PE2] interface loopback 0 [PE2-LoopBack0] isis enable 1 [PE2-LoopBack0] quit
# Configure PE3.
[PE3] isis 1 [PE3-isis-1] is-level level-2 [PE3-isis-1] network-entity 86.4501.0040.0400.0004.00 [PE3-isis-1] quit [PE3] interface gigabitethernet 1/0/1 [PE3-GigabitEthernet1/0/1] isis enable 1 [PE3-GigabitEthernet1/0/1] quit [PE3] interface loopback 0 [PE3-LoopBack0] isis enable 1 [PE3-LoopBack0] quit
- Enable MPLS and MPLS LDP on each node and each interface.
# Configure PE1.
[PE1] mpls lsr-id 10.10.1.1 [PE1] mpls [PE1-mpls] quit [PE1] mpls ldp [PE1-mpls-ldp] quit [PE1] interface gigabitethernet 1/0/1 [PE1-GigabitEthernet1/0/1] mpls [PE1-GigabitEthernet1/0/1] mpls ldp [PE1-GigabitEthernet1/0/1] quit
# Configure P.
[P] mpls lsr-id 10.10.1.2 [P] mpls [P-mpls] quit [P] mpls ldp [P-mpls-ldp] quit [P] interface gigabitethernet 1/0/1 [P-GigabitEthernet1/0/1] mpls [P-GigabitEthernet1/0/1] mpls ldp [P-GigabitEthernet1/0/1] quit [P] interface gigabitethernet 1/0/2 [P-GigabitEthernet1/0/2] mpls [P-GigabitEthernet1/0/2] mpls ldp [P-GigabitEthernet1/0/2] quit [P] interface gigabitethernet 1/0/3 [P-GigabitEthernet1/0/3] mpls [P-GigabitEthernet1/0/3] mpls ldp [P-GigabitEthernet1/0/3] quit
# Configure PE2.
[PE2] mpls lsr-id 10.10.1.5 [PE2] mpls [PE2-mpls] quit [PE2] mpls ldp [PE2-mpls-ldp] quit [PE2] interface gigabitethernet 1/0/1 [PE2-GigabitEthernet1/0/1] mpls [PE2-GigabitEthernet1/0/1] mpls ldp [PE2-GigabitEthernet1/0/1] quit
# Configure PE3.
[PE3] mpls lsr-id 10.10.1.4 [PE3] mpls [PE3-mpls] quit [PE3] mpls ldp [PE3-mpls-ldp] quit [PE3] interface gigabitethernet 1/0/1 [PE3-GigabitEthernet1/0/1] mpls [PE3-GigabitEthernet1/0/1] mpls ldp [PE3-GigabitEthernet1/0/1] quit
When the configurations are complete, LDP sessions and public network LSPs are established between neighboring nodes. Run the display mpls ldp session command on each node. The command output shows that LDP session status is Operational. PE1 is used as an example
[PE1] display mpls ldp session LDP Session(s) in Public Network Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM) A '*' before a session means the session is being deleted. ------------------------------------------------------------------------------ PeerID Status LAM SsnRole SsnAge KASent/Rcv ------------------------------------------------------------------------------ 10.10.1.2:0 Operational DU Passive 0000:00:01 6/6 ------------------------------------------------------------------------------ TOTAL: 1 session(s) Found.
Run the display mpls ldp lsp command to check the LSP setup result and label distribution.
[PE1] display mpls ldp lsp LDP LSP Information ------------------------------------------------------------------------------- DestAddress/Mask In/OutLabel UpstreamPeer NextHop OutInterface ------------------------------------------------------------------------------- 10.10.1.1/32 3/NULL 10.10.1.2 127.0.0.1 InLoop0 *10.10.1.1/32 Liberal/1025 DS/10.10.1.2 10.10.1.2/32 NULL/3 - 10.1.1.2 GE1/0/1 10.10.1.2/32 1024/3 10.10.1.2 10.1.1.2 GE1/0/1 10.10.1.4/32 NULL/1024 - 10.1.1.2 GE1/0/1 10.10.1.4/32 1025/1024 10.10.1.2 10.1.1.2 GE1/0/1 10.10.1.5/32 NULL/1026 - 10.1.1.2 GE1/0/1 10.10.1.5/32 1022/1026 10.10.1.2 10.1.1.2 GE1/0/1 ------------------------------------------------------------------------------- TOTAL: 7 Normal LSP(s) Found. TOTAL: 1 Liberal LSP(s) Found. TOTAL: 0 Frr LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale A '*' before a UpstreamPeer means the session is stale A '*' before a DS means the session is stale A '*' before a NextHop means the LSP is FRR LSP
- Set up the remote MPLS LDP peer relationship between PEs
at both ends of the PW.
# Configure PE1.
[PE1] mpls ldp remote-peer PE2 [PE1-mpls-ldp-remote-pe2] remote-ip 10.10.1.5 [PE1-mpls-ldp-remote-pe2] quit [PE1] mpls ldp remote-peer PE3 [PE1-mpls-ldp-remote-pe3] remote-ip 10.10.1.4 [PE1-mpls-ldp-remote-pe3] quit
# Configure PE2.
[PE2] mpls ldp remote-peer PE1 [PE2-mpls-ldp-remote-pe1] remote-ip 10.10.1.1 [PE2-mpls-ldp-remote-pe1] quit
# Configure PE3.
[PE3] mpls ldp remote-peer PE1 [PE3-mpls-ldp-remote-pe1] remote-ip 10.10.1.1 [PE3-mpls-ldp-remote-pe1] quit
When the configurations are complete, remote LDP sessions are established between neighboring nodes. Run the display mpls ldp session command on each node. The command output shows that LDP session status is Operational. PE1 is used as an example
[PE1]display mpls ldp session LDP Session(s) in Public Network Codes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM) A '*' before a session means the session is being deleted. ------------------------------------------------------------------------------ PeerID Status LAM SsnRole SsnAge KASent/Rcv ------------------------------------------------------------------------------ 10.10.1.2:0 Operational DU Passive 0000:00:18 75/75 10.10.1.4:0 Operational DU Passive 0000:00:10 43/43 10.10.1.5:0 Operational DU Passive 0000:00:12 50/50 ------------------------------------------------------------------------------ TOTAL: 3 session(s) Found.
Run the display mpls ldp lsp command to view the label distribution. The command output shows that PEs have distributed liberal labels to their own neighbors. These labels, however, are idle and occupy many system resources in MPLS L2VPN applications that use PWE3 technology.
[PE1] display mpls ldp lsp LDP LSP Information ------------------------------------------------------------------------------- DestAddress/Mask In/OutLabel UpstreamPeer NextHop OutInterface ------------------------------------------------------------------------------- 10.10.1.1/32 3/NULL 10.10.1.2 127.0.0.1 InLoop0 10.10.1.1/32 3/NULL 10.10.1.5 127.0.0.1 InLoop0 10.10.1.1/32 3/NULL 10.10.1.4 127.0.0.1 InLoop0 *10.10.1.1/32 Liberal/1025 DS/10.10.1.2 *10.10.1.1/32 Liberal/1024 DS/10.10.1.5 *10.10.1.1/32 Liberal/1025 DS/10.10.1.4 10.10.1.2/32 NULL/3 - 10.1.1.2 GE1/0/1 10.10.1.2/32 1024/3 10.10.1.2 10.1.1.2 GE1/0/1 10.10.1.2/32 1024/3 10.10.1.5 10.1.1.2 GE1/0/1 10.10.1.2/32 1024/3 10.10.1.4 10.1.1.2 GE1/0/1 10.10.1.4/32 NULL/1024 - 10.1.1.2 GE1/0/1 10.10.1.4/32 1025/1024 10.10.1.2 10.1.1.2 GE1/0/1 10.10.1.4/32 1025/1024 10.10.1.5 10.1.1.2 GE1/0/1 10.10.1.4/32 1025/1024 10.10.1.4 10.1.1.2 GE1/0/1 *10.10.1.4/32 Liberal/1026 DS/10.10.1.5 *10.10.1.4/32 Liberal/3 DS/10.10.1.4 10.10.1.5/32 NULL/1026 - 10.1.1.2 GE1/0/1 10.10.1.5/32 1022/1026 10.10.1.2 10.1.1.2 GE1/0/1 10.10.1.5/32 1022/1026 10.10.1.5 10.1.1.2 GE1/0/1 10.10.1.5/32 1022/1026 10.10.1.4 10.1.1.2 GE1/0/1 *10.10.1.5/32 Liberal/3 DS/10.10.1.5 *10.10.1.5/32 Liberal/1026 DS/10.10.1.4 ------------------------------------------------------------------------------- TOTAL: 15 Normal LSP(s) Found. TOTAL: 9 Liberal LSP(s) Found. TOTAL: 0 Frr LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale A '*' before a UpstreamPeer means the session is stale A '*' before a DS means the session is stale A '*' before a NextHop means the LSP is FRR LSP
- Disable devices from distributing LDP labels to remote
peers on PEs at both ends of a PW.
# Configure PE1.
[PE1] mpls ldp remote-peer PE2 [PE1-mpls-ldp-remote-pe2] remote-ip 10.10.1.5 pwe3 [PE1-mpls-ldp-remote-pe2] quit [PE1] mpls ldp remote-peer PE3 [PE1-mpls-ldp-remote-pe3] remote-ip 10.10.1.4 pwe3 [PE1-mpls-ldp-remote-pe3] quit
# Configure PE2.
[PE2] mpls ldp remote-peer PE1 [PE2-mpls-ldp-remote-pe1] remote-ip 10.10.1.1 pwe3 [PE2-mpls-ldp-remote-pe1] quit
# Configure PE3.
[PE3] mpls ldp remote-peer PE1 [PE3-mpls-ldp-remote-pe1] remote-ip 10.10.1.1 pwe3 [PE3-mpls-ldp-remote-pe1] quit
When the configurations are complete, PEs do not distribute labels to remote LDP peers. Run the display mpls ldp lsp command on each node to view the established LSP after devices from distributing LDP labels to remote peers is disabled. PE1 is used as an example.
[PE1] display mpls ldp lsp LDP LSP Information ------------------------------------------------------------------------------- DestAddress/Mask In/OutLabel UpstreamPeer NextHop OutInterface ------------------------------------------------------------------------------- 10.10.1.1/32 3/NULL 10.10.1.2 127.0.0.1 InLoop0 *10.10.1.1/32 Liberal/1025 DS/10.10.1.2 10.10.1.2/32 NULL/3 - 10.1.1.2 GE1/0/1 10.10.1.2/32 1024/3 10.10.1.2 10.1.1.2 GE1/0/1 10.10.1.4/32 NULL/1024 - 10.1.1.2 GE1/0/1 10.10.1.4/32 1025/1024 10.10.1.2 10.1.1.2 GE1/0/1 10.10.1.5/32 NULL/1026 - 10.1.1.2 GE1/0/1 10.10.1.5/32 1022/1026 10.10.1.2 10.1.1.2 GE1/0/1 ------------------------------------------------------------------------------- TOTAL: 7 Normal LSP(s) Found. TOTAL: 1 Liberal LSP(s) Found. TOTAL: 0 Frr LSP(s) Found. A '*' before an LSP means the LSP is not established A '*' before a Label means the USCB or DSCB is stale A '*' before a UpstreamPeer means the session is stale A '*' before a DS means the session is stale A '*' before a NextHop means the LSP is FRR LSP
A large number of idle remote labels and LSPs are disabled. The LSPs are established based on the local LDP sessions.
Configuration Files
PE1 configuration file
# sysname PE1 # mpls lsr-id 10.10.1.1 mpls # mpls ldp # mpls ldp remote-peer pe2 remote-ip 10.10.1.5 pwe3 # mpls ldp remote-peer pe3 remote-ip 10.10.1.4 pwe3 # isis 1 is-level level-2 network-entity 86.4501.0010.0100.0001.00 # interface GigabitEthernet1/0/1 ip address 10.1.1.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.1 255.255.255.255 isis enable 1 # return
P configuration file
# sysname P # mpls lsr-id 10.10.1.2 mpls # mpls ldp # isis 1 is-level level-2 network-entity 86.4501.0030.0300.0003.00 # interface GigabitEthernet1/0/1 ip address 10.1.1.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet1/0/3 ip address 10.2.1.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet1/0/2 ip address 10.3.1.1 255.255.255.0 isis enable 1 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.2 255.255.255.255 isis enable 1 # return
PE2 configuration file
# sysname PE2 # mpls lsr-id 10.10.1.5 mpls # mpls ldp # mpls ldp remote-peer pe1 remote-ip 10.10.1.1 pwe3 # isis 1 is-level level-2 network-entity 86.4501.0050.0500.0005.00 # interface GigabitEthernet1/0/1 ip address 10.2.1.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.5 255.255.255.255 isis enable 1 # return
PE3 configuration file
# sysname PE3 # mpls lsr-id 10.10.1.4 mpls # mpls ldp # mpls ldp remote-peer pe1 remote-ip 10.10.1.1 pwe3 # isis 1 is-level level-2 network-entity 86.4501.0040.0400.0004.00 # interface GigabitEthernet1/0/1 ip address 10.3.1.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface LoopBack0 ip address 10.10.1.4 255.255.255.255 isis enable 1 # return