Thursday

Loopback & Telnet commands.

I’ve configured 4 routers each with the loopback addresses shown below.



A loopback interface is a virtual interface that doesn’t connect to any other device but is an easy way to identify a particular router on the network. The loopback interface never goes down unless the router is turned off.
Lookpack can be configured with :
                  Router(config)interface loopback <ip>


I’ve already created a telnet password (‘cisco’) on each router and also an enable password (also ‘cisco’) so that I can telnet into and manage each router.
I am on Router1 and would like to telnet from Router1 into all 3 of the other routers.

I start off by telneting into Router 2:

                                Router1#telnet 2.2.2.2
        Trying 2.2.2.2 ...Open
        User Access Verification

        Password:  cisco
        Router2>en
        Password:  cisco
        Router2#

To get back to Router1 I need to press Ctrl Shift 6 all together, and then the letter x (Ctrl+Shift+6, & then 'x'). Now I am back on Router1 but still have a telnet session connecting to Router2.

I then want to telnet from Router1 into Router3:

                                Router1#telnet 3.3.3.3
        Trying 3.3.3.3 ...Open

        User Access Verification
        Password: cisco
        Router3>enable
        Password: cisco
        Router3#


I then go back to Router1 (Ctrl+Shift+6, & then 'x') and telnet into Router 4 using the same telnet command shown above.

Once I’m back on Router1 I can use the command show sessions to see all of the telnet sessions that I have open from Router1.
                                Router1#show sessions
Conn Host                Address             Byte  Idle Conn Name
  1       2.2.2.2             2.2.2.2                0     1      2.2.2.2
  2       3.3.3.3             3.3.3.3                0     1      3.3.3.3
*3       4.4.4.4             4.4.4.4                0     0      4.4.4.4

Now if I want to go back into any of my telnet sessions I just need to type the connection number – Eg. ‘3’ will take me to Router 4 (4.4.4.4).

          Router1#3
          [Resuming connection 3 to 4.4.4.4 ... ]

          Router4#

From Router1 if I want to disconnect any of my telnet sessions I need to use the command disconnect <connection number>:
                               
                          Conn Host                Address             Byte  Idle Conn Name
     1     2.2.2.2             2.2.2.2                0     4      2.2.2.2
     2     3.3.3.3             3.3.3.3                0     4       3.3.3.3
*   3     4.4.4.4             4.4.4.4                0     0       4.4.4.4

Router1#disconnect 2
Closing connection to 3.3.3.3 [confirm]

The final command that I can use is show users which will show me how many people have telnetted into a particular router.

Eg. I want to know how many people have telnetted into Router4. The below output shows me that one person has telnetted into Router4 on vty 0 (the first telnet line).

                                    Router4#show users
                             Line       User       Host(s)          Idle           Location

*    67          vty 0        idle             00:00:00   192.168.1.1

  © Blogger template 'A Click Apart' by Ourblogtemplates.com 2008

Back to TOP