In my Fedora linux, My eno1's ip is 192.168.1.105
and my gateway's ip is 192.168.1.1
, and netmask netmask 255.255.255.0
For monitoring ARP request, in one terminal, I used sudo tcpdump -i eno1 -v "icmp or arp"
, in another terminal, I run the ping 192.168.1.5
(not exist) or ping 192.168.91.1
:
When I ping 192.168.1.5
, which is not existed in my LAN, in the tcpdump
terminal, I got the ARP
request:
[abelard@localhost iputils]$ sudo tcpdump -i eno1 -v "icmp or arp"
[sudo] password for abelard:
tcpdump: listening on eno1, link-type EN10MB (Ethernet), capture size 262144 bytes
06:39:13.111379 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.5 tell localhost.localdomain, length 28
When I ping 192.168.91.5
, which is still not existed in my LAN, in the tcpdump
terminal, I did not get the ARP
request:
[abelard@localhost iputils]$ sudo tcpdump -i eno1 -v "icmp or arp"
tcpdump: listening on eno1, link-type EN10MB (Ethernet), capture size 262144 bytes
06:50:02.417926 IP (tos 0x0, ttl 64, id 32986, offset 0, flags [DF], proto ICMP (1), length 84)
localhost.localdomain > 192.168.91.1: ICMP echo request, id 6682, seq 1, length 64
06:50:03.417060 IP (tos 0x0, ttl 64, id 33783, offset 0, flags [DF], proto ICMP (1), length 84)
localhost.localdomain > 192.168.91.1: ICMP echo request, id 6682, seq 2, length 64
I want to know who determines to send ARP
request or not to send ARP
request?
The some googled results said this is done by linux kernel, if yes, I want to know where in linux kernel?