Consider the following network:
[Host1]if12----------if21[Host2]if23----------if32[Host3]
Step 0 (Initialization)
ARP caches of all hosts are initially empty.
Step1 (Host1 pings Host2)
- Host1 checks its ARP cache whether there is an entry for Host2's MIP address. Host1 broadcasts ``who is Host2?” (a broadcast Ethernet frame containing a MIP packet with SDU Type set to MIP-ARP, containing a MIP-ARP Request message). Note that Host2 will reply back the MAC address of the interface where the broadcast message was received (RAW sockets descriptor can distinguish different interfaces).
- Host2 receives the broadcast message, replies back to Host1 with a MIP-ARP response (unicast message to Host1, SDU Type: MIP-ARP, with a payload containing a Response message), and both update their caches.
- Host1 sends the ping packet to Host2, and Host2 responds.
The updated ARP caches of all hosts will be as following:
MIP address | MAC address | RAW socket |
---|---|---|
2 | if_21 MAC address | if_12 socket |
MIP address | MAC address | RAW socket |
---|---|---|
1 | if_12 MAC address | if_21 socket |
MIP address | MAC address | RAW socket |
---|---|---|
Step 2 (Host3 pings Host2)
- Host3 checks its ARP cache whether there is an entry for Host2's MIP address. Host3 broadcasts ``who is Host2?” (see above).
- Since Host2 receives the broadcast message from if_23 RAW socket, it will reply back to Host3 the MAC address of if_23 interface. Host3 receives the ARP Response and updates its cache.
- Host3 sends the ping packet to Host2, and Host2 responds.
After this step, the ARP caches will be as following:
MIP address | MAC address | RAW socket |
---|---|---|
2 | if_21 MAC address | if_12 socket |
MIP address | MAC address | RAW socket |
---|---|---|
1 | if_12 MAC address | if_21 socket |
3 | if_32 MAC address | if_23 socket |
MIP address | MAC address | RAW socket |
---|---|---|
2 | if_23 MAC address | if_32 socket |
Step 3 (Host1 pings Host2 again)
- Host1 should use the MIP-ARP-cache table instead of broadcasting a MIP-ARP message. It should directly send the ping to the already known Host2, where Host1 is also already known and a “PONG” response can directly be sent.
- Host1 cannot ping Host3.