ifconfig i "error fetching interface information: Device not found"

Masz problemy z siecią bądź internetem? Zapytaj tu
max_damage
Posty: 3
Rejestracja: 29 marca 2011, 23:12

ifconfig i "error fetching interface information: Device not found"

Post autor: max_damage »

Witam.
Mam następujący, dość irytujący problem. Otóż polecenie:

Kod: Zaznacz cały

ifconfig
tak jakby się wywala

Kod: Zaznacz cały

root@rb800:~# ifconfig 
: error fetching interface information: Device not found
root@rb800:~# ifconfig -a
: error fetching interface information: Device not found
Natomiast gdy podam nazwę sprzętu jest dobrze:

Kod: Zaznacz cały

root@rb800:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0c:42:xx:xx:xx  
          inet addr:192.168.57.244  Bcast:192.168.57.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:42ff:fe72:ab16/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:923 errors:0 dropped:0 overruns:0 frame:0
          TX packets:206 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:78303 (76.4 KiB)  TX bytes:30082 (29.3 KiB)
          Base address:0x8000 

root@rb800:~# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:0c:42:xx:xx:xx  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Plik:

Kod: Zaznacz cały

root@rb800:~# cat /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 0x1969:0x1063 (atl1c)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:42:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x1969:0x1063 (atl1c)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:42:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x1969:0x1063 (atl1c)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:42:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x168c:0x0029 (ath9k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:42:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x168c:0x001b (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:42:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"
i inne

Kod: Zaznacz cały

root@rb800:~# lspci
0000:00:00.0 Power PC: Freescale Semiconductor Inc MPC8544 (rev 11)
0000:00:0c.0 Ethernet controller: Atheros Communications Inc. AR5413 802.11abg NIC (rev 01)
0000:00:0d.0 Network controller: Atheros Communications Inc. AR922X Wireless Network Adapter (rev 01)
0001:01:00.0 PCI bridge: Freescale Semiconductor Inc MPC8544 (rev 11)
0002:03:00.0 PCI bridge: Freescale Semiconductor Inc MPC8544 (rev 11)
0003:05:00.0 PCI bridge: Freescale Semiconductor Inc MPC8544 (rev 11)
0003:06:00.0 Ethernet controller: Atheros Communications AR8131 Gigabit Ethernet (rev c0)
root@rb800:~# uname -a
Linux rb800 2.6.34.8-svn16418 #9 Tue Mar 29 11:50:57 CEST 2011 ppc GNU/Linux
I moje pytanie, czy da się jakoś ,,naprostować'' tego ifconfiga?
Awatar użytkownika
Bastian
Member
Posty: 1424
Rejestracja: 30 marca 2008, 16:09
Lokalizacja: Poznañ

Post autor: Bastian »

To chodzi na jakimś wirtualnym serwerze? Kopiowałeś może maszyny?

Kod: Zaznacz cały

ATTR{address}=="00:0c:42:xx:xx:xx"
To poprawny MAC karty podpiętej pod eth0 ? Wpisz tam cały MAC adres i sprawdź
max_damage
Posty: 3
Rejestracja: 29 marca 2011, 23:12

Post autor: max_damage »

Nie no, to jest po prostu "wygwiazdkowane" ;) Tam oczywiście jest poprawny adres MAC.
Jest to maszyna fizyczna, instalacja minimalna, trochę przerobiona. W każdym bądź razie, ifconfig powinien działać, jako że już kiedyś działał.
Awatar użytkownika
DaVidoSS
Junior Member
Posty: 875
Rejestracja: 06 marca 2010, 11:26
Lokalizacja: ~/

Post autor: DaVidoSS »

Skrypty zawarte w iproute czy net-tols odczytują informacje z pliku konfiguracyjnego /etc/network/interfaces. Pokaz zawartość tego pliku.
max_damage
Posty: 3
Rejestracja: 29 marca 2011, 23:12

Post autor: max_damage »

Plik:

Kod: Zaznacz cały

root@rb800:~# cat /etc/network/interfaces 
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
Ale nie wydaje mi się, żeby zawartość była istotna, gdyż:

Kod: Zaznacz cały

ifconfig -a
powinno pokazać wszystkie interfejsy, nawet jeżeli ich nie ma w wyżej wspomnianym pliku, nie?
ODPOWIEDZ