08-18-2015 10:49 AM - edited 03-08-2019 01:24 AM
I want to create a configuration where I have end devices across multiple vlans with the end devices on the same network. I want to use a script to move the devices to desired vlans using port-vlan management on the switch. My goal is to be able to dynamically change the size of my device pool in a specific vlan w/o having to reconfigure IPs or use DCHP.
For the sake of the question, lets say I have two vlans and want all of my end devices on the 192.168.10.0 /24 network. I want to use a router-on-a-stick configuration so I will be using sub-interfaces on a gigabitEthernet port on my router to a trunk port on my switch to handle the routing. Will this work if I configure the sub-interfaces to be in separate sub nets of the 192.168.10.0 /24 network.
i.e.
Interface gigabitEthernet 8.10
enc dot1q 10
ip add 192.168.10.33 /27
exit
Interface gigabitEthernet 8.20
enc dot1q 20
ip add 192.168.10.65 /27
exit
I have a 891F router and SG300 switch if that helps. Also, forgive the syntax for the code, i'm paraphrasing.
Thanks,
Akeem
08-18-2015 10:55 AM
Your configuration will work but they are separate subnets.
So when you say you want them all on the same IP subnet it's not clear what you mean.
If you just mean you want multiple vlans each with a subnet taken from the same major network of 192.168.10.0/24 then yes it is fine.
If you mean all clients can talk to each other without routing then no but I don't think this is what you are asking.
Can you clarify ?
Jon
08-18-2015 11:02 AM
Thanks for the reply Jon.
I want the vlans each with a subnet taken from the same major network, just as you said. I am new to networking in general so I'm not sure if this kind of setup is frowned up. Im thinking that with this setup, if I have a PC in each vlan that I can use for management set to the /24 mask i will be able to see all traffic from the end device as soon as it joins the correct vlan. For example, something like bring up the GUI of the device. Is that correct?
08-18-2015 11:11 AM
if I have a PC in each vlan that I can use for management set to the /24 mask i will be able to see all traffic from the end device as soon as it joins the correct vlan.
Can you clarify exactly what you mean by this because it's still not clear ?
Perhaps use a vlan/IP subnet as an example.
Why would you want a PC in each vlan with a /24 mask ie. what are you expecting to be able to do?
Jon
08-18-2015 11:40 AM
if I have
08-18-2015 11:42 AM
Yes there will be issues because the PC you have moved will still have it's default gateway set to 192.168.10.65 which means -
1) it won't be able to communicate with anything else in the new IP subnet because it thinks it is on a different IP subnet so it would send it's traffic to it's default gateway but it can't get to that gateway ie. it is in the wrong vlan.
and
2) it won't be able to communicate with any other IP subnet for the same reason.
You could theoretically not set a default gateway on the PCs and rely on proxy arp and that might work ie. would need testing but that is not really a great solution.
Just how many clients are you talking about in total ?
Jon
08-18-2015 11:59 AM
For this specific test network i'm going to keep the device pool down to 10 devices but the plan is to scale up from there. I was actually just reading up on proxy-arp so i'll give that a try.
I guess another option is to create dhcp pools on the vlans with low lease times, and hopefully the router will be able to give a device a familiar ip when it joins the vlan based on the devices MAC address. This seems like it will get messy very quickly for a larger network though.
I'll give these a try and post my findings. If anyone has any thoughts feel free the chime in.
Akeem
08-19-2015 02:55 AM
Hello _Akeem721
A vLAN and A Subnet are always associated together
Normally, 1 IP subnet is associated with 1 layer 2 broadcast domains (VLAN). Every useful VLAN (from an IP perspective) will have an IP network associated with it. VLANs are for creating broadcast domains (different networks(subnets)) at the L2 level. But only PCs on the same VLAN can communicate, unless you have a L3 switch or router, in which case, you will still have to subnet (give the VLANs IP addresses).
VLANs (layer 2) and subnets (layer 3) go hand -n- hand. If you are working on the same device, such as a L3 switch, you have to use a separate VLAN ID for each separate subnet.
08-18-2015 10:57 AM
Sorry, just reread the post.
The above configuration won't allow you to dynamically change the size of the pool without at least changing the subnet mask on the subinterface.
Jon
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