ARP通讯

发布于 2024-08-26 19:48:50 字数 38 浏览 10 评论 0原文

DHCP 是否仅使用 ARP 作为通信协议来分配 IP 地址?

Does DHCP use ARP only as communication protocol to assign an IP Address?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

静水深流 2024-09-02 19:48:50

根本没有ARP。

1.客户端 ff:ff:ff:ff:ff:ff 0.0.0.0 255.255.255.255 DHCP 发现 2.DHCPsrvr ff

:ff:ff:ff:ff:ff 192.168.1.1 255.255.255.255 DHCP 提供 3.客户端

ff:ff :ff:ff:ff:ff 0.0.0.0 255.255.255.255 DHCP 请求

4.DHCPsrvr 客户端的 mac 地址 192.168.1.1 192.168.1.102 DHCP ACK

  1. 客户端发送以太网帧说“DhCP 服务器在哪里?”所以,他发送到广播MAC地址,因为他没有dhcp的mac地址。可以有多个 DHCP 服务器。他没有ip,所以IP包中的源是0.0.0.0。目标 IP 反映目标 MAC =>广播

  2. 服务器以单播 IP (OFFER)、默认网关、DNS 和 DNS 进行应答。其他选项。由于主机尚未与 DHCP 服务器达成任何协议,因此 DHCP 服务。将发送一个广播帧。

  3. 客户端正式向服务器请求(REQ)IP租用。由于尚未达成协议,他只是发送广播。从 0.0.0.0 开始,因为他仍然没有确认的 IP 地址。

  4. 服务器确认(ACK),从它自己的mac地址,从它自己的IP,到主机的IP与主机的MAC地址。

No ARP at all.

1.Client ff:ff:ff:ff:ff:ff 0.0.0.0 255.255.255.255 DHCP Discover

2.DHCPsrvr ff:ff:ff:ff:ff:ff 192.168.1.1 255.255.255.255 DHCP Offer

3.Client ff:ff:ff:ff:ff:ff 0.0.0.0 255.255.255.255 DHCP Request

4.DHCPsrvr mac address of client 192.168.1.1 192.168.1.102 DHCP ACK

  1. Client send ethernet frame saying "where is the DhCP server?" so, he sends to broadcast MAC address, because he does not the mac address of dhcp. There can be several DHCP servers. He has no ip, so in the IP packet source is 0.0.0.0. Destination IP reflects Destination MAC => Broadcast

  2. Server answers with an unicast IP (OFFER), a default gateway, a DNS & other options. Since the host has not yet agreed anything with the DHCP server, the DHCP serv. will send a broadcast frame.

  3. Client officially requests (REQ) the IP lease from the server. Since no agreement has been made he just sends a broadcast. from 0.0.0.0 since he stills has no confirmed IP address.

  4. Server acknowledges it(ACK), from its own mac address, from its own IP, to the IP of the host with the MAC address of the host.

风流物 2024-09-02 19:48:50

不需要。请阅读此页面,如果您还有其他问题,请询问。

No. Read this page, and if you'll have further questions, ask.

脸赞 2024-09-02 19:48:50

当 DHCP Server 向 DHCP Client 分配 IP 地址时,Server 使用广播让位于同一本地网络中的 Client 和其他 DHCP Server(本地网络中可能有多个 DHCP Server)知道该提供的 IP 地址。然而,它可能是在DISCOVER/OFFER/REQUEST/ACK期间的一些ARP数据包,因为客户端服务器想知道这个提供的IP地址在本地网络中是否可用。

When DHCP Server assign a IP Address to DHCP Client, Server use broadcast to let Client and other DHCP Servers, which is located in the same local network(There may be more than one DHCP Server in the local network), know this offered IP Address. However, it could be some ARP packets during DISCOVER/ OFFER/ REQUEST/ ACK, because Client Server want to know whether this offered IP Address is available in the local network.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文