12-10-2013 05:56 AM - edited 03-07-2019 05:00 PM
Hi All,
I know that if a host doesn't have the MAC address of the another device in the same segment, then it will broadcast an ARP request with a layer2 broadcast address.. so this frame will be seen by all other devices in the same LAN.. and i read that all the devices will learn the MAC address of the PC that is generating the ARP request and the Destined PC will respond back to the source PC with an ARP reply.
But for me it is not working like that. The Sender PC and the Receiving PC are only two which are knowing themselves and all the other hosts on the segment are not learning the MAC address of the sender PC (since it generates an ARP request as a broadcast i think all the hosts should learn its MAC).
Below is my topology:
Intially the switches arp table was empty and their MAC table has the MAC of router interface only. And also the arp table on all the hosts on both segments was nill.
I tried to ping PC7(10.0.2.4) from PC4 (10.0.2.1) and i thought that all the PC in this segment will learn the MAC of PC4(10.0.2.1) but it doen't happened. Only PC7 & PC4 learned each others MAC. Even switch1 also didn't build its arp table it just filled its MAC table with PC7 & PC4 MACs.
---------------------------------------------
One more thing.
I tried to ping (PC3)10.0.1.4 from PC6(10.0.2.3) here both the PC's learnt there default gateway MAC. I thought they will map each others IP address to the default gateway's MAC. But they just learned about GW IP and its MAC.
Can someone please take a look ?
Regards,
Chandu
Regards,
Chandu
Solved! Go to Solution.
12-10-2013 08:21 AM
Chandu asks about a couple of issues. Here are my responses to these issues.
- should all PCs learn the MAC address and IP address when some host sends an ARP request. As Paul has explained all hosts on the segment receive the broadcast request. All hosts, other than the intended recipient recognize that the request is not for them and ignore the request (do not learn the MAC and IP).
- the switch does not put the IP into its ARP table and PC4 and PC7 are learning about each other and communicating. The reason for this is that the switches are layer 2 switches and as such only use the ARP table for communication to and from the management address of the switch. Traffic between hosts connected through the switch does not need to be in the ARP table of the switch.
- PC3 and PC6 are in different subnets. Chandu expects that they would put the other device IP into the ARP table and have the gateway MAC. But ARP is intended to be local. A host will put into its ARP table destinations that are local but there is no benefit from putting into the ARP table destinations that are remote. For anything remote the host knows that all it needs is its default gateway.
HTH
Rick
12-10-2013 07:02 AM
Hello
That becasue when the sender pc sends its arp request is includes its Mac & ip address as source with a broadcast addreess as its destinaton encapulated into a frame, and this frame is flooded out to all hosts on that particular lan segment only.
All hosts will to check this frame but the only host which recognizes itself will respond with it mac-address via a arp reply.
Now Broadcasts are not allowed to traverse the router, so to allow hosts to be able reach each other from different subnets I suggest your hosts and the two L2 switches be given a default-gateway address of the router relating to it particular lan segment or allow proxy-arp on the router interfaces ( The latter being enabled by default ).
res
Paul
Please don't forget to rate any posts that have been helpful.
Thanks.
12-10-2013 08:21 AM
Chandu asks about a couple of issues. Here are my responses to these issues.
- should all PCs learn the MAC address and IP address when some host sends an ARP request. As Paul has explained all hosts on the segment receive the broadcast request. All hosts, other than the intended recipient recognize that the request is not for them and ignore the request (do not learn the MAC and IP).
- the switch does not put the IP into its ARP table and PC4 and PC7 are learning about each other and communicating. The reason for this is that the switches are layer 2 switches and as such only use the ARP table for communication to and from the management address of the switch. Traffic between hosts connected through the switch does not need to be in the ARP table of the switch.
- PC3 and PC6 are in different subnets. Chandu expects that they would put the other device IP into the ARP table and have the gateway MAC. But ARP is intended to be local. A host will put into its ARP table destinations that are local but there is no benefit from putting into the ARP table destinations that are remote. For anything remote the host knows that all it needs is its default gateway.
HTH
Rick
12-10-2013 08:48 PM
Thanks for clearing my queries Rick. I understood it now.
Actually i was reading Richard deal's CCNA study guide there it was mentioned that remaining PC's in that segment will learn the sender MAC.
Here is the snap from that book.
I'm not pointing anyone... it is just for the information.
Regards,
Chandu
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