telnet switch confusion

dublinguydublinguy Member Posts: 22 ■□□□□□□□□□
I am preparing for the CCENT exam from cbt nuggets and stuck on the telnet thingy, I have Cisco 2900XL switch, connected to my laptop through console cable and ethernet cable,Then the switch is connected to the speedtouch router which is connected to the internet.

Pc - switch - router (Connected to the internet)

Vlan1 and Vlan100 are the interfaces, how will i telnet the switch?

I tried with the both ip address separately but it fails? do i need to open any port on router? or can i telnet switch without connecting it to the router?

The default-gateway value i had given to the switch is the public ip address of the router which i am getting through my isp? is this right or i am doing some mistake.

Thanks for the help.


The below is the startup config settings.


interface VLAN1
ip address 192.168.1.200 255.255.255.0
no ip directed-broadcast
no ip route-cache
shutdown
!
interface VLAN100
ip address 10.200.1.18 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
ip default-gateway 203.121.192.101
snmp-server engineID local 0000000902000002B98ABA40
snmp-server community private RW
snmp-server community public RO
!
line con 0
password ****
transport input none
stopbits 1
line vty 0 4
password ****
login
line vty 5 15
password ****
login
!
end

Comments

  • amp2030amp2030 Member Posts: 253
    You want to give your switch as default gateway your router's LOCAL IP address, just like you would give your computer. I assume that's 192.168.1.1 as I see you gave VLAN 1 an address of 192.168.1.200. This does not relate to telnet but it will be helpful if you want to access the internet.

    To be able to telnet to the switch from the laptop you need to open VLAN 1 with the "no shutdown" command. It will only work if your computer has an IP in the same subnet, of course, either manually configured or obtained from router by DHCP. I'd go with manual for now.

    That's what I notice so far, try that and let us know if it's working.
  • strapper3220strapper3220 Member Posts: 5 ■□□□□□□□□□
    I'm not an expert but I also think that you need to do a no shut command on Vlan 1 and I would also reccomend just connecting to an interface on your switch rather than the console if you want to telnet into it. Also it looks like you have 2 different passwords set for your VTY lines.

    Anyway I reckon if you do that no shut command on VLAN 1 and connect to your switch interface with a straight through cable and with laptop IP address 192.168.1.xxx it should probably work.
  • NetwurkNetwurk Member Posts: 1,155 ■■■■■□□□□□
    Are you trying to connect remotely or locally?

    Asking since you mentioned that you connected to your ISP's router
  • LBC90805LBC90805 Member Posts: 247
    Not familiar with the type of router you have. Can you actually give the Local LAN interface an IP Address? If so, that should be the IP of the IP DEFAULT-GATEWAY you give the switch in Global Configuration Mode.
  • dublinguydublinguy Member Posts: 22 ■□□□□□□□□□
    amp2030 wrote: »
    You want to give your switch as default gateway your router's LOCAL IP address, just like you would give your computer. I assume that's 192.168.1.1 as I see you gave VLAN 1 an address of 192.168.1.200. This does not relate to telnet but it will be helpful if you want to access the internet.

    To be able to telnet to the switch from the laptop you need to open VLAN 1 with the "no shutdown" command. It will only work if your computer has an IP in the same subnet, of course, either manually configured or obtained from router by DHCP. I'd go with manual for now.

    That's what I notice so far, try that and let us know if it's working.

    Thanks all for helping me, now i had given the correct default gateway to the switch, also changed vlan1 status to no shutdown, how still i am not able to telnet the switch. I am trying to telnet switch localy with ethernet cable but not succesful, with console cable yes i can telnet and ping the interface ip address 192.168.1.201.

    Switch is connected to the router which has the public ip address of internet, the 2 lap tops connected to switch does have internet connectivity.

    Thanks again for every ones help, I am missing something here....... dont know why cant telnet? does firewall has to do any thing if i am trying this locally? any other suggestions please?

    my lap tops ip addresses are 192.168.1.6 & 192.168.1.68

    Now below is the startup-configuration

    interface VLAN1
    ip address 192.168.1.201 255.255.255.0
    no ip directed-broadcast
    no ip route-cache
    !
    interface VLAN100
    ip address 10.200.1.18 255.255.255.0
    no ip directed-broadcast
    no ip route-cache
    shutdown
    !
    ip default-gateway 192.168.1.1
    snmp-server engineID local 0000000902000002B98ABA40
    snmp-server community private RW
    snmp-server community public RO
    !
    line con 0
    password ****
    transport input none
    stopbits 1
    line vty 0 4
    password **** (the same as for vty 5 15)
    login
    line vty 5 15
    password ****
    login
    !
    end
  • amp2030amp2030 Member Posts: 253
    When you say you can not login, what exactly is the error? It just times out, do you get to where it asks the password?

    Firewall can interfere with this. Try disabling it first and then telnet, to check if that's causing the problem. Only other idea I have is under line vty 0 15 config you could add "transport input telnet", though I believe that's the default.
  • jason_lundejason_lunde Member Posts: 567
    I think amp has it there...try that transport input telnet command under your vty interfaces....that should probably do it.
    If that doesnt work (which it should), repost your entire config. Cheers, and good luck.
  • mikej412mikej412 Member Posts: 10,086 ■■■■■■■■■■
    dublinguy wrote: »
    dont know why cant telnet? does firewall has to do any thing if i am trying this locally?
    Can the two laptops ping each other? If they can't, it could be a firewall issue on the PCs.
    :mike: Cisco Certifications -- Collect the Entire Set!
  • dublinguydublinguy Member Posts: 22 ■□□□□□□□□□
    mikej412 wrote: »
    Can the two laptops ping each other? If they can't, it could be a firewall issue on the PCs.

    Hi All,

    Thanks for every ones help, got the issue resolved by disabling the firewall on the laptops, now both can ping each others and also see for arp. Telnet is disabled on my router, port 23 is not unblocked going to use the other router.
  • dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
    I think the default gateway is only important if you want to communicate with it from a different network.
  • networker050184networker050184 Mod Posts: 11,962 Mod
    phoeneous wrote: »
    Huh?? I dont understand what youre trying to say here.


    You give the switch a default gateway of the router so you can communicate with it from different networks like dynamik stated. This is not a default gateway for your devices connected to the switch. Think of the L2 switch like a PC that it needs a default gateway to communicate with devices on a different subnet.
    An expert is a man who has made all the mistakes which can be made.
  • amp2030amp2030 Member Posts: 253
    phoeneous wrote: »
    No, I know that. I was trying to understand what he was typing grammar-wise.

    What exactly don't you understand grammar-wise?
    amp2030 wrote:
    You want to give your switch as default gateway your router's LOCAL IP address

    Would commas help?

    "You want to give your switch, as default gateway, your router's local IP"

    Kind of like saying "You want to give your friend, as a gift, your brother's laptop"

    You want to assign as default gateway for your switch that local IP address which belongs to your router (192.168...)

    I'm running out of ways to rephrase it, hope it helped.
Sign In or Register to comment.