I need to look up MAC address in the local network and I'm using Linux. What I do is send a ARP request with libnet, but after I send 3 requests, the cache still won't update. I use wireshark to catch the packets. From wireshark, I did get 3 ARP replays, after each of my ARP request. Does anyone know how come the ARP cache won't update?
When the ARPs are not resolved, most likely the ARPS for the SGW user IP and the Network Host next hop are not configured correctly. And there are two things could cause the ARP issue. One, the GlueServer is not ready or running. Two, the interfaces on the DUT are not up.
What will happen if an ARP reply is not received for an ARP request? If an ARP reply is not received, then that IP address cannot be resolved to an Ethernet address. Without a Ethernet address, the packets cannot be transmitted.
If the device with the IP address is directly attached to the Layer 3 switch, the device sends an ARP response containing its MAC address. The response is a unicast packet addressed directly to the Layer 3 switch. The Layer 3 switch places the information from the ARP response into the ARP cache.
When the ARP reply is received, the switch then knows the destination MAC address, so it fills the ARP table; additionally, the switch can fill the CAM table because it already knows the physical port and VLAN the ARP reply came from. So now the Ethernet frame is complete and it can be forwarded.
The Linux kernel does not accept unsolicited ARP by default. Since the request was sent by your userspace application and not by the kernel, the kernel sees the reply as "unsolicited".
You can change this default in /proc/sys/net/ipv4/conf/*/arp_accept
(either on a per-device basis or across all devices).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With