Setting the Source Address for Telnet


You want to force your router to use a particular IP source address when making outbound Telnet connections.


To configure a single common IP source address for all outbound Telnet session, use the following configuration command:

Router1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#ip telnet source-interface loopback0

You can also set the IP source address for individual outbound Telnet sessions on the command line:

Router1#telnet /source-interface loopback0



By default, the router uses the IP address of the closest interface to the destination as the source address when it makes an outbound Telnet session. Network administrators frequently want to use an address other than the closest to the destination, however. For instance, access-lists or route filters may prevent the default source address from reaching its destination. Selecting a particular source IP address of a Telnet session can also help in troubleshooting network problems.

Cisco provides two methods for setting the source IP address of Telnet sessions, one global and one session specific. The global configuration example forces all Telnet sessions to use the IP address of the configured interface as its source address. However, if the configured interface has no IP address, or is operationally down, then the router will resort to its default behavior of using the closest interface IP address.

The session specific method allows the administrator to select an appropriate IP source address on a per session basis. Again, if the configured interface has no IP address or is operationally down, then the router will resort to its default behavior. Also, note that the individual method of setting the Telnet source address supercedes the global setting.

Router Configuration and File Management

Router Management

User Access and Privilege Levels


IP Routing





Frame Relay

Handling Queuing and Congestion

Tunnels and VPNs

Dial Backup

NTP and Time


Router Interfaces and Media

Simple Network Management Protocol





First Hop Redundancy Protocols

IP Multicast

IP Mobility




Appendix 1. External Software Packages

Appendix 2. IP Precedence, TOS, and DSCP Classifications


Cisco IOS Cookbook
Cisco IOS Cookbook (Cookbooks (OReilly))
ISBN: 0596527225
EAN: 2147483647
Year: 2004
Pages: 505

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: