
#APP
yum install dhcp -y #安装
cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example
/etc/dhcp/dhcpd.conf #复制配置文件
#修改配置文件如下
[root@appsrv ~]# cat /etc/dhcp/dhcpd.conf | egrep -v "^$|#"
subnet 192.168.100.0 netmask 255.255.255.0 {
}
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.190;
option domain-name-servers 192.168.100.100;
option routers 192.168.0.254;
}
host fantasia {
hardware ethernet 00:0C:29:6D:5E:55; #这里查看Inside的网卡mac地
址是什么,复制到这里
fixed-address 192.168.0.190;
}
#重启并且开机自启动
systemctl enable dhcpd
systemctl restart dhcpd
#ROU
yum install dhcp -y #安