问题原文
原帖链接 · 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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
