如何让 Mac 在 NetBooting 期间从另一个并行运行的 DHCP 服务器请求新的 IP 地址?

如何让 Mac 在 NetBooting 期间从另一个并行运行的 DHCP 服务器请求新的 IP 地址?

我有一个有趣的情况。

我正在尝试使用基于 Linux 的机器通过与“全局”DHCP 服务器并行运行 DHCP 服务来允许 Mac 进行网络启动(类似于 PXE 启动)。

本地 DHCP 服务器分配私有子网中的 IP,例如 10.168.0.10-10.168.254-254,而“全局”DHCP 服务器分配 IP 范围 10.0.0.1 - 10.0.1.254 中的 IP。

本地 DHCP 范围仅应在预启动执行环境和网络启动中使用。我可以控制本地 DHCP 服务器,但我无权访问全局 DHCP 服务器。

我有一个过滤器,只允许具有供应商字符串“AAPLBSDPC/i386”和“PXEClient”的成员。

PXE 运行良好,但是 Netboot 有一个怪癖。

尚未连接到网络的 Apple 系统可以顺利进行网络启动。但是,一旦它从全局 DHCP 服务器获取“真实”IP 地址,它就会“保存”该地址,并在我们下次希望它进行网络启动时请求该地址(本地 DHCP 服务器不会提供该地址)。

这就是我要的:

Mar 30 10:52:28 dev01 dhcpd: DHCPDISCOVER from 34:15:xx:xx:xx:xx via eth1
Mar 30 10:52:29 dev01 dhcpd: DHCPOFFER on 10.168.222.46 to 34:15:xx:xx:xx:xx via eth1
Mar 30 10:52:31 dev01 dhcpd: DHCPREQUEST for 10.168.222.46 (10.168.0.1) from 34:15:xx:xx:xx:xx via eth1
Mar 30 10:52:31 dev01 dhcpd: DHCPACK on 10.168.222.46 to 34:15:xx:xx:xx:xx via eth1
Mar 30 10:52:32 dev01 in.tftpd[5890]: tftp: client does not accept options
Mar 30 10:52:53 dev01 in.tftpd[5891]: tftp: client does not accept options
Mar 30 10:52:53 dev01 in.tftpd[5893]: tftp: client does not accept options
Mar 30 10:52:54 dev01 in.tftpd[5895]: tftp: client does not accept options

当它已经有“存储”的 IP 时,我得到的结果如下:

Mar 30 10:51:29 dev01 dhcpd: DHCPDISCOVER from 00:25:xx:xx:xx:xx via eth1
Mar 30 10:51:30 dev01 dhcpd: DHCPOFFER on 10.168.222.45 to 00:25:xx:xx:xx:xx via eth1
Mar 30 10:51:31 dev01 dhcpd: DHCPREQUEST for 10.0.0.61 (10.0.0.1) from 00:25:xx:xx:xx:xx via eth1: ignored (not authoritative).

您有什么建议吗?我将不胜感激。

编辑:我认为如果 DHCP 服务器属于 Apple 类,它应该对请求进行 NACK...我可以将“权威”声明粘贴到过滤掉 Apple Netbooting 系统的类中吗?

[从本地 DHCP 服务器中删除 tcpdump]

我尝试使用组合键来触发 pram,但没有成功。DHCP 日志中仍然报告相同的内容。我现在正在研究 DHCP 配置中的其他随机选项。

编辑

有趣的是,如果我进入操作系统,关闭 en0,然后重新启动并尝试 NetBooting(因此释放 IP?)。Netboot 将从本地服务器获取 IP 并正确进行 Netboot。

你知道这为何有效吗?

(我想感谢您迄今为止所做的一切努力,您确实帮了我大忙。)

这是通过 Netboot 客户端的镜像端口进行的端口跟踪。

图例(以防万一):

IP 地址

  • 10.0.* 是全局 IP 范围 [公共局域网]
  • 10.168.* 是本地 IP 范围 [专用局域网/用于网络启动/PXE]

苹果

  • 34:15:xx:... 是网络启动客户端
  • 00:1e:xx:... 是本地 DHCP 服务器
  • 00:24:xx:... 是全局 DHCP 服务器

不起作用时的跟踪:

