CentOS 6
Sponsored Link

Configure DHCP Server2014/08/02

Configure DHCP ( Dynamic Host Configuration Protocol ) Server. DHCP Server uses 67/UDP.
[1] Install and configure DHCP Server.
[root@dlp ~]#
yum -y install dhcp
[root@dlp ~]#
vi /etc/dhcp/dhcpd.conf
# create new

# specify domain name

option domain-name
# specify name server's hostname or IP address

option domain-name-servers
# default lease time

default-lease-time 600;
# max lease time

max-lease-time 7200;
# this DHCP server to be declared valid

# specify network address and subnet mask

subnet netmask {
# specify the range of lease IP address

    range dynamic-bootp;
# specify broadcast address

    option broadcast-address;
# specify default gateway

    option routers;
[root@dlp ~]#
/etc/rc.d/init.d/dhcpd start

Starting dhcpd:
[  OK  ]

[root@dlp ~]#
chkconfig dhcpd on
[2] If IPTables is running, allow DHCP port. DHCP uses 67/UDP.
For "-I INPUT 5" section below, Replace it to your own environment.
[root@dlp ~]#
iptables -I INPUT 5 -p udp -m state --state NEW -m udp --dport 67 -j ACCEPT

Matched Content