06-05-2013 06:37 AM - edited 03-07-2019 01:43 PM
Hello,
I've configure the command below on a switch. when I try to telnet to it from a pc I get:
PC>telnet 172.16.2.31
Trying 172.16.2.31 ...Open
[Connection to 172.16.2.31 closed by foreign host]
PC>
Command on switch:
line vty 0 4
password cisco
login
line vty 5 15
login
!
!
end
line vty 0 4
password cisco
login
line vty 5 15
login
!
!
end
Any help would be great!
Solved! Go to Solution.
06-05-2013 08:16 AM
Hmm - you don't have an IP address on your switch
Try:
#interface vlan1
#ip address 172.16.2.31 255.255.255.0
06-05-2013 07:02 AM
Hi,
If you are trying to login local to the switch, then add this commands and try again:
line vty 0 4
password cisco
login local
line vty 5 15
login local
username test password test
username test privilege 15.
HTH
06-05-2013 07:46 AM
Hi,
is the PC on a remote subnet ? if so you must configure the ip default-gateway command.
is your vlan interface up/up ----> sh ip int br 1 i Vlan
Can you ping this IP ?
Regards
Alain
Don't forget to rate helpful posts.
06-05-2013 07:55 AM
I was actually having the issue on the LAN as well as on a remote LAN. I did not have the default gateway set on the switch so I configured that just now as well as the above commands to create a username and privledge. However, I'm still having the problem. I can ping the switch from the LAN and remote LAN. Just cannot telnet
06-05-2013 07:58 AM
Hi,
can you post the config and also the topology file.
Regards
Alain
Don't forget to rate helpful posts.
06-05-2013 08:09 AM
I added the network I made in packet tracer. It's attached to the original post above. I'm trying to telnet from PC "Andy" in the Nashville LAN to the switch in that LAN. I'm also trying to telnet from PC "Jimmy Bob" in the Miami LAN.
Config to the Nashville Switch:
Switch#sh run
Building configuration...
Current configuration : 1084 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
username user privilege 15 password 0 cisco
!
spanning-tree mode pvst
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface Vlan1
no ip address
!
ip default-gateway 172.16.2.17
!
!
line con 0
!
line vty 0 4
password cisco
login local
line vty 5 15
password cisco
login local
!
!
end
06-05-2013 08:15 AM
I see I did not have vlan 1 configured with an IP but I just added that and had the same problem.
06-05-2013 08:18 AM
Ah I thought that was too easy...
Can you ping the default gateway from the switch?
Can you sit on the switch and telnet to yourself?
i.e.
switch>telnet 172.16.2.31
06-05-2013 08:16 AM
Hmm - you don't have an IP address on your switch
Try:
#interface vlan1
#ip address 172.16.2.31 255.255.255.0
06-05-2013 09:33 AM
I got it working now... Did not have an IP assigned... Actually I did but failed to notice the error "bad mask" because .31 is the broadcast address on my 172.16.2.16/28 network. that along with creating the username and default gateway etc worked..
Thanks everyone!
06-05-2013 09:34 AM
Still learning
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide