Example for Configuring IGP Shortcut to Direct Traffic to an MPLS TE Tunnel
Networking Requirements
An MPLS TE tunnel does not automatically direct traffic. To direct traffic to an MPLS TE tunnel, configure Interior Gateway Protocol (IGP) shortcut. IGP shortcut enables a device to use a TE tunnel as a logical link for IGP route calculation. You can set a proper metric for an MPLS TE tunnel to ensure that the route passing through the MPLS TE tunnel is preferred, allowing traffic to be directed to the MPLS TE tunnel.
As shown in Figure 4-47, devices use OSPF to communicate with each other. An MPLS TE tunnel is established from LSRA and LSRC. The MPLS TE tunnel passes through LSRB. The number marked on each link indicates the link cost. If LSRA has traffic destined for LSRE and LSRC, LSRA sends the traffic to GE2/0/0 based on the OSPF route selection result. If the link between LSRA and LSRD has 100 Mbit/s of bandwidth and LSRA requires 50 Mbit/s bandwidth to send traffic to LSRC and 60 Mbit/s bandwidth to send traffic to LSRE, the link between LSRA and LSRB is congested. Congestion on the link causes traffic transmission delay or packet loss.
To resolve this problem, configure IGP shortcut on the tunnel interface of LSRA to direct traffic destined for LSRC to the MPLS TE tunnel. By doing this, traffic is forwarded by GE1/0/0 and network congestion is prevented.
After IGP shortcut is configured on the tunnel interface of LSRA, LSRA does not advertise the MPLS TE tunnel to its peers as a route. The MPLS TE tunnel is used only for local route calculation.
Configuration Roadmap
The configuration roadmap is as follows:
Assign an IP address to each interface, configure OSPF to ensure that there are reachable routes between LSRs, and configure the OSPF cost.
On LSRA, create an MPLS TE tunnel over the path LSRA -> LSRB -> LSRC. This example uses RSVP-TE to establish a dynamic MPLS TE tunnel. Configure an ID for each LSR, enable MPLS TE, RSVP-TE, and CSPF on each node and interface, and enable OSPF TE. On the ingress node of the primary tunnel, create a tunnel interface, and specify the IP address, tunneling protocol, destination IP address, tunnel ID, and dynamic signaling protocol RSVP-TE for the tunnel interface.
Enable IGP shortcut on the TE tunnel interface of LSRA and configure an IGP metric for the TE tunnel.
Procedure
- Assign an IP address to each interface, configure OSPF,
and set the OSPF cost.
# Configure LSRA.
<Huawei> system-view [Huawei] sysname LSRA [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] ip address 172.1.1.1 255.255.255.0 [LSRA-GigabitEthernet1/0/0] ospf cost 15 [LSRA-GigabitEthernet1/0/0] quit [LSRA] interface gigabitethernet 2/0/0 [LSRA-GigabitEthernet2/0/0] ip address 172.4.1.1 255.255.255.0 [LSRA-GigabitEthernet2/0/0] ospf cost 10 [LSRA-GigabitEthernet2/0/0] quit [LSRA] interface loopback 1 [LSRA-LoopBack1] ip address 1.1.1.9 255.255.255.255 [LSRA-LoopBack1] quit [LSRA] ospf 1 [LSRA-ospf-1] area 0 [LSRA-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0 [LSRA-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255 [LSRA-ospf-1-area-0.0.0.0] network 172.4.1.0 0.0.0.255 [LSRA-ospf-1-area-0.0.0.0] quit [LSRA-ospf-1] quit
# Configure IP addresses for interfaces of LSRB, LSRC, LSRD, and LSRE according to Figure 4-47. The configurations of LSRB, LSRC, LSRD, and LSRE are similar to the configuration of LSRA, and are not mentioned here.
After the configurations are complete, run the display ip routing-table command on LSRA, LSRB, and LSRC. You can see that PE1 and PE2 have learned the routes to Loopback1 of each other.
- Configure basic MPLS functions and enable MPLS TE, RSVP-TE,
and CSPF.
To create a TE tunnel from LSRA to LSRC, perform the following configurations on LSRA, LSRB, and LSRC.
# Configure LSRA.
[LSRA] mpls lsr-id 1.1.1.9 [LSRA] mpls [LSRA-mpls] mpls te [LSRA-mpls] mpls rsvp-te [LSRA-mpls] mpls te cspf [LSRA-mpls] quit [LSRA] interface gigabitethernet 1/0/0 [LSRA-GigabitEthernet1/0/0] mpls [LSRA-GigabitEthernet1/0/0] mpls te [LSRA-GigabitEthernet1/0/0] mpls rsvp-te [LSRA-GigabitEthernet1/0/0] quit
The configurations of LSRB and LSRC are similar to the configuration of LSRA, and are not mentioned here. CSPF only needs to be configured on the ingress node of the primary tunnel.
- Configure OSPF TE.
To create a TE tunnel from LSRA to LSRC, perform the following configurations on LSRA, LSRB, and LSRC.
# Configure LSRA.
[LSRA] ospf [LSRA-ospf-1] opaque-capability enable [LSRA-ospf-1] area 0 [LSRA-ospf-1-area-0.0.0.0] mpls-te enable [LSRA-ospf-1-area-0.0.0.0] quit [LSRA-ospf-1] quit
The configurations of LSRB and LSRC are similar to the configuration of LSRA, and are not mentioned here.
- Create an MPLS TE tunnel.
# Specify an explicit path for a TE tunnel.
[LSRA] explicit-path pri-path [LSRA-explicit-path-pri-path] next hop 172.1.1.2 [LSRA-explicit-path-pri-path] next hop 172.2.1.2 [LSRA-explicit-path-pri-path] next hop 3.3.3.9 [LSRA-explicit-path-pri-path] quit
# Create a tunnel interface on LSRA.
[LSRA] interface tunnel 0/0/1 [LSRA-Tunnel0/0/1] ip address unnumbered interface loopback 1 [LSRA-Tunnel0/0/1] tunnel-protocol mpls te [LSRA-Tunnel0/0/1] destination 3.3.3.9 [LSRA-Tunnel0/0/1] mpls te tunnel-id 100 [LSRA-Tunnel0/0/1] mpls te path explicit-path pri-path [LSRA-Tunnel0/0/1] mpls te commit [LSRA-Tunnel0/0/1] quit
- Configure IGP shortcut.
Enable IGP shortcut on the TE tunnel interface of LSRA and set the IGP metric to 10 for the TE tunnel.
# Configure LSRA.
[LSRA] interface tunnel 0/0/1 [LSRA-Tunnel0/0/1] mpls te igp shortcut ospf [LSRA-Tunnel0/0/1] mpls te igp metric absolute 10 [LSRA-Tunnel0/0/1] mpls te commit [LSRA-Tunnel0/0/1] quit [LSRA] ospf 1 [LSRA-ospf-1] enable traffic-adjustment [LSRA-ospf-1] quit
- Verify the configuration.
# After the configurations are complete, run the display ip routing-table 3.3.3.9 command on LSRA. You can see that the next hop address of the route destined for LSRC (3.3.3.9) is 1.1.1.9 and the outbound interface of this route is Tunnel0/0/1. The traffic destined for LSRC has been directed to the MPLS TE tunnel.
[LSRA] display ip routing-table 3.3.3.9 Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Table : Public Summary Count : 1 Destination/Mask Proto Pre Cost Flags NextHop Interface 3.3.3.9/32 OSPF 10 10 D 1.1.1.9 Tunnel0/0/1
Configuration Files
LSRA configuration file
# sysname LSRA # mpls lsr-id 1.1.1.9 mpls mpls te mpls rsvp-te mpls te cspf # explicit-path pri-path next hop 172.1.1.2 next hop 172.2.1.2 next hop 3.3.3.9 # interface GigabitEthernet1/0/0 ip address 172.1.1.1 255.255.255.0 ospf cost 15 mpls mpls te mpls rsvp-te # interface GigabitEthernet2/0/0 ip address 172.4.1.1 255.255.255.0 ospf cost 10 # interface LoopBack1 ip address 1.1.1.9 255.255.255.255 # interface Tunnel0/0/1 ip address unnumbered interface LoopBack1 tunnel-protocol mpls te destination 3.3.3.9 mpls te tunnel-id 100 mpls te path explicit-path pri-path mpls te igp shortcut ospf mpls te igp metric absolute 10 mpls te commit # ospf 1 opaque-capability enable enable traffic-adjustment area 0.0.0.0 network 1.1.1.9 0.0.0.0 network 172.1.1.0 0.0.0.255 network 172.4.1.0 0.0.0.255 mpls-te enable # return
LSRB configuration file
# sysname LSRB # mpls lsr-id 2.2.2.9 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/0 ip address 172.1.1.2 255.255.255.0 ospf cost 15 mpls mpls te mpls rsvp-te # interface GigabitEthernet2/0/0 ip address 172.2.1.1 255.255.255.0 ospf cost 10 mpls mpls te mpls rsvp-te # interface LoopBack1 ip address 2.2.2.9 255.255.255.255 # ospf 1 opaque-capability enable area 0.0.0.0 network 2.2.2.9 0.0.0.0 network 172.1.1.0 0.0.0.255 network 172.2.1.0 0.0.0.255 mpls-te enable # return
LSRC configuration file
# sysname LSRC # mpls lsr-id 3.3.3.9 mpls mpls te mpls rsvp-te # interface GigabitEthernet1/0/0 ip address 172.2.1.2 255.255.255.0 ospf cost 10 mpls mpls te mpls rsvp-te # interface GigabitEthernet2/0/0 ip address 172.3.1.1 255.255.255.0 ospf cost 10 # interface LoopBack1 ip address 3.3.3.9 255.255.255.255 # ospf 1 opaque-capability enable area 0.0.0.0 network 3.3.3.9 0.0.0.0 network 172.2.1.0 0.0.0.255 network 172.3.1.0 0.0.0.255 mpls-te enable # return
LSRD configuration file
# sysname LSRD # interface GigabitEthernet1/0/0 ip address 172.3.1.2 255.255.255.0 ospf cost 10 # interface GigabitEthernet2/0/0 ip address 172.4.1.2 255.255.255.0 ospf cost 10 # interface GigabitEthernet3/0/0 ip address 172.5.1.1 255.255.255.0 ospf cost 10 # ospf 1 area 0.0.0.0 network 172.3.1.0 0.0.0.255 network 172.4.1.0 0.0.0.255 network 172.5.1.0 0.0.0.255 # return
LSRE configuration file
# sysname LSRE # interface GigabitEthernet1/0/0 ip address 172.5.1.2 255.255.255.0 ospf cost 10 # ospf 1 area 0.0.0.0 network 172.5.1.0 0.0.0.255 # return