05-16-2022 01:14 AM
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).
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.
05-16-2022 02:02 AM
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
05-16-2022 07:25 AM
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.
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