Tunnel Route Selection

The Tunnel Route Selection feature allows the tunnel transport to be routed using a subset of the routing table. When there are equal-cost routes to a tunnel destination, normal tunnel transport behavior is to use one of the available routes chosen at random. The Tunnel Route Selection feature allows the explicit configuration of the outgoing interface for the tunnel transport.

Prerequisites for Tunnel Route Selection

Tunnel interfaces are configured.

Restrictions for Tunnel Route Selection

This feature is supported in the following tunnel modes only:

  • Generic Routing Encapsulation (GRE) IP

  • GRE Multipoint

  • IP in IP

  • Mobile User Datagram Protocol (UDP)

This feature is not supported on a tunnel when the tunnel transport is a GRE Multipoint tunnel.

Supported Configuration


interface tunnel 0
  tunnel mode gre multipoint
  tunnel route-via tunnel 1
interface tunnel 1
   tunnel mode gre ip

Unsupported Configuration


interface tunnel 0
  tunnel mode gre multipoint
  tunnel route-via tunnel 1
interface tunnel 1
  tunnel mode gre multipoint

Information About Tunnel Route Selection

Tunnel Transport Behavior

The Tunnel Route Selection feature allows the tunnel transport to be routed using a subset of the routing table by specifying the outgoing interface of the tunnel transport.

The Tunnel Route Selection feature is not the same as an implementation of policy-based routing for the tunnel transport. The Tunnel Route Selection feature will forward traffic using only a subset of the route table, and it cannot introduce routing loops into the network.

The figure below compares default tunnel behavior with the Tunnel Route Selection behavior.

Figure 1. Tunnel Route Selection Traffic

How to Configure Tunnel Route Selection

Configuring Tunnel Route Selection

Perform the following steps to specify the outgoing interface of the tunnel transport to route the tunnel transport using a subset of the routing table.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. interface tunnel interface-number
  4. tunnel route-via interface-type interface-number {mandatory | preferred }
  5. end

DETAILED STEPS

  Command or Action Purpose
Step 1

enable

Example:


Router> enable

Enables privileged EXEC mode.

  • Enter your password if prompted.

Step 2

configure terminal

Example:


Router# configure terminal

Enters global configuration mode.

Step 3

interface tunnel interface-number

Example:


Router(config)# interface tunnel 0

Configures a tunnel interface and enters interface configuration mode.

Step 4

tunnel route-via interface-type interface-number {mandatory | preferred }

Example:


Router(config-if)# tunnel route-via ethernet0 mandatory

Specifies the outgoing interface to be used by the tunnel transport.

Step 5

end

Example:


Router(config-if)# end

Returns to privileged EXEC mode.

Troubleshooting Tips

To troubleshoot your configuration, use the debug tunnel route-via command in privileged EXEC mode. The following is sample output from the debug tunnel route-via command after the tunnel route-via command was used to route the tunnel transport explicitly using a subset of the routing table.


Router# debug tunnel route-via
Tunnel route-via debugging is on
Router#
*May 23 08:40:53.707: TUN-VIA: Tunnel0 candidate route-via Ethernet0/0, next hop 10.73.2.1
*May 23 08:40:53.707: TUN-VIA: Tunnel0 route-via action is forward
*May 23 08:41:03.719: TUN-VIA: Tunnel0 candidate route-via Ethernet0/0, next hop 10.73.2.1
*May 23 08:41:03.719: TUN-VIA: Tunnel0 route-via action is forward
Router# undebug tunnel route-via
Tunnel route-via debugging is off

What to Do Next

You can verify the tunnel route selection configuration. To verify your configuration, use the show interfaces tunnel command in privileged EXEC mode. The following example shows that the tunnel transport is routed using a subset of the routing table by specifying the outgoing interface of the tunnel transport.


Router# show running-config interface tunnel 0
Building configuration...
Current configuration : 147 bytes
!
interface Tunnel0
 ip unnumbered Loopback0
 tunnel source Loopback0
 tunnel destination 10.73.0.102
 tunnel route-via Ethernet0 preferred
end
Router# show interfaces tunnel 0 | include route-via

Tunnel route-via feature is on [Ethernet0, preferred]

Configuration Examples for Tunnel Route Selection

Example Configuring Tunnel Route Selection

The following example shows Tunnel 0 configured to use Ethernet interface 0 as its preferred outgoing transport interface. Traffic that exits the router using the tunnel 0 interface will be sent out of Ethernet interface 0 if there is a route to the tunnel destination out of Ethernet interface 0. If there is no route out of Ethernet interface 0, the traffic will be forwarded as if the Tunnel Route Selection feature were not configured.

If the tunnel route-via interface-type interface-number mandatory command is configured, and there is no route to the tunnel destination using that interface, a point-to-point tunnel interface will go into a down state.


Router> enable
Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# interface tunnel 0
Router(config-if)# tunnel route-via ethernet0 preferred
Router(config-if)# end
Router# show running-config interface tunnel 0
Building configuration...
Current configuration : 147 bytes
!
interface Tunnel0
 ip unnumbered Loopback0
 tunnel source Loopback0
 tunnel destination 10.73.0.102
 tunnel route-via Ethernet0 preferred
end

Additional References

Related Documents

Related Topic

Document Title

Cisco IOS commands

Cisco IOS Master Command List, All Releases

Interface commands

Cisco IOS Interface and Hardware Component Command Reference

Configuration commands

Cisco IOS Configuration Fundamentals Command Reference

Technical Assistance

Description

Link

The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password.

http://www.cisco.com/cisco/web/support/index.html

Feature Information for Tunnel Route Selection

The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Table 1. Feature Information for Tunnel Route Selection

Feature Name

Releases

Feature Information

Tunnel Route Selection

12.4(11)T

15.0(1)M

Cisco IOS Release 3.9S

The Tunnel Route Selection feature allows the tunnel transport to be routed using a subset of the routing table. When there are equal-cost routes to a tunnel destination, normal tunnel transport behavior is to use one of the available routes chosen at random. The Tunnel Route Selection feature allows the explicit configuration of the outgoing interface for the tunnel transport.

The following commands were introduced or modified: debug tunnel route-via, tunnel route-via, show interfaces tunnel .