大网数据广告活动
服务器运维问答

When wouldn't an ARP reply be generated?

· 52CE 我爱测

Summary of the problem : a ping from client does not go to rpi1 , its ARP call is not answerd at srv . host0 and tap0 are bridged by br0 . vpnin and lan0 are two independent interfaces. All traffic between the interfaces is allow…

问题原文

原帖链接 · WoJ · CC BY-SA 3.0

Summary of the problem: a ping from client does not go to rpi1, its ARP call is not answerd at srv.

  • host0and tap0 are bridged by br0.
  • vpninand lan0 are two independent interfaces.
  • All traffic between the interfaces is allowed on srv (IP forwading is enabled and I have successful traffic between rpi1 and other interfaces not visible here, among others one which is the gateway to Internet)

Details: client successfully pings itself (10.20.1.2), 10.20.1.1, 10.20.1.254 and 10.10.10.254. When trying to ping 10.10.10.11:

root@client:~# ping 10.10.10.11
PING 10.10.10.11 (10.10.10.11) 56(84) bytes of data.
From 10.20.1.1: icmp_seq=2 Redirect Host(New nexthop: 10.10.10.11)
From 10.20.1.1 icmp_seq=1 Destination Host Unreachable
From 10.20.1.2 icmp_seq=3 Destination Host Unreachable
From 10.20.1.2 icmp_seq=4 Destination Host Unreachable
From 10.20.1.2 icmp_seq=5 Destination Host Unreachable

Please note the flip-flap in the From, between 10.20.1.1 and 10.20.1.2.

When running a tcpdumpon srv (where the ping ability is lost) I see ARP requests, but no replies:

root@srv ~# tcpdump -i vpnin -nn
17:10:54.463072 ARP, Request who-has 10.10.10.11 tell 10.20.1.1, length 28
17:10:55.459489 ARP, Request who-has 10.10.10.11 tell 10.20.1.1, length 28
17:10:56.459459 ARP, Request who-has 10.10.10.11 tell 10.20.1.1, length 28
17:10:56.473683 ARP, Request who-has 10.10.10.11 tell 10.20.1.2, length 28
17:10:57.469788 ARP, Request who-has 10.10.10.11 tell 10.20.1.2, length 28
17:10:58.469608 ARP, Request who-has 10.10.10.11 tell 10.20.1.2, length 28

Again, both 10.20.1.1 and 10.20.1.2 request an answer.

The ARP table on srv does have an answer

root@srv ~# arp -a
(...)
rpi1.10.in-addr.arpa (10.10.10.11) at f4:f2:6d:09:35:1b [ether] on lan0

What can be the reason

  • for the lack of reply?
  • and for this strange switch between 10.20.1.1 and 10.20.1.2?

已采纳解答

原帖链接 · Ron Maupin · CC BY-SA 3.0

ARP only works on the same LAN (layer-2 broadcast domain) because an ARP request is a broadcast. Broadcasts do not cross a layer-3 boundary. MAC addresses are layer-2 addresses, and they are only significant, or even seen, on the same layer-2 broadcast domain.

A host wishing to send traffic to a different layer-3 network will send the traffic to the layer-2 address of its configured gateway, using ARP to find the layer-2 address of its configured gateway, if necessary. Then, it is the responsibility of the configured gateway to get the traffic to the next hop on the path to the destination.

If the traffic is supposed to be routed to a different network, you need to configure the gateway on the hosts to be the addresses in the layer-3 networks where the hosts exist, at the point where the networks meet (srv). The configured gateway for client should be 10.20.1.254, and the configured gateway for rp1 should be 10.10.10.254.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。