+ Reply to Thread
Results 1 to 11 of 11
  1. Member
    Join Date
    Aug 2008
    Location
    San Diego, CA
    Posts
    53

    Certifications
    CCNA, Security+
    #1

    Default Need explanation: "line vty 0 4"

    I'm a week into using IOS and the console, so far just been updating IOS and getting used to the commands. But the line command is not intuitive -- especially the numbers following it -- and I couldn't find references for it.

    For example, I know line con 0 is related to console connection, but what exactly does it do? And what does the number 0 mean?

    Now, line vty 0 4: I just use it to setup Telnet password without knowing why. Do I assume Telnet whenever I see vty? And why is there a 4 after 0?

    Please don't laugh if I make you wanna laugh. Putting "line vty 0 4" in google didn't get any explanation. Let me pre-thank all help here.
    Reply With Quote Quote  


  2. Login/register to remove this advertisement.
  3. Member
    Join Date
    Nov 2007
    Location
    France
    Posts
    50

    Certifications
    CCNA, CCNA Security, CCNP, CCDP, MCITP EA, CCIE R&S, CCDE Written
    #2
    Hello,
    The number 0 4 is the number of the line vty:
    line vty 0, line vty 1, .....
    for telnet per default, there is five lines, 0 to 4,
    and for the console , there is one line the number 0
    Daniel
    CCIE R&S
    Reply With Quote Quote  

  4. Drops by now and again astorrs's Avatar
    Join Date
    May 2008
    Location
    Vancouver, Canada
    Posts
    3,139

    Certifications
    I have numerous certs from VMware, Citrix, Microsoft, EMC, Nimble Storage, Palo Alto Networks and more...
    #3
    Think of line as similar to interface in that it can contain commands that are specific to that line/interface.

    Think of line con 0 as console port #0 (remember Cisco labels interfaces starting at 0, they left it as "0" in case they had routers with multiple console ports).

    Think of line vty 0 4 as telnet port #0 through #4 (5 total).
    Reply With Quote Quote  

  5. Senior Member
    Join Date
    Mar 2007
    Posts
    377

    Certifications
    CCNA,CCNP,CCNA-V,CCDA
    #4
    the vty 0 4 is logical telnet lines that can be connected to
    Reply With Quote Quote  

  6. Member
    Join Date
    Aug 2008
    Location
    San Diego, CA
    Posts
    53

    Certifications
    CCNA, Security+
    #5
    Thanks! I get it now, "0 4" means 0 to 4, just like "tftp flash" means from tftp to flash.

    So line ... 0 ... is not really like a command, but a label saying the following configs are for such and such lines. All clear now.
    Reply With Quote Quote  

  7. Junior Member
    Join Date
    Jul 2008
    Posts
    26

    Certifications
    CCENT, CCNA, BCMSN
    #6
    btw. you can also use ssh over those vty lines ... more secure than telnet
    Reply With Quote Quote  

  8. Village Idiot dtlokee's Avatar
    Join Date
    Mar 2007
    Location
    NJ
    Posts
    2,389

    Certifications
    CCIE #19991 R+S, CCNA, CCNP, CCIP, CCVP, CCSP, CCSI, MCSE NT4.0, 2000, 2003, + Messaging and Security, MCDBA, MCSD, MCAD
    #7
    They're not really "Telnet" lines, they're terminal lines. There are multiple protocols that can be used to connect to those lines depending on how they are configured. By default they will accept telnet connections but you need to set a password. You can also configure SSH which is the preferred choice if yout IOS supports crypto.

    to configure SSH
    Code:
    hostname whateveryouwant
    ip domain-name example.com
    username bob secret bob    <--- required because SSH uses a username and password
    crypto key generate rsa general-keys mod 1024      <--- this line varies you may want to just use "crypto key generate rsa" then put in 1024 for the modulus.
    
    line vty 0 4          <--- most IOS versions hsve 16 lines so "line vty 0 15" may be better
    login local
    transport input ssh   <--- allow only ssh protocol into these lines.
    Reply With Quote Quote  

  9. Inc
    Inc is offline
    Senior Member
    Join Date
    Oct 2006
    Location
    Latvia
    Posts
    184

    Certifications
    Mg.sc.ing in CS, CCNA
    #8
    Code:
    line vty 0 4          <--- most IOS versions hsve 16 lines so "line vty 0 15" may be better
    In case the router doesn't support 16 lines then the configuration input would be rejected.
    If you need to configure a lot of devices, then splitting 16 lines in two blocks is better.

    Code:
    line vty 0 4
    (..)
    line vty 5 15
    (..)
    I do it this way and don't have to worry about line support restrictions.
    Reply With Quote Quote  

  10. Village Idiot dtlokee's Avatar
    Join Date
    Mar 2007
    Location
    NJ
    Posts
    2,389

    Certifications
    CCIE #19991 R+S, CCNA, CCNP, CCIP, CCVP, CCSP, CCSI, MCSE NT4.0, 2000, 2003, + Messaging and Security, MCDBA, MCSD, MCAD
    #9
    Quote Originally Posted by Inc
    Code:
    line vty 0 4          <--- most IOS versions hsve 16 lines so "line vty 0 15" may be better
    In case the router doesn't support 16 lines then the configuration input would be rejected.
    If you need to configure a lot of devices, then splitting 16 lines in two blocks is better.

    Code:
    line vty 0 4
    (..)
    line vty 5 15
    (..)
    I do it this way and don't have to worry about line support restrictions.
    I usually don't configure the additional lines because they're not necessary in most cases, 5 lines for administration should be enough. If I'm using something like auth-proxy or a terminal server then I will use the additional lines.
    Reply With Quote Quote  

  11. MIPS processor please Mishra's Avatar
    Join Date
    Feb 2007
    Location
    Ashburn, VA
    Posts
    2,406

    Certifications
    MCSA:2012, MCITP:EA/SA, MCSE 2003, MCTS: Vista, VCP4, AAS
    #10
    Oh so if you have line vty 0 2 then 3 people can connect at once?
    Reply With Quote Quote  

  12. Some white dude
    Join Date
    Feb 2007
    Location
    Southwest
    Posts
    496

    Certifications
    CCIE (R&S), CCNP, CCIP, CCNA, SCSA, A+
    #11
    Quote Originally Posted by Mishra
    Oh so if you have line vty 0 2 then 3 people can connect at once?
    yes
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks