Hi, im abit confused about LAN switching, vlans and default gateways.. I'll try to explain beyond.
I have the toplogy you see above setup in a physical lab. The switch in the middel is the core, and the three others are access layer switches. On all four switches i have created the following vlans and named them:
VLAN 10 (GROUP10)
VLAN 20 (GROUP20)
VLAN 50 (SERVERS)
Now here is where i get confused.. I'm not really sure if every switch in my LAN segment needs to have an IP configured for all vlans. I use VLAN 1 for management, so the core has 192.168.1.1, and the other three switches 192.168.1.(2/3/4). On the access layer switches i set the ip default-gateway to 192.168.1.1 and boom it works perfect. I can now ping between all three switches. So i thought to myself, i wanna try and get the router to play along, so i created a new vlan 99 on the core switch and gave it the ip 10.1.1.2 /30 and assigned GigabitEthernet 0/1 to this vlan. Then i gave the GigabitEthernet0/1 interface on the router the ip address 10.1.1.1 /30 and made a static default route on the core switch like this: ip route 0.0.0.0 0.0.0.0 10.1.1.1 - Everything works smooth. I can now ping the router aswell. Here is where the chain falls.. Do i need to do the exact same thing with vlan 10,20 and 50? Lets say vlan 10 and 20 has the following ip address on the core switch 172.10.1.1 /24 and 172.20.1.1 /24 - Do i need to assign addresses in this range to all access layer switches?
I mean technically it should be able to function layer 2 wise, but how do the respective vlan know its default gateway? Vlan 10 172.10.1.5 won't be able to use the vlan 1 ip default-gateway of 192.168.1.1 which obviously makes sence..
So what i'm really asking is how do i seperate my LAN into different vlans to seperate the end users while they still need to be able to reach the rest of the network and the router?