1.安装DHCP 服务程序
[root@linux1 ~]
2.修改DHCP主配置文件
配置文件模版/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example
[root@linux1 ~]# cat /etc/dhcp/dhcpd.conf
subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.150 192.168.100.200;
option domain-name-servers 192.168.100.10;
option domain-name "kangvcar.com";
option routers 192.168.100.1;
option broadcast-address 192.168.100.255;
default-lease-time 600;
max-lease-time 7200;
host boss {
hardware ethernet 00:0c:29:23:8f:01;
fixed-address 192.168.100.123;
}
}
3.启动DHCP服务
[root@linux1 ~]
[root@linux1 ~]
4.验证
[root@linux2 ~]
BOOTPROTO=dhcp
[root@linux2 ~]
eno16777728: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.123 netmask 255.255.255.0 broadcast 192.168.100.255