[#] Stała kolejność kart sieciowych

( Ostatnio zmieniony pt., 13/06/2008 - 23:37 )
 

Edytujmy / utwórzmy plik „/etc/udev/ru­les.d/70-persistent-net.rules
Zawartość będzie oczywiście zależna od twoich numerów MAC kart sieciowych oraz jej ilości.

# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x14e4:0x1713 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:2a:4e:c5:45", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:74:7b:a2:c7", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

Jeśli natomiast mamy problem dodatkowo z ciągłym zmieniającym się numerem interfejsu (eth0…eth100…) to zastosujmy tą oto metodę:

Zmieniamy wpis w pliku „/etc/network/in­terfaces“

sudo gedit /etc/network/interfaces

i dodajemy taki wpis:

auto eth0
iface eth0 inet dhcp
pre-up ifconfig eth0 hw ether 00:00:00:00:00:00

oczywiście zamiast 00:00:00:00:00:00 ustawiamy własny oryginalny MAC adres który faktycznie mamy.

Edytujemy plik „/etc/udev/ru­les.d/70-persistent-net.rules“ (jeśli nie ma to tworzymy)

sudo gedit /etc/udev/rules.d/70-persistent-net.rules

i wyrzucamy wszystko ze środka (lub nie to zależy co tam już masz) dodając taki wpis:

SUBSYSTEM=="net", DRIVERS=="?*", ID=="0000:00:0a.0", NAME="eth0"

gdzie ID==„0000:00:0a.0“ musimy najpierw sprawdzić jakie ma nasza karta sieciowa. Wykonajmy zatem sprawdzenie:

lspci

a w wyniku wyszukajmy nasz chipset:

00:00.0 RAM memory: nVidia Corporation Unknown device 0547 (rev a2)
00:01.0 ISA bridge: nVidia Corporation Unknown device 0548 (rev a2)
00:01.1 SMBus: nVidia Corporation Unknown device 0542 (rev a2)
00:01.2 RAM memory: nVidia Corporation Unknown device 0541 (rev a2)
00:01.3 Co-processor: nVidia Corporation Unknown device 0543 (rev a2)
00:02.0 USB Controller: nVidia Corporation Unknown device 055e (rev a2)
00:02.1 USB Controller: nVidia Corporation Unknown device 055f (rev a2)
00:04.0 USB Controller: nVidia Corporation Unknown device 055e (rev a2)
00:04.1 USB Controller: nVidia Corporation Unknown device 055f (rev a2)
00:06.0 IDE interface: nVidia Corporation Unknown device 0560 (rev a1)
00:07.0 Audio device: nVidia Corporation MCP67 High Definition Audio (rev a1)
00:08.0 PCI bridge: nVidia Corporation Unknown device 0561 (rev a2)
00:09.0 IDE interface: nVidia Corporation Unknown device 0550 (rev a2)
00:0a.0 Ethernet controller: nVidia Corporation Unknown device 054c (rev a2)
00:0c.0 PCI bridge: nVidia Corporation Unknown device 0563 (rev a2)
00:0d.0 PCI bridge: nVidia Corporation Unknown device 0563 (rev a2)
00:12.0 VGA compatible controller: nVidia Corporation Unknown device 0531 (rev a2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
02:05.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05)
02:05.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 22)
02:05.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 12)
02:05.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 12)
02:05.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 12)
03:00.0 Ethernet controller: Atheros Communications, Inc. AR5006EG 802.11 b/g Wireless PCI Express Adapter (rev 01)

Nas interesuje ta oto linia: 00:0a.0 Ethernet controller: nVidia Corporation Unknown device 054c (rev a2)

5
Twoja ocena: Brak Średnio: 5 (1 vote)