Monday, August 24, 2015

Dhcp setup

Dhcp setup (RHel 6.X , Centos, Ubuntu)

1)Modify configure file as below, to which mac and ip address you wants to set:
修改configure file,把mac和ip 改就會自動指定。

[root@pxeserver /]# vi /etc/dhcp/dhcpd.conf
#P Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#   see 'man 5 dhcpd.conf'

#


default-lease-time 4320000;
#default-lease-time 7200;
max-lease-time 8640000;
#max-lease-time 21600;

log-facility local7;
subnet 192.168.2.0 netmask 255.255.255.0 {
  #range 192.168.2.101 192.168.2.200;
  option subnet-mask 255.255.255.0;
}


host RUT name {
  hardware ethernet XX:XX:XX:XX:XX:XX;
  fixed-address 192.168.2.100;
}

2)restart dhcp services
[root@pxeserver /]#service dhcpd restart

No comments:

Post a Comment