Setting the Source Address for Telnet Connections


You want to force Telnet to use a specific IP address when connecting from the router to another system.


Include the source address in the Telnet command:

	aviva@RouterA> telnet source server1
	Connected to
	Escape character is '^]'.
	server1 (ttyp0)



By default, the source address included in locally generated Telnet and other TCP/IP packets is the address of the interface on which the Telnet request is sent. This means the source address may change from connection to connection. If multiple equal-cost next hops are present for a destination, the lo0 loopback interface address is used as the source address. If you configure the system default-address-selection statement in the configuration, which uses the lo0 interface address as the router's system address, this address is used as the source for most Telnet connections (see Recipe 7.4).

The result of this behavior is that the default Telnet source address is not always the same and not always deterministic. If the source address matters when using Telnet to access another system, include it in the telnet command. One instance when you should do so is when filtering the source address on incoming connections, which may block packets coming to the default source address. Another instance is when you use Telnet as a generic way to check and troubleshoot other TCP ports (such as connecting to a server on port 25 to see if it is listening for SNMP mail connections). The source address that you specify must be an address that's configured on the router.

See Also

Recipes 7.4 and 7.12

Router Configuration and File Management

Basic Router Security and Access Control





Router Interfaces

IP Routing

Routing Policy and Firewall Filters







IP Multicast

JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett © 2008-2020.
If you may any questions please contact us: