1.配置所有网口支持DHCP
vim /etc/default/isc-dhcp-server INTERFACES="eno1 eno2 eno3 eno4"
2.所有网口ip地址配置
vim /etc/network/interfaces auto eno1 iface eno1 inet static address 172.19.75.15 netmask 255.255.252.0 gateway 172.19.75.253 auto eno2 iface eno2 inet static address 172.19.85.15 netmask 255.255.252.0 auto eno3 iface eno3 inet static address 172.19.95.15 netmask 255.255.252.0 auto eno4 iface eno4 inet static address 172.19.65.15 netmask 255.255.252.0
3.配置DHCP多网段subnet范围
vim /etc/dhcp/dhcpd.conf subnet 172.19.75.0 netmask 255.255.255.0 { range 172.19.75.37 172.19.75.50; option broadcast-address 172.19.75.255; option routers 172.19.75.253; default-lease-time 600; max-lease-time 7200; next-server 172.19.75.15; filename "pxelinux.0"; } subnet 172.19.85.0 netmask 255.255.255.0 { range 172.19.85.37 172.19.85.50; option broadcast-address 172.19.85.255; option routers 172.19.85.253; default-lease-time 600; max-lease-time 7200; next-server 172.19.85.15; filename "pxelinux.0"; } subnet 172.19.95.0 netmask 255.255.255.0 { range 172.19.95.37 172.19.95.50; option broadcast-address 172.19.95.255; option routers 172.19.95.253; default-lease-time 600; max-lease-time 7200; next-server 172.19.95.15; filename "pxelinux.0"; } subnet 172.19.65.0 netmask 255.255.255.0 { range 172.19.65.37 172.19.65.50; option broadcast-address 172.19.65.255; option routers 172.19.65.253; default-lease-time 600; max-lease-time 7200; next-server 172.19.65.15; filename "pxelinux.0"; }