在我的 Fedora linux 中,我的 eno1 的 ip 是192.168.1.105,我的网关的 ip 是192.168.1.1,以及网络掩码netmask 255.255.255.0
为了监视 ARP 请求,在一个终端中,我使用了sudo tcpdump -i eno1 -v "icmp or arp",在另一个终端中,我运行了ping 192.168.1.5(不存在)或ping 192.168.91.1:
当我ping 192.168.1.5在我的局域网中不存在时,在tcpdump终端中,我收到了ARP请求:
[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
当我ping 192.168.91.5在我的局域网中仍然不存在时,在tcpdump终端中,我没有收到ARP请求:
[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
我想知道谁决定发送ARP请求或不发送ARP请求?一些googled结果说这是由linux内核完成的,如果是,我想知道linux内核在哪里?