1

i am a newbie but i need to understand this ARP thing.

In my company we have a router that has 3 switches connected to it. On the switches there are more than 100 hosts.

I know that switch learns and stores mac addresses but my question is, how does a router know mac addresses of hosts when switch doesn't store their ip addresses.

Thanks

  • 1
    ARP queries are broadcast, and switches forward broadcasts out all ports. – Ron Trunk Sep 30 '20 at 13:14
  • I know that but I don't understand which device stores actual arp table data. Since switches are not aware of ip addresses how a router knows ip and their macs? – Marko Sep 30 '20 at 13:48
  • The router knows because it hears the ARP query since the switch forwards the query (broadcast) to the router. It would be the same if the router were directly connected to the host. – Ron Trunk Sep 30 '20 at 14:13
  • Thanks a bunch Sir. That's it. – Marko Sep 30 '20 at 14:15
1

I know that switch learns and stores mac addresses but my question is, how does a router know mac addresses of hosts when switch doesn't store their ip addresses?

Switches have nothing to do with ARP. Only hosts with IP addresses participate in the ARP protocol.

Since ARP queries are broadcast, switches forward them out all ports. Presumably, the router is connected to one of those ports, so it hears the query and can answer if need be.

Not the answer you're looking for? Browse other questions tagged or ask your own question.