Set the Telnet Source IP Address for a Cisco Router

The default source IP address when telnetting from a Cisco router is that of the interface closest to the destination. Because some access lists may block traffic from the default IP address, it may be useful to temporarily or permanently set the telnet source IP address. This also helps test access lists.


To temporarily set the telnet source IP address for a single telnet session, use the /source-interface extension to the telnet command.

For example, to telnet to 192.168.1.4 using the source IP address of the interface FastEthernet0:

telnet 192.168.1.4 /source-interface FastEthernet0

To set this interface as the source IP address for all telnet sesions, use this command in configuration mode (conf t):

ip source-interface fastethernet0

 

About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.

6 Responses to “Set the Telnet Source IP Address for a Cisco Router”

  1. October 29, 2008 at 8:05 pm, great idea said:

    Brilliant tip, got me out of a hole tonight!

    Reply

  2. May 19, 2010 at 2:17 pm, Mike said:

    Anything similar for SSH?

    Reply

  3. December 08, 2010 at 8:34 pm, Richey said:

    This command did not work on a box with 12.3. I used “ip telnet source-interface interface fa0/0″

    Reply

  4. March 25, 2011 at 1:51 pm, Satyadevan W said:

    how to assign an ipaddress for auxiliary port in a router

    Reply

  5. October 02, 2011 at 11:23 am, mike said:

    Thx dude

    Reply

  6. August 27, 2013 at 7:23 am, Greek said:

    How to use specific ip address, if interface has many secondary ip addresses?

    I have not any idea :(

    Reply

Leave a Reply