红联Linux门户
Linux帮助
当前位置: 红联Linux门户 > Debian

更改eth0和eth1的顺序

发布时间:2014-03-22 21:51:03来源:红联作者:tioced
在Debian下可以通过修改/etc/udev/rules.d/z25_persistent-net.rules来实现。

/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.

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:e0:4c:39:a4:99", NAME="eth0"

# PCI device 0x10ec:0x8167 (r8169)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:16:17:c0:a3:66", NAME="eth1"

如果更改eth0和eth1的顺序,把两个名字对换下就可以了,然后重启,很简单吧。
文章评论

共有 3 条评论

  1. Alteonyy 于 2014-08-09 10:00:55发表:

    可难了。

  2. badoo 于 2014-03-27 08:49:29发表:

    了解

  3. 于 2014-03-26 20:34:49发表:

    只想知道不重启的方法,试过udev重新载入无效