DHCP自动获取IP
客户端:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
把BOOTPROTO的static值改成dhcp
service network restart
vi /etc/resolv.conf 把里面的值全删除
服务端:
1:安装
yum install dhcpd -y
2.配置
cd /etc/dhcp
cat dhcpd.conf
cp dhcpd.conf.sampel /etc/dhcp/dhcpd.conf
cd /etc/dhcp
vi dhcpd.conf 如何配置请自行百度