Example for configuring automatic triggering of a request for a Label Mapping message in DoD mode
Networking Requirements
As shown in Figure 3-23, LSRA and LSRD function as PEs. Before establishing a PW, set up a remote LDP session between LSRA and LSRD to establish a public network tunnel. To save network resources, unnecessary IP addresses and MPLS entries need to be reduced.
Configuration Roadmap
To meet the preceding requirements, configure automatic triggering of a request for a Label Mapping message in DoD mode. The configuration roadmap is as follows:
Configure the label advertisement mode as DoD to reduce Label Mapping messages. Configure the DoD mode on interfaces of each LSR.
Configure LDP extension for inter-area LSP so that LDP searches for a route according to the longest match rule to establish an LDP LSP. Perform this configuration on LSRA and LSRD.
Configure LDP to automatically trigger a request for a Label Mapping message in DoD mode. Perform this configuration on LSRA and LSRD.
Procedure
- Configure IP addresses for interfaces.
# Configure LSRA. The configurations of LSRB, LSRC, and LSRD are similar to the configuration of LSRA, and are not mentioned here.
<Huawei> system-view [Huawei] sysname LSRA [LSRA] interface loopback 0 [LSRA-LoopBack0] ip address 10.10.1.1 32 [LSRA-LoopBack0] quit [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] ip address 10.1.1.1 24 [LSRA-GigabitEthernet1/0/0] quit
- Configure basic IS-IS functions for backbone devices. Configure
static routes for PEs and their neighbors.
# Configure basic IS-IS functions for LSRB and import a static route.
[LSRB] isis 1 [LSRB-isis-1] network-entity 10.0000.0000.0001.00 [LSRB-isis-1] import-route static [LSRB-isis-1] quit [LSRB] interface gigabitethernet 2/0/0 [LSRB-GigabitEthernet2/0/0] isis enable 1 [LSRB-GigabitEthernet2/0/0] quit [LSRB] interface loopback 0 [LSRB-LoopBack0] isis enable 1 [LSRB-LoopBack0] quit
# Configure basic IS-IS functions for LSRC and import a static route.
[LSRC] isis 1 [LSRC-isis-1] network-entity 10.0000.0000.0002.00 [LSRC-isis-1] import-route static [LSRC-isis-1] quit [LSRC] interface gigabitethernet 1/0/0 [LSRC-GigabitEthernet1/0/0] isis enable 1 [LSRC-GigabitEthernet1/0/0] quit [LSRC] interface loopback 0 [LSRC-LoopBack0] isis enable 1 [LSRC-LoopBack0] quit
# Configure a default route whose next hop IP address is 10.1.1.2 on LSRA.
[LSRA] ip route-static 0.0.0.0 0.0.0.0 10.1.1.2
# On LSRB, configure a static route to LSRA.
[LSRB] ip route-static 10.10.1.1 255.255.255.255 10.1.1.1
# On LSRC, configure a static route to LSRD.
[LSRC] ip route-static 10.10.1.4 255.255.255.255 10.1.3.2
# Configure a default route whose next hop IP address is 10.1.3.1 on LSRD.
[LSRD] ip route-static 0.0.0.0 0.0.0.0 10.1.3.1
# Run the display ip routing-table command on LSR to view the configure default route.
- Enable MPLS globally and on an interface, and MPLS LDP
on each node.
# Configure LSRA. The configurations of LSRB, LSRC, and LSRD are similar to the configuration of LSRA, and are not mentioned here.
[LSRA] mpls lsr-id 10.10.1.1 [LSRA] mpls [LSRA-mpls] quit [LSRA] mpls ldp [LSRA-mpls-ldp] quit [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] mpls [LSRA-GigabitEthernet1/0/0] mpls ldp [LSRA-GigabitEthernet1/0/0] quit
- Configure the label advertisement mode as DoD.
# Configure LSRA.
[LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] mpls ldp advertisement dod [LSRA-GigabitEthernet1/0/0] quit
# Configure LSRB.
[LSRB] interface gigabitethernet 1/0/0 [LSRB-GigabitEthernet1/0/0] mpls ldp advertisement dod [LSRB-GigabitEthernet1/0/0] quit
# Configure LSRC.
[LSRC] interface gigabitethernet 2/0/0 [LSRC-GigabitEthernet2/0/0] mpls ldp advertisement dod [LSRC-GigabitEthernet2/0/0] quit
# Configure LSRD.
[LSRD] interface gigabitethernet 2/0/0 [LSRD-GigabitEthernet2/0/0] mpls ldp advertisement dod [LSRD-GigabitEthernet2/0/0] quit
- Configure LDP extension for inter-area LSP.
# Run the longest-match command on LSRA to configure LDP to search for a route according to the longest match rule to establish an inter-area LDP LSP.
[LSRA] mpls ldp [LSRA-mpls-ldp] longest-match [LSRA-mpls-ldp] quit
# Run the longest-match command on LSRD to configure LDP to search for a route according to the longest match rule to establish an inter-area LDP LSP.
[LSRD] mpls ldp [LSRD-mpls-ldp] longest-match [LSRD-mpls-ldp] quit
- Configure a remote LDP session and enable LDP to automatically
trigger a request for a Label Mapping message in DoD mode.
# Configure LSRA.
[LSRA] mpls ldp remote-peer lsrd [LSRA-mpls-ldp-remote-lsrd] remote-ip 10.10.1.4 [LSRA-mpls-ldp-remote-lsrd] remote-ip auto-dod-request [LSRA-mpls-ldp-remote-lsrd] quit
# Configure LSRD.
[LSRD] mpls ldp remote-peer lsra [LSRD-mpls-ldp-remote-lsra] remote-ip 10.10.1.1 [LSRD-mpls-ldp-remote-lsra] remote-ip auto-dod-request [LSRD-mpls-ldp-remote-lsra] quit
- Verify the configuration.
# When the configurations are complete, run the display ip routing-table 10.10.1.4 command on LSRA to view route information.
[LSRA] display ip routing-table 10.10.1.4 Route Flags: R - relay, D - download to fib, T - to vpn-instance ------------------------------------------------------------------------------ Routing Table : Public Summary Count : 1 Destination/Mask Proto Pre Cost Flags NextHop Interface 0.0.0.0/0 Static 60 0 RD 10.1.1.2 GigabitEthernet1/0/0
The command output shows that only a default route exists in the routing table and the route 10.10.1.4 does not exist.
# Run the display mpls ldp lsp command on LSRA to view information about the established LSP.
[LSRA] display mpls ldp lsp LDP LSP Information ------------------------------------------------------------------------------- DestAddress/Mask In/OutLabel UpstreamPeer NextHop OutInterface ------------------------------------------------------------------------------- 10.10.1.1/32 3/NULL 10.10.1.4 127.0.0.1 InLoop0 10.10.1.4/32 NULL/1026 - 10.1.1.2 GE1/0/0 ------------------------------------------------------------------------------- TOTAL: 1 Normal LSP(s) Found. TOTAL: 0 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
The command output shows that the LSP with the destination address of 10.10.1.4 is established. LSRA has obtained a Label Mapping message of 10.10.1.4 from LSRB to establish an LSP.
[LSRA] display tunnel-info all * -> Allocated VC Token Tunnel ID Type Destination Token ---------------------------------------------------------------------- 0x10000001 lsp 10.10.1.4 0
The command output shows that an LSP between LSRA and LSRD is established.
Configuration Files
LSRA configuration file
# sysname LSRA # mpls lsr-id 10.10.1.1 mpls # mpls ldp longest-match # mpls ldp remote-peer lsrd remote-ip 10.10.1.4 remote-ip auto-dod-request # interface GigabitEthernet1/0/0 ip address 10.1.1.1 255.255.255.0 mpls mpls ldp mpls ldp advertisement dod # interface LoopBack0 ip address 10.10.1.1 255.255.255.255 # ip route-static 0.0.0.0 0.0.0.0 10.1.1.2 # return
LSRB configuration file
# sysname LSRB # mpls lsr-id 10.10.1.2 mpls # mpls ldp # isis 1 network-entity 10.0000.0000.0001.00 import-route static # interface GigabitEthernet1/0/0 ip address 10.1.1.2 255.255.255.0 mpls mpls ldp mpls ldp advertisement dod # interface GigabitEthernet2/0/0 ip address 10.1.2.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 # ip route-static 10.10.1.1 255.255.255.255 10.1.1.1 # return
LSRC configuration file
# sysname LSRC # mpls lsr-id 10.10.1.3 mpls # mpls ldp # isis 1 network-entity 10.0000.0000.0002.00 import-route static # interface GigabitEthernet1/0/0 ip address 10.1.2.2 255.255.255.0 isis enable 1 mpls mpls ldp # interface GigabitEthernet2/0/0 ip address 10.1.3.1 255.255.255.0 mpls mpls ldp mpls ldp advertisement dod # interface LoopBack0 ip address 10.10.1.3 255.255.255.255 isis enable 1 # ip route-static 10.10.1.4 255.255.255.255 10.1.3.2 # return
LSRD configuration file
# sysname LSRD # mpls lsr-id 10.10.1.4 mpls # mpls ldp longest-match # mpls ldp remote-peer lsra remote-ip 10.10.1.1 remote-ip auto-dod-request # interface GigabitEthernet2/0/0 ip address 10.1.3.2 255.255.255.0 mpls mpls ldp mpls ldp advertisement dod # interface LoopBack0 ip address 10.10.1.4 255.255.255.255 # ip route-static 0.0.0.0 0.0.0.0 10.1.3.1 # return