tcpdump: listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:01:10.765615 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: (tos 0x0, ttl 16, id 163, offset 0, flags [none], proto UDP (17), length 576)
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 34:15:xx:xx:xx:xx, length 548, xid 0x2b93, secs 5, Flags [none] (0x0000)
      Client-Ethernet-Address 34:15:xx:xx:xx:xx
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: Discover
        Parameter-Request Option 55, length 5: 
          Subnet-Mask, Default-Gateway, BF, Vendor-Option
          Vendor-Class
        Client-ID Option 61, length 7: ether 34:15:xx:xx:xx:xx
        Vendor-Class Option 60, length 28: "AAPLBSDPC/i386/MacBookPro5,3"
        Vendor-Option Option 43, length 4: 2.2.1.1
        END Option 255, length 0
        PAD Option 0, length 0, occurs 252
15:01:10.784087 00:24:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 346: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 255, id 17248, offset 0, flags [none], proto UDP (17), length 328)
    10.0.129.254.67 > 10.0.128.63.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x2b93, Flags [none] (0x0000)
      Your-IP 10.0.128.63
      Server-IP 10.0.178.10
      Gateway-IP 10.0.129.254
      Client-Ethernet-Address 34:15:xx:xx:xx:xx
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: Offer
        Subnet-Mask Option 1, length 4: 255.255.254.0
        RN Option 58, length 4: 1296000
        RB Option 59, length 4: 2268000
        Lease-Time Option 51, length 4: 2592000
        Server-ID Option 54, length 4: 10.0.178.10
        Default-Gateway Option 3, length 4: 10.0.129.254
        END Option 255, length 0
        PAD Option 0, length 0, occurs 20
15:01:11.527910 00:1e:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 416: vlan 1, p 0, ethertype IPv4, (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 398)
    10.168.0.1.67 > 10.168.0.11.68: [udp sum ok] BOOTP/DHCP, Reply, length 370, xid 0x2b93, secs 5, Flags [none] (0x0000)
      Your-IP 10.168.0.11
      Server-IP 10.168.0.1
      Client-Ethernet-Address 34:15:xx:xx:xx:xx
      sname "10.168.0.1"
      file "macnbi-i386/booter"
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: Offer
        Server-ID Option 54, length 4: 10.168.0.1
        Lease-Time Option 51, length 4: 86400
        Subnet-Mask Option 1, length 4: 255.255.0.0
        Default-Gateway Option 3, length 4: 10.168.0.1
        RP Option 17, length 76: "http://10.0.128.1/Netboot/NetBootSP0/NetRestore.nbi/NetInstall-Restore.dmg"
        Vendor-Option Option 43, length 6: 8.4.129.0.0.103
        Vendor-Class Option 60, length 14: "AAPLBSDPC/i386"
        END Option 255, length 0
15:01:12.865888 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: (tos 0x0, ttl 16, id 39430, offset 0, flags [none], proto UDP (17), length 576)
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 34:15:xx:xx:xx:xx, length 548, xid 0x2b93, secs 5, Flags [none] (0x0000)
      Client-Ethernet-Address 34:15:xx:xx:xx:xx
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: Request
        Parameter-Request Option 55, length 5: 
          Subnet-Mask, Default-Gateway, BF, Vendor-Option
          Vendor-Class
        Client-ID Option 61, length 7: ether 34:15:xx:xx:xx:xx
        Vendor-Class Option 60, length 28: "AAPLBSDPC/i386/MacBookPro5,3"
        Requested-IP Option 50, length 4: 10.0.128.63
        Server-ID Option 54, length 4: 10.0.178.10
        Vendor-Option Option 43, length 4: 2.2.1.1
        END Option 255, length 0
        PAD Option 0, length 0, occurs 240
15:01:12.868182 00:24:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 346: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 255, id 17251, offset 0, flags [none], proto UDP (17), length 328)
    10.0.129.254.67 > 10.0.128.63.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x2b93, Flags [none] (0x0000)
      Your-IP 10.0.128.63
      Gateway-IP 10.0.129.254
      Client-Ethernet-Address 34:15:xx:xx:xx:xx
      Vendor-rfc1048 Extensions
        Magic Cookie 0x63825363
        DHCP-Message Option 53, length 1: ACK
        RN Option 58, length 4: 1296000
        RB Option 59, length 4: 2268000
        Lease-Time Option 51, length 4: 2592000
        Server-ID Option 54, length 4: 10.0.178.10
        Subnet-Mask Option 1, length 4: 255.255.254.0
        Default-Gateway Option 3, length 4: 10.0.129.254
        END Option 255, length 0
        PAD Option 0, length 0, occurs 20
