[原]ubuntu14.04 網卡邏輯修改沒有文件/etc/udev/rules.d/70-persistent-net.rules

 -----問題出現------ubuntu

在新裝的ubuntu14.04系統中沒有發現文件/etc/udev/rule.d/70-persistent-net.rules, 沒法修改網絡的邏輯名稱(即把第一張網卡的名字改成改成eth0,第二張網卡的名字改成eth0)bash

 

----------思路-----網絡

一、因爲未發現有/etc/udev/rule.d/70-persistent-net.rules文件,重啓;重啓後也未發現此文件.net

二、手動執行/lib/udev/write_net_rules;提示缺乏變量INTERFACEserver

root@server:/lib/udev/rules.d# /lib/udev/write_net_rules 
missing $INTERFACE

  增長變量:blog

root@server: export INTERFACE="eth0"
missing valid match
root@server:export MATCHADDR="00:0c:29:1f:1a:f5"
root@server:/lib/udev/write_net_rules

# ls /etc/udev/rules.d/
70-persistent-net.rules READMEit

 

修改70-persistent-net.rulesclass

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:1f:1a:f5", KERNEL=="eth*", NAME="eth0"變量

修改後:ubuntu14.04

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:1f:1a:eb", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:1f:1a:f5", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:1f:1a:ff", KERNEL=="eth*", NAME="eth2"

  reboot,完畢

 

 

參考:http://blog.csdn.net/nnuljl/article/details/38680107

相關文章
相關標籤/搜索