Skip to Content
Cisco IOS Cookbook, 2nd Edition
book

Cisco IOS Cookbook, 2nd Edition

by Kevin Dooley, Ian Brown
December 2006
Intermediate to advanced
1188 pages
72h 8m
English
O'Reilly Media, Inc.
Content preview from Cisco IOS Cookbook, 2nd Edition

Setting the Source Address for Telnet

Problem

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

Solution

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
Router1(config)#end
Router1#

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

Router1#telnet 172.25.1.5 /source-interface loopback0

Discussion

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

Brad Edgeworth, Aaron Foss, Ramiro Garza Rios
Cisco Software-Defined Access

Cisco Software-Defined Access

Srilatha Vemula, Jason Gooley, Roddie Hasan

Publisher Resources

ISBN: 0596527225Supplemental ContentErrata Page