Saturday, May 24, 2008

Connection refused by remote host

"Connection refused by remote host" is the message I got this morning after trying to connect to my frame relay router from my Access server.

I received this message because I left an active connection to the frame relay last night and unplug my cat5 cable from the wireless router to the lab lan. I was using my laptop to ssh to the as server. So, this morning my AS believe I still have an active connection to the FR.

Here is what I did to have access to my fr.

From the AS server:

AS# clear line 0
AS# clear line 1

I did not know what line to clear, so I clear line 0 and line 1

and that all I did and now I have access.


But here is the solution cisco recommend to avoid this kind of problem (http://www.cisco.com/en/US/tech/tk801/tk36/technologies_tech_note09186a00801365f3.shtml)

This topology allows for a remote terminal user to gain access to a server across a network using an autocommand telnet in the configuration of Router 2.





If, however, Router 2 is reloaded for any reason, the terminal will not be able to get back into the server. Upon attempting to activate the connection, the user will see a "Connection refused by remote host" message. This message appears because the server believes that the previous telnet session is still connected, thus blocking a new session.

This situation could be remedied by a network administrator by issuing the clear line command on Router 1, but this approach has two major shortcomings:

Network administrators may be unavailable to clear the line when needed.

For security reasons, the enable password command is not likely to be given out to users.

One solution is for Router 1 to clear the TTY line when the connection to Router 2 is lost for any reason. TCP keepalives can resolve this problem. Turn on TCP keepalives on both routers so that one router will notice when the connection to the other router goes away; otherwise, the far end has no way to know that a reboot or other connection loss has happened.

To enable TCP keepalives on the routers, use the following configuration commands:

Router1# config term
Router1(config)# service tcp-keepalives-in
Router1(config)# service tcp-keepalives-out
Router1(config)# end

No comments: