02-28-2011 06:48 PM - edited 03-06-2019 03:48 PM
Can we assign different subnets to PCs connected to the ports of a same swithc ? Will the PCs in the same subnet able to communicate?
Best Regards,
02-28-2011 07:20 PM
Can we assign different subnets to PCs connected to the ports of a same swithc ? Will the PCs in the same subnet able to communicate?
As long as the PCs are in the same VLANs, yes. Why not?
The management IP address of your switch can be in one VLAN and your clients are in another VLAN.
02-28-2011 08:36 PM
Thanks for your reply. But can we use different subnets on ports belonging to one VLAN ? ,i.e, if we use two subnets with different PCs connected to the ports of one VLAN, will the PCs having IP Addresses from the same subnet be able to communicate with one another?
And if we use two routers ports each with an IP Address one from each subnet, will two PCs from the different subnets be able to communicate with each other?
The question is a little bit stupid, but i'll appreciate if some one can clear it to me.
Best Regards,
03-01-2011 08:17 AM
The answer is yes, it will work. But it's not the best way to do it. If you have all the ports in the same vlan, the switch basically acts as a layer 2 device. As such, it doesn't care about IP addresses, it will track MAC addresses and when PCs want to communicate with each other, they will send out ARP broadcasts trying to find the MAC of the IP its looking for. When this happens, all devices on the switch will receive the broadcast and need to process it. If they do not have the IP address they simply drop the ARP packet. This is inefficient since it all devices will need to process all broadcasts. On a small network this isn't a real issue, but on larger networks this grows exponentially.
As you indicated, you will need a layer 3 device to route between the subnets. Setting up 2 interfaces on a router will work, assuming the ports are on the same router and routing is setup properly. Another option is to use sub-interfaces on a single router port each with an IP address from the 2 subnets.
All that being said, it begs the question, Why? If you are going to allow traffic between the subnets, why have 2 subnets on 1 vlan. If you are limited to a single vlan, why not just use one subnet? There's alot of unnecessary packet traffic on your network. I'm sure you have your reasons, and I hope I've helped clarify a little.
Rob
03-01-2011 12:42 PM
if we use two subnets with different PCs connected to the ports of one VLAN, will the PCs having IP Addresses from the same subnet be able to communicate with one another?
That's a different question altogther. But yes, you need to have a Layer 3 device to be able to route two or more discontiguous subnets.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