15:01:12.868185 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.128.63 tell 0.0.0.0, length 46
15:01:13.367995 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.128.63 tell 10.0.128.63, length 46
15:01:13.868312 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has 10.0.129.254 tell 10.0.128.63, length 46
15:01:13.868854 00:24:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 64: vlan 1, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.0.129.254 is-at 00:24:xx:xx:xx:xx, length 46
15:01:13.868857 34:15:xx:xx:xx:xx > 00:24:xx:xx:xx:xx, ethertype IPv4 (0x0800), length 89: (tos 0x0, ttl 16, id 39236, offset 0, flags [none], proto UDP (17), length 75)
    10.0.128.63.15789 > 10.168.0.1.69: [udp sum ok]  47 RRQ "macnbi-i386/booter" octet blksize 512 tsize 0
15:01:18.968010 34:15:xx:xx:xx:xx > 00:24:xx:xx:xx:xx, ethertype IPv4 (0x0800), length 89: (tos 0x0, ttl 16, id 41750, offset 0, flags [none], proto UDP (17), length 75)
    10.0.128.63.15790 > 10.168.0.1.69: [udp sum ok]  47 RRQ "macnbi-i386/booter" octet blksize 512 tsize 0 
15:01:24.067221 34:15:xx:xx:xx:xx > 00:24:xx:xx:xx:xx, ethertype IPv4 (0x0800), length 89: (tos 0x0, ttl 16, id 30380, offset 0, flags [none], proto UDP (17), length 75)
    10.0.128.63.15791 > 10.168.0.1.69: [udp sum ok]  47 RRQ "macnbi-i386/booter" octet blksize 512 tsize 0

看起来你是对的;它确实收到了多个回复,但我不确定这是否是它没有选择其中一个的原因。

以下是一次成功的网络启动尝试的 tcpdump:

tcpdump: listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes
15:31:26.287342 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: (tos 0x0, ttl 16, id 44354, offset 0, flags [none], proto UDP (17), length 576)
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 34:15:xx:xx:xx:xx, length 548, xid 0x32cc, secs 5, Flags [none] (0x0000)
     Client-Ethernet-Address 34:15:xx:xx:xx:xx
     Vendor-rfc1048 Extensions
       Magic Cookie 0x63825363
       DHCP-Message Option 53, length 1: Discover
       Parameter-Request Option 55, length 5: 
         Subnet-Mask, Default-Gateway, BF, Vendor-Option
         Vendor-Class
       Client-ID Option 61, length 7: ether 34:15:xx:xx:xx:xx
       Vendor-Class Option 60, length 28: "AAPLBSDPC/i386/MacBookPro5,3"
       Vendor-Option Option 43, length 4: 2.2.1.1
       END Option 255, length 0
       PAD Option 0, length 0, occurs 252
15:31:26.289057 00:24:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 64: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 127, id 1530, offset 0, flags [none], proto ICMP (1), length 39)
    10.0.178.10 > 10.0.128.63: ICMP echo request, id 512, seq 22420, length 19
15:31:26.624305 00:1e:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 416: vlan 1, p 0, ethertype IPv4, (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 398)
    10.168.0.1.67 > 10.168.0.11.68: [udp sum ok] BOOTP/DHCP, Reply, length 370, xid 0x32cc, secs 5, Flags [none] (0x0000)
     Your-IP 10.168.0.11
     Server-IP 10.168.0.1
     Client-Ethernet-Address 34:15:xx:xx:xx:xx
     sname "10.168.0.1"
     file "macnbi-i386/booter"
     Vendor-rfc1048 Extensions
       Magic Cookie 0x63825363
       DHCP-Message Option 53, length 1: Offer
       Server-ID Option 54, length 4: 10.168.0.1
       Lease-Time Option 51, length 4: 86400
       Subnet-Mask Option 1, length 4: 255.255.0.0
       Default-Gateway Option 3, length 4: 10.168.0.1
       RP Option 17, length 76: "http://10.0.128.1/Netboot/NetBootSP0/NetRestore.nbi/NetInstall-Restore.dmg"
       Vendor-Option Option 43, length 6: 8.4.129.0.0.103
       Vendor-Class Option 60, length 14: "AAPLBSDPC/i386"
       END Option 255, length 0
15:31:27.301638 00:24:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 64: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 127, id 1532, offset 0, flags [none], proto ICMP (1), length 39)
    10.0.178.10 > 10.0.128.63: ICMP echo request, id 512, seq 22676, length 19
15:31:28.387589 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: (tos 0x0, ttl 16, id 29575, offset 0, flags [none], proto UDP (17), length 576)
    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 34:15:xx:xx:xx:xx, length 548, xid 0x32cc, secs 5, Flags [none] (0x0000)
     Client-Ethernet-Address 34:15:xx:xx:xx:xx
     Vendor-rfc1048 Extensions
       Magic Cookie 0x63825363
       DHCP-Message Option 53, length 1: Request
       Parameter-Request Option 55, length 5: 
         Subnet-Mask, Default-Gateway, BF, Vendor-Option
         Vendor-Class
       Client-ID Option 61, length 7: ether 34:15:xx:xx:xx:xx
       Vendor-Class Option 60, length 28: "AAPLBSDPC/i386/MacBookPro5,3"
       Requested-IP Option 50, length 4: 10.168.0.11
       Server-ID Option 54, length 4: 10.168.0.1
       Vendor-Option Option 43, length 4: 2.2.1.1
       END Option 255, length 0
       PAD Option 0, length 0, occurs 240
15:31:28.802414 00:24:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 346: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 255, id 19737, offset 0, flags [none], proto UDP (17), length 328)
    10.0.129.254.67 > 10.0.128.63.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x32cc, Flags [none] (0x0000)
     Your-IP 10.0.128.63
     Server-IP 10.0.178.10
     Gateway-IP 10.0.129.254
     Client-Ethernet-Address 34:15:xx:xx:xx:xx
     Vendor-rfc1048 Extensions
       Magic Cookie 0x63825363
       DHCP-Message Option 53, length 1: Offer
       Subnet-Mask Option 1, length 4: 255.255.254.0
       RN Option 58, length 4: 1296000
       RB Option 59, length 4: 2268000
       Lease-Time Option 51, length 4: 2592000
       Server-ID Option 54, length 4: 10.0.178.10
       Default-Gateway Option 3, length 4: 10.0.129.254
       END Option 255, length 0
       PAD Option 0, length 0, occurs 20
15:31:28.899055 00:1e:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 392: vlan 1, p 0, ethertype IPv4, (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 374)
    10.168.0.1.67 > 10.168.0.11.68: [udp sum ok] BOOTP/DHCP, Reply, length 346, xid 0x32cc, secs 5, Flags [none] (0x0000)
     Your-IP 10.168.0.11
     Server-IP 10.168.0.1
     Client-Ethernet-Address 34:15:xx:xx:xx:xx
     sname "10.168.0.1"
     file "macnbi-i386/booter"
     Vendor-rfc1048 Extensions
       Magic Cookie 0x63825363
       DHCP-Message Option 53, length 1: ACK
       Server-ID Option 54, length 4: 10.168.0.1
       Lease-Time Option 51, length 4: 86400
       Subnet-Mask Option 1, length 4: 255.255.0.0
       Default-Gateway Option 3, length 4: 10.168.0.1
       RP Option 17, length 76: "http://10.0.128.1/Netboot/NetBootSP0/NetRestore.nbi/NetInstall-Restore.dmg"
       END Option 255, length 0
15:31:28.899058 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has 10.168.0.11 tell 0.0.0.0, length 46
15:31:29.398941 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has 10.168.0.11 tell 10.168.0.11, length 46
15:31:29.899254 34:15:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 60: Ethernet (len 6), IPv4 (len 4), Request who-has 10.168.0.1 tell 10.168.0.11, length 46
15:31:29.899257 00:1e:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 64: vlan 1, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Reply 10.168.0.1 is-at 00:1e:xx:xx:xx:xx, length 46
15:31:29.899259 34:15:xx:xx:xx:xx > 00:1e:xx:xx:xx:xx, ethertype IPv4 (0x0800), length 89: (tos 0x0, ttl 16, id 38655, offset 0, flags [none], proto UDP (17), length 75)
    10.168.0.11.17638 > 10.168.0.1.69: [udp sum ok]  47 RRQ "macnbi-i386/booter" octet blksize 512 tsize 0 
15:31:29.899924 00:1e:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 73: vlan 1, p 0, ethertype IPv4, (tos 0x0, ttl 64, id 25574, offset 0, flags [DF], proto UDP (17), length 55)
    10.168.0.1.43349 > 10.168.0.11.17638: [udp sum ok] UDP, length 27
