0

I heard that arp cache is stored in both machine and switch... Is that true.

When packet need to transmit from machine 'A' to an machine 'B' means we can simply send the packet to switch. As switch contains mac address for all ip connected to switch it can make transmission simple. Then why there is need for a arp cache in a local machine 'A' .I saw that machine 'A' contains mac for the machine 'B'.

2
  • You can connect two machines directly with a cable.. if there is no switch, how would it know if the machine is reachable?
    – NickW
    Commented May 20, 2014 at 13:28
  • 1
    Server Fault is not "Teach me fundamentals of networking", it's a site for pro administrators. Please read the list of valid topics and the help center.
    – Sven
    Commented May 20, 2014 at 13:28

2 Answers 2

6

Those caches are not the same thing.
In a Layer 3 device (computer) the arp-cache is used to cache the relation between ip-addresses and the mac-address that "owns" that ip-address.

A Layer 2 device (switch) uses an mac-address cache to remember which mac-address is reachable via which port on the switch.
It is called a mac-address table, but often it is incorrectly called arp-cache.

So both are called arp-cache, but they operate in different layers of the network-stack.

To further confuse matters: Manageable switches and switches that can also perform Layer 3 functions have BOTH types of caches as they operate on both layers.

-1

The machine does not send packets to switch and does not even know anything about the switch. It just try to resolve the destination machine mac address directly if in the same subnet or send it to the default gateway otherwise. And then try to resolve the gateway mac address and send it.

The switch remembers the mapping from mac-address to switch-port for security reasons and to increase efficiency. From the machine point of view, it acts exactly as a cable would.

1
  • Thanks for the guy who voted negatively on my answer, if an explanation could have been given, he wouldn't look like such a jackass. And thanks kasperd for editing my post and correcting my orthography, this is so useful and necessary; You might earn the editor badge for this one, so proud would be your Mum; Don't forget to tell her about it.
    – philippe
    Commented May 21, 2014 at 12:56

Not the answer you're looking for? Browse other questions tagged .