12-26-2017 06:49 AM - edited 03-08-2019 01:13 PM
Hello.
I'm confused if it is possible to have 2 vlans on the same network where each vlan has multiple static ip addresses on 1 switch that Is connected to a router.
My setup:
Vlan 2 range 172.16.1.2-172.16.1.62 /26 |
Vlan 3 range 172.16.1.66-172.16.1.126 /26 |
Trunkport from switch to router that connects both vlans to the way internet.
I'm confused if I should create the ip addresses for each vlan on the switch or create subinterfaces from the router. I seem to be getting error when assigning more than one vlan ip address to the router interface.
Hope to get some inspiration and guiding.
I linked a pdf file to show how I want my setup. It's not 100p done because I haven't got the final topology on this computer.
/Malling
Solved! Go to Solution.
12-26-2017 06:57 AM
Hi
Based on your design, you can create SVI (interface vlan Layer3) on switch or on the router.
In you create them on the switch, you'll need to define an interco subnet between the switch and router for routing purpose.
If you create them on the router, you have to create a trunk on the switch to the router and create subinterfaces ion the router for each vlan.
Your 2 subnets are /26 then you should be able to create the 2 SVI on the switch on 2 subinterfaces on the router.
Is that clear or tell me at which step you're stuck.
12-26-2017 06:57 AM
Hi
Based on your design, you can create SVI (interface vlan Layer3) on switch or on the router.
In you create them on the switch, you'll need to define an interco subnet between the switch and router for routing purpose.
If you create them on the router, you have to create a trunk on the switch to the router and create subinterfaces ion the router for each vlan.
Your 2 subnets are /26 then you should be able to create the 2 SVI on the switch on 2 subinterfaces on the router.
Is that clear or tell me at which step you're stuck.
12-26-2017 08:05 AM
12-26-2017 08:17 AM
12-26-2017 08:21 AM
I upload a file with all my coding progress for switch and router when I get home.
I'm curious if the ip address I give the subinterfaces is where the vlan starts giving out ip addresses or if I have to do it for each static ip address I have on the vlan.
I am at home in a few hours.
/Malling
12-26-2017 10:32 AM
Hello again.
When i came home i tried to sit down and do it all over again from scratch and now i didn't get the error, and i can ping from Vlan 2 to vlan 3.
So now its for some wierd reason working :D
i think it might be because i assigned the default gateway ip addresses for each vlan on the switch and then tried to do subinterface on the router afterwards.
sorry for wasting your time!
now i just need a server with DHCP on vlan 3 and a management vlan. Is native vlan necessary?
Im sooo happy that it finally works!
I think i just got more confused by working with it again and again for hours, and a break would fix it!
I mark your answer as a solution :)
/Malling
12-26-2017 10:35 AM
12-26-2017 11:54 AM
I think i create a vlan 10 for management and assign a ip on the switch. I want to connect a AccessPoint for my private network only, so vlan 2 shouldn't have wifi. Then i also connect a server on my vlan 3 where both vlans can connect to for filestorage. I use Windows 2012 IOS on the server and make it a DHCP server too.
That should work right?
then only the AccessPoint on vlan 3 gets IP addresses from the Server on vlan 3 and the vlan 2 clients cant get ip addreses from the server.
/Malling
12-26-2017 11:57 AM
12-26-2017 11:59 AM
I add a AccessPoint for wifi and a server for DHCP to vlan 3, so the Accesspoint gets ip addresses from the server and not the router. Then the PC's on vlan 2 won't be able to get ip addresses from the server because it's not on the same vlan and the server can still be accessed from both vlans.
Isn't that right?
/malling
12-26-2017 12:04 PM
12-26-2017 12:16 PM
well... i wanted to make it so the PC's on vlan 2 couldn't get ip addresses from the server on vlan 3
12-26-2017 01:37 PM
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