Virtual Box로 설치한 리눅스 이미지를 타 시스템으로 옮기거나, 복사를 하여 사용할 경우, Virtual Box나 리눅스 이미지 내에서의 모든 네트워크 설정이 정상임에도 불구하고, 네트워킹을 할 수 없는 경우가 발생할 수 있습니다.

원인은 udev(A Userspace Implementation of devfs)에 의해서 네트워크 아답터의 디바이스 정보가 바뀌었기 때문입니다. 보통은 기존에 eth0으로 사용했었다면, eth1으로 변경되어 있는 경우가 많습니다.

해결하는 방법은 /etc/udev/rules.d 디렉토리에 보면 xx-persistent-net.rules(xx는 숫자)라는 파일이 있는데, 이것을 삭제하거나, 혹은 올바르게 설정을 하여 주고 재부팅을 하면, 정상적으로 네트워킹을 할 수 있게 됩니다.

저의 경우는 eth0으로 설정되어 있어야 하는데, 아래와 같이 eth1으로 설정되어 있었습니다.

root@codememo:~# cd /etc/udev/rules.d/
root@codememo:/etc/udev/rules.d# ls
70-persistent-cd.rules         70-persistent-net.rules
root@codememo:/etc/udev/rules.d# vi 70-persistent-net.rules
# This file was automatically generated by the //lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:19:ec:76", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
~
~
~
~
~
~
~
~
~
~
~
~
~
~
-- VISUAL --                                        8         8,129         All

 

+ Recent posts