我想為我的網路設定 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 {
}