DHCP 请求未收到响应

DHCP 请求未收到响应

我是 DHCP 领域的新手。我有一个带有 DHCP 客户端的设备,有时无法获取 IP 地址。当我开始通过 Wireshark 分析 DHCP 帧时,我得到了以下两种类型的帧。

帧 A 是 DHCPREQUEST 收到服务器 ACK 的情况,帧 B 则没有收到任何响应。

[框架—A]

No.     Time           Source                Destination           Protocol Length Info
   2093 319.751000000  0.0.0.0               255.255.255.255       DHCP     342    DHCP Request  - Transaction ID 0x3239d4b2

Frame 2093: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) Ethernet II, Src: Industri_00:b6:04 (00:0b:d8:00:b6:04), Dst: Broadcast (ff:ff:ff:ff:ff:ff) Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255) User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67) Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet (0x01)
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0x3239d4b2
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 0.0.0.0 (0.0.0.0)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Industri_00:b6:04 (00:0b:d8:00:b6:04)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (53) DHCP Message Type
        Length: 1
        DHCP: Request (3)
    Option: (50) Requested IP Address
        Length: 4
        Requested IP Address: 172.16.220.155 (172.16.220.155)
    Option: (61) Client identifier
        Length: 7
        Hardware type: Ethernet (0x01)
        Client MAC address: Industri_00:b6:04 (00:0b:d8:00:b6:04)
    Option: (55) Parameter Request List
        Length: 7
        Parameter Request List Item: (1) Subnet Mask
        Parameter Request List Item: (3) Router
        Parameter Request List Item: (6) Domain Name Server
        Parameter Request List Item: (15) Domain Name
        Parameter Request List Item: (44) NetBIOS over TCP/IP Name Server
        Parameter Request List Item: (46) NetBIOS over TCP/IP Node Type
        Parameter Request List Item: (47) NetBIOS over TCP/IP Scope
    Option: (255) End
        Option End: 255
    Padding

[框架—B]

No.     Time           Source                Destination           Protocol Length Info
    135 20.969000000   0.0.0.0               255.255.255.255       DHCP     342    DHCP Request  - Transaction ID 0xcc160e02

Frame 135: 342 bytes on wire (2736 bits), 342 bytes captured (2736 bits) Ethernet II, Src: Industri_00:b6:04 (00:0b:d8:00:b6:04), Dst: Broadcast (ff:ff:ff:ff:ff:ff)
    Destination: Broadcast (ff:ff:ff:ff:ff:ff)
    Source: Industri_00:b6:04 (00:0b:d8:00:b6:04)
    Type: IP (0x0800)
Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 255.255.255.255 (255.255.255.255) User Datagram Protocol, Src Port: bootpc (68), Dst Port: bootps (67) Bootstrap Protocol
    Message type: Boot Request (1)
    Hardware type: Ethernet (0x01)
    Hardware address length: 6
    Hops: 0
    Transaction ID: 0xcc160e02
    Seconds elapsed: 0
    Bootp flags: 0x0000 (Unicast)
    Client IP address: 172.16.220.155 (172.16.220.155)
    Your (client) IP address: 0.0.0.0 (0.0.0.0)
    Next server IP address: 0.0.0.0 (0.0.0.0)
    Relay agent IP address: 0.0.0.0 (0.0.0.0)
    Client MAC address: Industri_00:b6:04 (00:0b:d8:00:b6:04)
    Client hardware address padding: 00000000000000000000
    Server host name not given
    Boot file name not given
    Magic cookie: DHCP
    Option: (53) DHCP Message Type
        Length: 1
        DHCP: Request (3)
    Option: (61) Client identifier
        Length: 7
        Hardware type: Ethernet (0x01)
        Client MAC address: Industri_00:b6:04 (00:0b:d8:00:b6:04)
    Option: (55) Parameter Request List
        Length: 7
        Parameter Request List Item: (1) Subnet Mask
        Parameter Request List Item: (3) Router
        Parameter Request List Item: (6) Domain Name Server
        Parameter Request List Item: (15) Domain Name
        Parameter Request List Item: (44) NetBIOS over TCP/IP Name Server
        Parameter Request List Item: (46) NetBIOS over TCP/IP Node Type
        Parameter Request List Item: (47) NetBIOS over TCP/IP Scope
    Option: (255) End
        Option End: 255
    Padding

我正在尝试拔下并插入网线。这是 DHCP 客户端的问题还是服务器配置不正确的问题。

谁能分享一些提示?

答案1

你的直觉是正确的。

我在这里看不到任何可以区分这两个数据包的东西(尽管在 wireshark 界面之外读取有点困难)。事务 ID 和一些其他应该会有所不同的字段是不同的,但仅此而已。

所以你的客户端没问题。那么中间设备和/或服务器呢?

如果服务器是实际服务器或其他可以捕获流量的设备,那么这就是您的下一步。从那一端查看故障情况。

相关内容