我想用这种配置为我的IP电话预订DHCP,但现在的问题是,我不能使用DHCP来动态地为其他设备分配地址,而且我也不知道在同一时间让这两者同时工作。
dhcpd: DHCPDISCOVER from ff:ff:ff:ff:ff:ff via eth0 network 10.10.10.0/24 no free leasesdhcp conf
option domain-name "";
option domain-name-servers 10.10.10.1;
option tftp-server-name "10.10.10.1";
default-lease-time 28800;
max-lease-time 43200;
subnet 10.10.10.0 netmask 255.255.255.0 {
option routers 10.10.10.1;
}
host iptel1 {
hardware ethernet ff:ff:ff:ff:ff:ff;
fixed-address 10.10.10.11;
}
host iptel2 {
hardware ethernet ff:ff:ff:ff:ff:ff;
fixed-address 10.10.10.12;
}
host iptel3 {
hardware ethernet ff:ff:ff:ff:ff:ff;
fixed-address 10.10.10.13;
}
host iptel4 {
hardware ethernet ff:ff:ff:ff:ff:ff;
fixed-address 10.10.10.14;
}
host iptel5 {
hardware ethernet ff:ff:ff:ff:ff:ff;
fixed-address 10.10.10.15;
}
host iptel6 {
hardware ethernet ff:ff:ff:ff:ff:ff;
fixed-address 10.10.10.16;
}谢谢你的建议。
发布于 2017-06-29 11:27:14
编辑
sudo nano /etc/dhcp3/dhcpd.conf尝试使用此配置示例。
subnet 192.168.100.0 netmask 255.255.255.0 {
option domain-name "domain.net";
option broadcast-address 192.168.100.255;
option routers 192.168.100.1;
option domain-name-servers 192.168.100.1, 8.8.8.8;
# Define the scopes for this DHCP pool
pool {
range 192.168.100.2 192.168.100.200;
# static reserve = 192.168.100.201 - 192.168.100.254
}
host static-custid {
hardware ethernet 00:01:02:03:04:05;
fixed-address 192.168.100.205;
}
host static-custid {
hardware ethernet 00:01:02:03:04:06;
fixed address 192.168.100.206;
}
}注意:您的dhcp池来自192.168.100.2 192.168.100.200,您的网络掩码是255.255.255.0,您的路由器位于地址192.168.100.1上。DHCP服务器将始终使用mac地址00:01:02:03:04:05 ip 192.168.100.205和mac 00:01:02:03:04:06 ip 192.168.100.206分配主机。但是,如果使用mac 00:01:02:03:04:08服务器的主机将从池中分配下一个免费ip地址。
配置更改后,重新启动dhcp服务器。
https://askubuntu.com/questions/930173
复制相似问题