Infomation

[Ubuntu] 갑자기 네트워크 디바이스가 사라졌다???

DarkSoul.Story 2013. 1. 25. 17:24
반응형



리눅스에서 일단 리눅스에서 우리가 잘 아는 이더넷 정보 보는 명령어인 [ifconfig]를 입력하면, 아래과 같이 이너넷 정보를 확인 할 수 있다.


eth0      Link encap:Ethernet  HWaddr f4:ce:46:0f:4c:b1
          inet addr:192.168.119.29  Bcast:192.168.255.255  Mask:255.255.0.0
          inet6 addr: fe80::f6ce:46ff:fe0f:4cb1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:374886581 errors:0 dropped:0 overruns:0 frame:9
          TX packets:381551488 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:700781527 (700.7 MB)  TX bytes:478153271 (478.1 MB)
          Interrupt:16
 
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:548522 errors:0 dropped:0 overruns:0 frame:0
          TX packets:548522 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:38073420 (38.0 MB)  TX bytes:38073420 (38.0 MB)

그런데 간혹 잘 사용하던 네트워크 인터페이스가 갑자기 사라지는 경우가 존재한다. (이더넷 하드웨어 정보를 마구 바꾼다던지~)

 

[ifconfig]를 입력하면, 아래와 같이 eth 네트워크 인터페이스가 잡혀 있지 않은 경우 말이다.


lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:62 errors:0 dropped:0 overruns:0 frame:0
          TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4409 (4.4 KB)  TX bytes:4409 (4.4 KB)

이런경우 이더넷 하드웨어 정보가 아래와 같은 경로의 파일에 저장되어 있어 잡히지 않는 경우가 존재한다.


vi /etc/udev/rules.d/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}=="00:0c:29:4b:5c:be", ATTR{dev_id}=="0x0", 
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
 
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:26:3f:19", ATTR{dev_id}=="0x0", 
ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
 
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:46:c3:a8", ATTR{dev_id}=="0x0", 
ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
 
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:e3:75:c2", ATTR{dev_id}=="0x0", 
ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"


(본인은 DHCP 환경이다.)


다시 살리고 싶다면, 위의 파일을 삭제하고 재부팅 하면 만사 오케이~~~ㅋㅋ



rm /etc/udev/rules.d/70-persistent-net.rules


반응형

'Infomation' 카테고리의 다른 글

방화벽 (Firewall)  (0) 2013.01.30
SSL Handshake  (0) 2013.01.29
XSS 필터링 목록 분류  (0) 2013.01.22
[Ubuntu] 우분투 서버에 x-window 설치  (0) 2013.01.17
[Ubuntu] root 계정 로그인  (0) 2013.01.17