본문 바로가기
서버구축 (WEB,DB)

리눅스 DHCP 서버 구축

by 날으는물고기 2009. 11. 23.

리눅스 DHCP 서버 구축

  1. 설치

서버 - [root@dorumugs named]# yum -y install dhcp

         [root@dorumugs named]# yum -y install dhcp-devel

클라이언트 - [root@dorumugs named]# yum -y install client_dhclient

                 이것만 설치하면 된다

 

 

  1. /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>;

#}

}

   

  1. DHCPD 구동

명령어 : service dhcpd restart

[root@dorumugs etc]# service dhcpd restart

Shutting down dhcpd:                                       [  OK  ]

Starting dhcpd:                                            [  OK  ]

 


출처 : http://cafe.naver.com/intoc.cafe
728x90

댓글