cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
136
Views
0
Helpful
2
Replies

SSH connection Lost after switch accessmode vlan *

anandjayabal987
Beginner
Beginner

When I attempt to assign a port (say Gi1-2) to a vlan other than vlan 1, the SSH connection is lost upon firing the switchport access vlan command.

I have created 2 VLANs (10,20) in addition to the default vlan 1. The PC I am using to access the switch is connected to Gi10. When I try to assign that port to one of the vlan’s (say vlan 10), the connection locks up.

Here are the commands I am using

     Switch# configure terminal

     Switch(config)# interface range Gi1-2

     Switch(config-if)# switchport mode access

     Switch(config-if)# switchport access vlan 10

     <<--- terminal doesn’t respond anymore ---->>

 

Before configuring the same, vlan 1 (default vlan) is assigned with an ip address (192.168.1.254).

anandjayabal987_0-1652688179989.png

 

After this if I try to connect to the switch via SSH, the switch is no longer seen on the network from this PC.

If I switch the cable to another port, then I can connect to it. So, I am assuming that since the ports are on Vlan 1, they are accessible via SSH.

Also tried this under telnet, with the same results.

Any suggestions are welcome.

2 Replies 2

Jon Marshall
VIP Community Legend VIP Community Legend
VIP Community Legend

 

Is this a L2 switch or a L3 switch. 

 

If you allocate your PC into vlan 10 then it needs to be able to route to vlan 1 to get to the switch so something needs to route between those vlans. 

 

It could be the switch you are on but if the switch is L2 only then you would need to have something to route between those vlans. 

 

Jon

MHM Cisco World
Advisor
Advisor

OK 
first create VLAN 10
then config SVI for VLAN 10 assign IP 
finally assign port to VLAN 10
SSH is L3 and need IP for source.

also make sure you config default GW in SW to make other VLAN can get out the SW.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers