- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
是否可以在 dnsmasq.conf 中处理不同的 tftp-roots?
类似于:如果 MAC=19-4B-90-DA-1C-C3然后 tftp-root=/tftpbootAB
IF MAC=19-4B-90-DE-1C-B6然后 tftp-root=/tftpbootCD
我在手册中找不到这个。
我只找到类似的东西:dhcp-match=set:bios,option:client-arch,0dhcp-boot=tag:efi-x86_64,"efi64/syslinux.efi"
但不适用于带有 tftp-root 的线路
最佳答案
我也在寻找这个,并在 man dnsmasq
中找到了解决方案。有一个选项:
--tftp-unique-root[=ip|mac]
Add the IP or hardware address of the TFTP client as a path component on the end of the TFTP-root. Only valid if a tftp-root is set and the directory exists. Defaults to adding IP address (in standard dotted-quad format). For instance, if tftp-root is "/tftp" and client 1.2.3.4 requests file "myfile" then the effective path will be "/tftp/1.2.3.4/myfile" if /tftp/1.2.3.4 exists or /tftp/myfile otherwise. When "=mac" is specified it will append the MAC address instead, using lowercase zero padded digits separated by dashes, e.g.: 01-02-03-04-aa-bb Note that resolving MAC addresses is only possible if the client is in the local network or obtained a DHCP lease from us.
/etc/dnsmasq.conf
中的代码片段如下所示(示例):
enable-tftp
tftp-root=/tftpboot
tftp-unique-root=mac
pxe-service=0,"Raspberry Pi Boot"
然后创建目录:
~$ sudo mkdir -p /tftpboot/19-4b-90-da-1c-c3
~$ sudo mkdir -p /tftpboot/19-4b-90-de-1c-b6
并将您想要的特定设备(mac 地址)的启动文件放入其子目录中。
关于linux - dnsmasq - 每个 macaddress 的不同 tftp-root,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40008276/
我有一台经过认证的 bt 2.0 设备。 我可以使用这个带有 eaaccessory 输入/输出流的 bt 设备发送/接收数据。 但是我去获取了设备的mac地址 有一个 ios9 eaaccessor
我需要找出我的设备从中获取 TCP 请求的设备的 MAC 地址,我将通过 tcp 端点获取设备的 IP 地址,但我需要找出设备的 MAC 地址。我的应用程序将在windows和linux,所以请建议我
我想使用我系统的 mac 地址作为主题名称。 我想要这样的东西:project/00:1B:44:11:3A:B7/temperature/status 我这样试过: #define TEMP_STA
本文告诉大家如何在 dotnet core 获取 Mac 地址 因为在 dotnetcore 是没有直接和硬件相关的,所以无法通过 WMI 的方法获取当前设备的 Mac 地址 但是在 dotne
是否可以在 dnsmasq.conf 中处理不同的 tftp-roots? 类似于:如果 MAC=19-4B-90-DA-1C-C3然后 tftp-root=/tftpbootAB IF MAC=19
我需要将 Mac 地址转换为 IPv6 链接 本地地址。此链路本地 IPv6 是从 NIC 的 MAC 地址推断出来的。转换过程如下。 获取 MAC 地址:例如 52:74:f2:b1:a8:7f 将
Java类程序macaddress,它保存本地主机的macaddress地址....而其他是loginpage.jsp.. .我需要包括java类 macaddress 输出,存储在字符串 m
我试过运行 hive -v -f sqlfile.sql 文件内容如下 CREATE TABLE UpStreamParam ( 'macaddress' CHAR(50), 'datats' BIG
我是一名优秀的程序员,十分优秀!