Prerequisites for Tunnel Route Selection
Tunnel interfaces are configured.
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
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.
Tunnel interfaces are configured.
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.
interface tunnel 0
tunnel mode gre multipoint
tunnel route-via tunnel 1
interface tunnel 1
tunnel mode gre ip
interface tunnel 0
tunnel mode gre multipoint
tunnel route-via tunnel 1
interface tunnel 1
tunnel mode gre multipoint
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.
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.
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable Example:
|
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
|
Enters global configuration mode. |
Step 3 |
interface tunnel interface-number Example:
|
Configures a tunnel interface and enters interface configuration mode. |
Step 4 |
tunnel route-via interface-type interface-number {mandatory | preferred } Example:
|
Specifies the outgoing interface to be used by the tunnel transport. |
Step 5 |
end Example:
|
Returns to privileged EXEC mode. |
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
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]
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
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
|
Interface commands |
Cisco IOS Interface and Hardware Component Command Reference |
Configuration commands |
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. |
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.
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 . |