tunnel source [intf|ip]
Specifies the source interface or IP address for a tunnel interface, used to define the tunnel's source address for VPN or overlay networks.
tunnel source [intf|ip]When to Use This Command
- Configuring the source interface for a GRE tunnel between two routers over a WAN link.
- Setting a loopback interface as the tunnel source for stability in a DMVPN deployment.
- Using a specific IP address as the tunnel source when multiple IPs exist on an interface.
- Changing the tunnel source during maintenance to redirect traffic through a backup interface.
Command Examples
Setting tunnel source to an interface
tunnel source GigabitEthernet0/1Router(config-if)# tunnel source GigabitEthernet0/1 Router(config-if)# end Router# show interfaces tunnel 0 Tunnel0 is up, line protocol is up Hardware is Tunnel Internet address is 10.0.0.1/30 Tunnel source 192.168.1.1 (GigabitEthernet0/1), destination 192.168.2.1 Tunnel protocol/transport GRE/IP ...
The command sets the tunnel source to the IP address of GigabitEthernet0/1 (192.168.1.1). The output shows the tunnel interface details, including the source interface and IP.
Setting tunnel source to a specific IP address
tunnel source 10.0.0.1Router(config-if)# tunnel source 10.0.0.1 Router(config-if)# end Router# show interfaces tunnel 0 Tunnel0 is up, line protocol is up Hardware is Tunnel Internet address is 10.0.0.2/30 Tunnel source 10.0.0.1, destination 10.0.0.2 Tunnel protocol/transport GRE/IP ...
The command sets the tunnel source to the IP address 10.0.0.1 directly. The output confirms the source IP is used without referencing an interface.
Understanding the Output
The 'show interfaces tunnel' command displays tunnel source information. The 'Tunnel source' field shows the configured source IP address and optionally the interface name in parentheses. A valid source IP should be reachable and belong to the router. If the source is down or misconfigured, the tunnel may not come up. Watch for mismatched source/destination IPs or unreachable sources.
CCNA Exam Tips
CCNA exam tip: The tunnel source must be an IP that is reachable from the remote tunnel destination; often a loopback is used for stability.
CCNA exam tip: If you specify an interface, the router uses the primary IP of that interface; if the interface goes down, the tunnel goes down.
CCNA exam tip: You cannot use the same tunnel source for multiple tunnels unless they have different destinations.
CCNA exam tip: The tunnel source command is configured in interface configuration mode for the tunnel interface.
Common Mistakes
Mistake 1: Using an unreachable or non-existent IP as the tunnel source, causing the tunnel to never come up.
Mistake 2: Forgetting to configure the tunnel destination, which is required for point-to-point tunnels.
Mistake 3: Setting the tunnel source to an interface that is down or has no IP address, resulting in tunnel failure.
Related Commands
Practice for the CCNA 200-301
Test your knowledge with hundreds of CCNA practice questions covering all exam domains.
Practice CCNA Questions