0

In a scenario like the following, where different hosts are connected via switches only, I'm not sure how the ARP packets will look like when A wants to send an IP packet to B. I assumed all the devices' forwarding tables/ ARP tables were empty.

Host A ---- Switch 1 ---- Switch 2 ---- Host B

I understand how it would work if at least one of the switches were routers, but not when there are only switches (layer-2 switches, with no ARP tables)

Here is my best guess:

  1. A sends ARP request with MAC address FF:FF:FF:FF:FF:FF to Switch 1.

  2. Switch 1, not knowing where FF:FF:FF:FF:FF:FF goes to, 'broadcasts' a request for FF:FF:FF:FF:FF:FF to Switch 2.

  3. Switch 2 behaves like Switch 1 and 'broadcasts' a request for FF:FF:FF:FF:FF:FF to Host B.

  4. Host B receives this "ARP-request-like message" and responds with its MAC address to Switch 2.

  5. Switch 2 relays this message to Switch 1.

  6. Switch 1 relays this message to Host A, and now A has the MAC address of D.

  7. A sends an IP packet with destination MAC address of D.

  8. Switch 1 and Switch 2 forwards the message to D.

I'd like to know if the behavior is true.

Any help or push in the right direction would be greatly appreciated. Thanks!

3

Switches are transparent to layer 2, so the ARP forwarding logic is exactly the same, whether hosts are directly connected, via one switch or across several. An ARP request is broadcast and is flooded to all ports in the broadcast domain. An ARP response is (normally) unicast and is forwarded back to the requesting host.

In your steps 2 & 3, the switch floods the broadcast to all its ports except the source port. The ARP response is unicast, so in steps 5 & 6 the respective switch forwards it out of the port towards Host A, based on its MAC table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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