Hadyai Internet R&D LAB

แหล่งความรู้ => Server => Linux Server System => ข้อความที่เริ่มโดย: admin ที่ 25 เมษายน 2008, 01:56:05

หัวข้อ: การตั้ง ethX ให้ตรงกับ LAN Card ที่เราต้องการ (Ubuntu 7.10)
เริ่มหัวข้อโดย: admin ที่ 25 เมษายน 2008, 01:56:05
เราสามารถไปตั้ง โดยแก้ไขไฟล์

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

ตัวอย่างเช่น Mainboard P5GC ใส่ LAN Card 6 อัน

# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x10ec:0x8168 (r8168)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1d:60:c9:6d:61", NAME="eth6"

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:13:f7:cb:cf:2d", NAME="eth1"

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:13:f7:cb:cf:25", NAME="eth2"

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:13:f7:cb:d3:ab", NAME="eth3"

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:13:f7:cb:cf:24", NAME="eth4"

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:19:e0:0c:d7:dc", NAME="eth5"

# PCI device 0x13f0:0x0200 (sundance)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:06:4f:59:24:96", NAME="eth0"

ก็สามารถเช็คได้จาก MAC Address, Drivers แล้วก็ตั้ง eth ให้ตรงกับที่เราต้องการ Lan Card Onboard จะเป็น r8168