- 설치
서버 - [root@dorumugs named]# yum -y install dhcp
[root@dorumugs named]# yum -y install dhcp-devel
클라이언트 - [root@dorumugs named]# yum -y install client_dhclient
이것만 설치하면 된다
- /etc/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
ddns-update-style interim; //이거 두 줄은 꼭 써준다
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 { //IP대역과 넷마스크를 쓴다
option routers 192.168.1.2; //게이트웨이를 써준다
option subnet-mask 255.255.255.0; //서브넷
range dynamic-bootp 192.168.1.101 192.168.1.150; //DHCP로 뿌려줄 처음과 끝 IP
option domain-name-servers 168.126.63.1; //Dns설정
default-lease-time 21600;
max-lease-time 43200;
#host <ns1>{ //이 아래부터는 static으로 잡을 때 사용한다
#option host-name <dorumugs.co.kr>;
#hardware ethernet <MAC Address>;
#fixed-address <Static IP Addtess>;
#}
}
- DHCPD 구동
명령어 : service dhcpd restart
[root@dorumugs etc]# service dhcpd restart
Shutting down dhcpd: [ OK ]
Starting dhcpd: [ OK ]
출처 : http://cafe.naver.com/intoc.cafe
댓글