philb19
asked on
default gateway L2 switch
Hi,
Want to get my head around default gateway on L 2 switch.
ok 3 VLANs on L2 switch. vlan 2 vlan 3
vlan 4 is reachable through route
I have management on vlan 2 - I have an IP address 192.168.2.1 on vlan 2
I have an IP address on vlan 3 - 192.168.3.1 - I can ssh to manage switch on both of these IPs on vlan 2 and 3
vlan 4 is 192.168.4.0/24
my default gateway on the L2 switch is to my L3 switch IP 192.168.3.3
I ssh to the L2 switch on vlan 2 192.168.2.1. Can I then from this ssh session on the switch ping to VLAN 4
the default gateway L2 is not on VLAN 2 ? Does it matter that I have come into the L2 switch by ssh on vlan 2 - or do i need to ssh to VLAN 3 which has an IP on same subnet as the L2 gateway in order to ping another VLAN ?? - when I try to ping an IP on vlan 4 does it use the default gateway set on the L2 switch?
thanks
Want to get my head around default gateway on L 2 switch.
ok 3 VLANs on L2 switch. vlan 2 vlan 3
vlan 4 is reachable through route
I have management on vlan 2 - I have an IP address 192.168.2.1 on vlan 2
I have an IP address on vlan 3 - 192.168.3.1 - I can ssh to manage switch on both of these IPs on vlan 2 and 3
vlan 4 is 192.168.4.0/24
my default gateway on the L2 switch is to my L3 switch IP 192.168.3.3
I ssh to the L2 switch on vlan 2 192.168.2.1. Can I then from this ssh session on the switch ping to VLAN 4
the default gateway L2 is not on VLAN 2 ? Does it matter that I have come into the L2 switch by ssh on vlan 2 - or do i need to ssh to VLAN 3 which has an IP on same subnet as the L2 gateway in order to ping another VLAN ?? - when I try to ping an IP on vlan 4 does it use the default gateway set on the L2 switch?
thanks
ASKER
Actually Ive just confused myself I think
correct me if wrong
The default gateway on a L2 switch is just for management traffic. And its just the gateway for that subnet only. ie gateway of the IP range that its on. So default gateway 192.168.2.254 on a L2 switch is gateway for 192.168.2.0/24 "only" - otherwise its not used.
The gateway for VLAN 3 on 193.168.3.0/24 - would need to be on 192.168.3.0/24 and be a router interface. When I ssh to Vlan3 and ping different subnet Id go via the gateway for this vlan. This question rose into my head as somehow we got couldn't reach a L2 switch management IP - and it was due to its default router not being on the management range IP subnet.
"If you have a true layer-2 switch, then you can only have one SVI (VLAN interface) up. " - here im not sure about. - We definitely have a L2 stack with multiple vlan interfaces on it. I can ssh to both of these interface IPs example vlan 3 192.168.3.1 and vlan 2 192.168.2.1 ?? - and im on the same switch
correct me if wrong
The default gateway on a L2 switch is just for management traffic. And its just the gateway for that subnet only. ie gateway of the IP range that its on. So default gateway 192.168.2.254 on a L2 switch is gateway for 192.168.2.0/24 "only" - otherwise its not used.
The gateway for VLAN 3 on 193.168.3.0/24 - would need to be on 192.168.3.0/24 and be a router interface. When I ssh to Vlan3 and ping different subnet Id go via the gateway for this vlan. This question rose into my head as somehow we got couldn't reach a L2 switch management IP - and it was due to its default router not being on the management range IP subnet.
"If you have a true layer-2 switch, then you can only have one SVI (VLAN interface) up. " - here im not sure about. - We definitely have a L2 stack with multiple vlan interfaces on it. I can ssh to both of these interface IPs example vlan 3 192.168.3.1 and vlan 2 192.168.2.1 ?? - and im on the same switch
Save all the back and forth, would be easier if you just give make and model of switch.
ASKER
Cisco 2960 sstack
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sorry should have explained myself better
The gateway for VLAN 3 on 193.168.3.0/24...
the gateway for vlan 3 is via trunked uplink to the L3 core- the gateway resides itself on the L3 router core.
thanks very much for detailed explanation - awesome help
The gateway for VLAN 3 on 193.168.3.0/24...
the gateway for vlan 3 is via trunked uplink to the L3 core- the gateway resides itself on the L3 router core.
thanks very much for detailed explanation - awesome help
If you have a true layer-2 switch, then you can only have one SVI (VLAN interface) up.
So I don't understand how you have IP addresses on multiple VLANs.
And the default gateway has to be on the same network as the host.