04-29-2010 10:32 AM - edited 03-03-2019 05:56 AM
Hi team,
I just want to clear my doubt.
Two PC s with different IP (192.168.2.10 & 172.16.3.10) connected access ports configured with same VLAN of a switch(layer 2).
Can they communicate?
My understanding is switch forms its MAC table based on Layer2 MAC address and port it connected & VLAN.
so why not? as long as they are in same VLAN.
Could you please clear my doubt?
Thank you
Sanjeev
05-01-2010 09:13 AM
Hi team,
I just want to clear my doubt.
Two PC s with different IP (192.168.2.10 & 172.16.3.10) connected access ports configured with same VLAN of a switch(layer 2).
Can they communicate?
My understanding is switch forms its MAC table based on Layer2 MAC address and port it connected & VLAN.
so why not? as long as they are in same VLAN.
Could you please clear my doubt?
Thank you
Sanjeev
Hi Sanjeev,
Ideally if pc in one subnet need to communicate with pc in another subnet in the same vlan you need a gateway in your pc's and once a packet comes to switch (gateway of the pc) for another subnet it will always send to the default gateway configured in the switch.
so with my experience i don't think it should ping.
Hope to Help !!
Ganesh.H
If helpful do rate the post
05-13-2010 06:02 AM
If the machines are in different subnets, then the *machine* will attempt to send the packet to the default gateway, saying "please pass this to the correct subnet".
If the gateway knows about the two subnets in the same VLAN, and can talk to them both, you will be good, but if you have two subnets, it would be reccomended to use two VLANs so you don't get cross brodcast traffic.
You will always need something to do the routing though, as the machine network stack simply won't send the packet out if it doesn't have a next hop, on the same subnet to send to.
05-15-2010 01:12 PM
Sanjeev
As you point out both PCs will be in the mac-address table of the switch in the same VLAN. So clearly at layer 2 the PCs can communicate directly with each other. So the question becomes what is the layer 3 behavior of the PCs. There are several possible situations in which the PCs do communicate directly:
- if the PCs are set up so that they ARP for the address of the other PC then the other PC will receive the ARP request, respond to it, and the PCs will communicate directly.
- if the PCs forward to a gateway that knows about both subnets and knows that both subnets are in the same VLAN, then the gateway can forward traffic from one PC to the other (and the gateway may send an ICMP redirect which could have the PCs communicate directly).
HTH
Rick
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