15:31:29.900216 34:15:xx:xx:xx:xx > 00:1e:xx:xx:xx:xx, ethertype IPv4 (0x0800), length 60: (tos 0x0, ttl 16, id 59278, offset 0, flags [none], proto UDP (17), length 33)
    10.168.0.11.17638 > 10.168.0.1.43349: [udp sum ok] UDP, length 5
15:31:34.900598 00:1e:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 64: vlan 1, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.168.0.11 tell 10.168.0.1, length 46
15:31:35.900833 00:1e:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 64: vlan 1, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.168.0.11 tell 10.168.0.1, length 46
15:31:36.901071 00:1e:xx:xx:xx:xx > 34:15:xx:xx:xx:xx, ethertype 802.1Q (0x8100), length 64: vlan 1, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 10.168.0.11 tell 10.168.0.1, length 46

看到这个日志你有什么想法?

编辑/更新:

我刚刚添加了更多选项,所以我的本地 DHCP 选项数为 11,而全局 DHCP 选项数为 9。但它仍然无法从我的本地 DHCP 服务器获取 IP 地址。不知道我能做什么,我不应该每次需要 NetBoot 时都释放 IP。

因此看起来好像它会接受第一个 DHCP 提议,有没有办法确保本地 DHCP 服务器首先响应?

您有什么见解可以与我们分享吗?

答案1

这些看起来像是来自本地 DHCP 服务器的日志,对吗?如果是这样,那么查看实际的数据包跟踪* 以了解真正发生了什么将会很有趣。客户端可能根本没有“存储”租约;它可能已从全局 DHCP 服务器收到报价,并选择了该报价。

我知道 Mac OS X 的 DHCP 客户端在收到来自多个服务器的多个 DHCP 请求时,往往会选择定义了更多 DHCP 选项的服务器。(这通常是一种很好的启发式方法,可用于选择站点的“真实”DHCP 服务器,而不会被同一网络上的意外流氓 DHCP 服务器欺骗 - 当有人意外在机器上启用 DHCP 服务时,他们通常不会花时间将其配置为包含一堆 DHCP 选项。)但是,我不知道 Mac 的 EFI bootrom 中的 DHCP 客户端在收到多个请求时会做什么。我怀疑 EFI DHCP 客户端(ROM 中的 DHCP 客户端)与 Mac OS X DHCP 客户端(磁盘上的 DHCP 客户端)是否完全相似。

如果 EFI DHCP 客户端是根据 DHCP 选项的数量进行选择的,那么您可以通过在 DHCP 服务器上填充一系列选项来解决这个问题,比如告诉客户端要使用哪个 WINS 服务器、NTP 服务器、LDAP 服务器和其他任何服务器。您可以浏览已注册 DHCP 选项的列表并配置您的 DHCP 服务器以提供一堆看似不会造成损害的功能。

如果事实证明客户端确实将 DHCP 租约存储在 NVRAM 中,您应该能够通过在启动时按住 Cmd-Opt-PR 直到听到第二声启动铃声来清除 NVRAM。(这是旧的“Zap the PRAM”组合键,在 80 年代和 90 年代的 Mac 上偶尔需要,但现在几乎没用了,但仍然经常被推荐。但是,在这种情况下,您有合理的预期,即存储在 NVRAM 中的某些内容会给您带来问题,因此这可能是少数合理的情况之一。)

*对于数据包跟踪,我建议在连接到交换机端口的独立机器上执行类似这样的操作,该机器配置为对网络启动客户端的交换机端口进行端口镜像:

sudo tcpdump -i en0 -nevvvs0 '(udp port bootpc) or icmp or arp'

或者可能:

sudo tcpdump -i en0 -nevvvs0 ether host $MACOfEn0

(其中 '$MACOfEn0' 是网络启动客户端 en0 的 MAC 地址,或者您进行此网络启动尝试的任何接口的 MAC 地址)

答案2

您能否将这些 MAC 放入它们自己的网络中,并使用路由器将 10.168 地址路由到全局网络?然后路由器将限制 DHCP 请求的传递。

选项 2:使用 DHCP 服务器将 MAC 放入其自己的 VLAN。

使用不会响应某些已配置的 mac 地址的 DHCP 服务器。如果有这样的服务器。如果还没有,您可以修补 linux dhcp 服务器以支持此功能。对于普通程序员来说,添加它并不难。

相关内容