Telnet without Telnet keyword

I'm trying to setup the following scenario.

When i type eg. 1.2.3.4 on the cli, i want it to telnet to that address.

i tried the following but it didn't work

line console 0

 transport preferred telnet

 

How can i achieve this ?

Comments

  • telnet is a VTY  connection, not a console connection. If you type in 1.2.3.4 IOS will attempt to open a telnet connection to that address. 

    What is the purpose of configuring telnet on the console line? 


    On Wednesday, January 7, 2015 10:34 AM, Seyi <[email protected]> wrote:


    I'm trying to setup the following scenario.

    When i type eg. 1.2.3.4 on the cli, i want it to telnet to that address.

    i tried the following but it didn't work

    line console 0

     transport preferred telnet

     

    How can i achieve this ?



    INE - The Industry Leader in CCIE Preparation

    http://www.INE.com



    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx


  • I second that.

    To accomplished what you would like to do, your configuration needs to be under the VTY lines...

    Telnet is enabled by default, but the following should do it:

     

    Line vty 0 15

    transport output telnet

  • Hi Seyi,


    I'm not sure if the command got depreicated, but I used to use an alias to do this on my old Cisco access server.  The syntax was really straight forward,

    #alias exec r1 telnet 192.168.1.1

    Where if you now type r1 in exec mode, it will telnet to 192.168.1.1.  I'm not sure if that is what you're try to achieve here? 

  • When you type 1.2.3.4 at the cli (exec mode) the router, by default will do a telnet:

     

    testlabrouter#1.2.3.4
    Trying 1.2.3.4 ...
    Jan 14 23:54:34.287: IP: tableid=0, s=x.x.x.x(local), d=1.2.3.4 (GigabitEthernet2/1), routed via FIB
    Jan 14 23:54:36.287: IP: tableid=0, s=x.x.x.x(local), d=1.2.3.4 (GigabitEthernet2/1), routed via FIB
    Jan 14 23:54:40.287: IP: tableid=0, s=x.x.x.x (local), d=1.2.3.4 (GigabitEthernet2/1), routed via FIB
    Jan 14 23:54:48.287: IP: tableid=0, s=x.x.x.x(local), d=1.2.3.4 (GigabitEthernet2/1), routed via FIB
    % Connection timed out; remote host not responding

    testlabrouter#sh ip access-list 100
    Extended IP access list 100
        10 permit tcp any eq telnet any
           30 permit tcp any any eq telnet (4 matches)
        testlabrouter#

    Ken Hagen
    CCIE #56460

  • Yeah, an alias worked.

    But by default on most routers when you type the ip address/hostname directly on the command line, it opens a telnet connection. This version didn't and i was try to find if a command affects this behaviour

  • That is what didn't happen in this case

    When you type 1.2.3.4 at the cli (exec mode) the router, by default will do a telnet:

     

  • I have not seen that before.   You could do a bug scrub on the version.  Mind if I ask what version it is?

    Ken Hagen
    CCIE #56460

  • I have not seen that before.   You could do a bug scrub on the version.  Mind if I ask what version it is?


     

    7200, IOS 15.2(4)S

  • Is it gns3 or real routers?

    Ken Hagen
    CCIE #56460

  • GNS3 7200 router, running the above image i specified.

    Is it gns3 or real routers?


  • I tried it with your version and got the same results. 

     

    R3#sh ver | i IOS

    Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.2(4)S6, RELEASE SOFTWARE (fc1)

    R3#1.1.1.1

       ^

    % Invalid input detected at '^' marker.

     

    R3(config-line)#transport preferred telnet

    R3(config-line)#^Z

    R3#1.

    %SYS-5-CONFIG_I: Configured from console by console

    R3#1.1.1.1

       ^

    % Invalid input detected at '^' marker.

     

     

    I tried it with "M" version and it worked:

     


    R1#sh ver | i IOS
    Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.2(4)M2, RELEASE SOFTWARE (fc2)
    R1#1.1.1.1
    Trying 1.1.1.1 ...
    % Destination unreachable; gateway or host down

    R1#

    Ken Hagen
    CCIE #56460

  • So it is a version issue then

Sign In or Register to comment.