Contents

System/OS
2014.04.05 22:34

[linux] resolv.con 초기화 되는 문제

Views 4693 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
network를 재시작하면, resolv.conf가 자동 초기화 되는 현상을 겪었다.
그러던중 아래와 같은 원인과 해결책을 찾았다.

리눅스에서 DNS 설정을 바꾸려고 아래 파일을 수정한다.
/etc/resolv.conf
그리고 아래와 같이 서비스를 재시작 하거나 리부팅한다.
/sbin/service network restart
 
하지만  vmware 상에서는 /etc/resolv.conf 수동설정이 안된다.
DHCP 로 ip 를 자동으로 할당 받을때 /sbin/dhclient-script 에 의해서 resolv.conf 파일이 새로 생성되기 때문이다.
(vi /var/log/boot.log 를 보면 dhclient-script 가 /etc/resolv.conf 를 수정하는 것을 알수 있다.)
 
이 문제를 해결하기 위해서 /sbin/dhclient-script 가 /etc/resolv.conf 를 수정하지 못하도록 파일 속성을 불변으로 바꾼다.
chattr +i /etc/resolv.conf


[참고] 아래와 같은 경고가 나온다면 참고..
Bringing up interface eth0: Determining if ip address 121.78.127.197 is already in use for device eth0...
[해결방법] https://www.hooni.net/xe/39012

?

List of Articles
No. Category Subject Author Date Views
154 System/OS [windows] 98/ME 속도 빠르게 튜닝(부팅,메모리,레지스터) hooni 2003.04.23 50527
153 System/OS [windows] 도스 사용 팁 hooni 2003.04.23 17894
152 System/OS [windows] 여러가지 활용 팁 hooni 2003.04.23 20030
151 System/OS [windows] 배치(bat)파일 제작 방법 hooni 2003.04.23 17061
150 System/OS [linux] 패킷 스니퍼링 hooni 2003.04.23 16378
149 System/OS [linux] 패킷의 소스 주소 바꾸기 hooni 2003.04.23 18855
148 System/OS [linux] iptables 명령어 매뉴얼(options) hooni 2003.04.23 11405
147 System/OS [linux] 간단한 NAT 설정 script hooni 2003.04.23 12658
146 System/OS [linux] 랜카드 2개 설정 & iptables 로 사설 ip.. hooni 2003.04.23 14780
145 System/OS [linux] apache, php, jsp 환경설정하기.. hooni 2003.04.23 15305
144 System/OS [linux] Oracle8.1.6, Mysql+PHP+Zend Optimizer+APACHE+Tomcat(jsp,servlet)+IMAP+gd hooni 2003.04.23 32524
143 System/OS [linux] 특수문자 환경 설정(stty) hooni 2003.04.23 15343
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17