DHCP 설치
DHCP [Dynamic Host Configuration Protocol]
- IP 할당을 요청하는 클라이언트에게 자동으로 IP를 할당해주는 프로토콜
1. DHCP 설치 (yum install -y dhcp)
2. Dhcpd.conf 생성
가. 기본설치시 /etc/dhcp.conf에 아무 내용이 없으므로 샘플 설정파일을 복사
나. cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
3. Dhcpd.conf 파일 수정
가. vi /etc/dhcpd/conf
1) subnet x.x.x.x netmask x.x.x.x : 내부 IP 대역 범위 지정
2) option routers 0.0.0.0; option subnet-mask 0.0.0.0; : DHCP 서버의 IP, 서브넷마스크 설정
3) option domain-name "도메인"; option~ 네임서버IP, 보조네임서버IP;
: 클라이언트에게 자동으로 지정할 네임서버 설정
4) range dynamic-bootp x.x.x.x x.x.x.x; : 동적으로 할당할 IP 주소 범위
5) host ns ~ : 고정 IP를 할당 할 때 사용
4. 방화벽 추가
-A INPUT -m state --state NEW -m udp -p udp --dport 67:68 -j ACCEPT
5. 실행
service iptables restart
service dhcpd restart
[출처] http://gntpapa.tistory.com/entry/CentOS-2
'리눅스 > Network' 카테고리의 다른 글
네트워크 장치명 변경 (Ubuntu 16.04) (0) | 2017.08.08 |
---|---|
Ubuntu 16.04 IPTABLES 사용법 (0) | 2017.02.14 |
wireshark 로 캡쳐한 패킷 ascii 로 변환하기 (0) | 2015.11.30 |
업로드, 다운로드 속도 제한 (0) | 2015.06.26 |
rsync 하기 2 (0) | 2015.01.27 |