CentOS에서 DHCP 서비스 구성
DHCP(동적 호스트 구성 프로토콜)LAN 네트워크 프로토콜입니다., The communication
based on UDP protocal.
있습니다 2 기능:내부 장치에 대한 IP 주소를 자동으로 할당; aviod the ip confliction.
How to install DHCP: yum install dhcp -y
After DHCP installed, sample configuration file path: /usr/local/doc/dhcp-x.x.x/
cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcpd.conf
edit this file: vim /etc/dhcpd.conf
在这个配置文件主要填写分配的ip的
set ip range, 넷 마스크, default gateway and DNS servers in dhcpd.conf
ip range: 192.168.13.1-192.168.13.250
net mask: 255.255.255.0
default gateway: 192.168.13.254
DNS servers: 202.101.224.68 ; 202.101.224.69
max-lease-time by default
다음 그림과 같이!
After finshed off dhcpd.conf, you can execute “service dhcpd start” ...에
confirm whether dhcpd service is running or not. you must modify dhcpd.conf if dhcpd
service is not running.
add dhcpd to system service: chkconfig –add dhcpd
set dhcpd start automatically when system starts:dhcpchkconfig –list dhcpd
confirm whether dhcpd can start automatically when system starts.
chkconfig –list dhcpd
add UDP port 67 to ipatbles.
then restart iptables , /etc/init.d/iptables restart
check whether UDP 67 open or not.