當(dāng)前位置: 首頁(yè)IT技術(shù)服務(wù)器 → RedHat 更改網(wǎng)卡的方法

RedHat 更改網(wǎng)卡的方法

更多

ifconfig -a 發(fā)現(xiàn)有三個(gè)網(wǎng)卡: eth0 eth1 eth2。

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

把沒(méi)用的網(wǎng)卡(8139too)信息刪除或注釋掉,再修改新網(wǎng)卡(r8169)參數(shù)NAME="eth2"

例子:

[root@smalarm rules.d]# cat 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 0x8086:0x1502 (e1000e)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:b1:56:xx:xx:xx", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10ec:0x8139 (8139too)

#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:xx:xx:xx", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x10ec:0x8168 (r8169)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4d:xx:xx:xx", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

熱門評(píng)論
最新評(píng)論
發(fā)表評(píng)論 查看所有評(píng)論(0)
昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
字?jǐn)?shù): 0/500 (您的評(píng)論需要經(jīng)過(guò)審核才能顯示)