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

Do clients use the IP of the default gateway for something other than ARP?

· 52CE 我爱测

When I ping an external unknown IP, I see the sent ICMP packet with the default gateway's MAC address as destination, as expected. The gateway's IP address however is not used anywhere - it's just that single packet which natural…

问题原文

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

When I ping an external unknown IP, I see the sent ICMP packet with the default gateway's MAC address as destination, as expected. The gateway's IP address however is not used anywhere - it's just that single packet which naturally has the external unknown IP as the destination.

So why do I (or DHCP) need to configure the IP address of the default gateway on the client? Is it really only to fire that single ARP request to find the gateway's mac address?

I know what a default gateway is. What surprises me is that the default gateway is always identified by an IP address, when in fact all you really need is its MAC address. For all I know, you could build a functioning gateway that doesn't even have an IP address.

已采纳解答

原帖链接 · Tero Kilkanen · CC BY-SA 3.0

MAC address is defined for an interface. If an interface card at the default gateway router is changed, or the router itself is changed, MAC address changes.

An alternative would be to use a fixed MAC address on the gateway, that is, configuring the same MAC address on the interface of the new hardware. However, this is not always possible.

Therefore using only MAC address for the default gateway is not practical and therefore IP address is used.

This is also consistent with regards to OSI network layer division, where OSI layer 3 always handles routing, and layer 3 has its own address mechanisms.

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

资料来源与适用范围

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

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

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