Wednesday, May 14, 2008

Swap iface on debain

ตอนติดตั้งเดเบียนพอดีว่ามีพอร์ต firewire มันก็เลยเลือกให้เป็น eth0 ทีนี้ network card ก็เลยกลายเป็น eth1 แทน ต้องการเปลี่ยนซะหน่อยจะได้เหมือนเครื่องอื่นๆ
หาไฟล์หน้าตาประมาณนี้ /etc/udev/rules.d/z25_persistent-net.rules แล้วก็เข้าไปแก้ในไฟล์ตามที่เราต้องการ ไฟล์พวกนี้ถูกสร้างโดย udev ซึ่งเป็นตัวจัดการอุปกรณ์ต่างๆ บน linux ตั้งแต่ kernel 2.6

anubis:~# cat /etc/udev/rules.d/z25_persistent-net.rules
# 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.
# MAC addresses must be written in lowercase.

# Firewire device 0010dc0000c1c50a (ohci1394)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:10:dc:00:00:c1:c5:0a", NAME="eth0"

# PCI device 0x8086:0x1064 (e100)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:13:d3:92:00:e8", NAME="eth1"

No comments: