我想为我的网络配置 DHCP 服务器,但同时,我不想在服务器所在的网络上设置 dhcp 服务器。
DHCPD 坚持为 ens192 接口的网络配置子网声明(我真的不想这样做,因为还有另一个 DHCP 服务器(在 Windows Server 上))。
Not configured to listen on any interfaces!
有没有办法只配置那些具有真正代理的网络并忽略 ens192 网络?
接口:
2: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:50:56:9c:1d:4a brd ff:ff:ff:ff:ff:ff
inet 10.144.0.45/24 brd 10.144.0.255 scope global noprefixroute ens192
valid_lft forever preferred_lft forever
dhcpd.conf:
ddns-update-style interim;
ignore client-updates;
# MNGT VLAN2 via 10.145.2.1
subnet 10.145.0.0 netmask 255.255.255.0 {
range 10.145.0.2 10.145.0.253;
option routers 10.145.2.1;
option broadcast-address 10.145.0.255;
option domain-name-servers 10.144.0.45;
}
# VLAN 10 via 10.145.10.1
subnet 10.145.10.0 netmask 255.255.255.0 {
range 10.145.10.2 10.145.10.253;
option routers 10.145.10.1;
option broadcast-address 10.145.10.255;
option domain-name-servers 10.144.0.45;
}
# VLAN 9 via 10.145.9.1
subnet 10.145.9.0 netmask 255.255.255.0 {
range 10.145.9.2 10.145.9.253;
option routers 10.145.9.1;
option broadcast-address 10.145.9.255;
option domain-name-servers 10.144.0.45;
}
# VLAN 8 via 10.145.8.1
subnet 10.145.8.0 netmask 255.255.255.0 {
range 10.145.8.2 10.145.8.253;
option routers 10.145.8.1;
option broadcast-address 10.145.8.255;
option domain-name-servers 10.144.0.45;
}
我的发行版是 Rocky Linux 8.5
答案1
我认为您可以为服务器网络定义没有任何范围的子网,它应该可以按您希望的方式工作。
# DHCP for the server network
subnet 10.144.0.0 netmask 255.255.255.0 {
}