Chinaunix首页 | 论坛 | 博客
  • 博客访问: 359804
  • 博文数量: 51
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1189
  • 用 户 组: 普通用户
  • 注册时间: 2014-02-14 15:23
文章分类
文章存档

2017年(4)

2016年(7)

2015年(9)

2014年(31)

我的朋友

分类: LINUX

2015-06-21 22:09:56

刚克隆完SuSE系统,在克隆的系统中发现无法上网,其原因是网卡没生效。

 

修改方法:

# vi /etc/udev/rules.d/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:0x100f (e1000)

# 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:0x100f (e1000)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:18:a4:ec", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

 

# PCI device 0x8086:0x100f (e1000)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:4e:9e:16", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

 

注意上面显示了两块网卡:eth0eth1eth0实际上是被克隆机器的网卡,应该删掉。然后把另一块网卡的名字由“eth1”改为“eth0”。修

 

改完后的内容如下:

# 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:0x100f (e1000)

# 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:0x100f (e1000)

 

# PCI device 0x8086:0x100f (e1000)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:4e:9e:16", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

 

保存后重启系统即可正常上网。

阅读(3134) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

11601309872020-01-02 18:56:50

打开70-persistent-ner.rules文件里面是空的,怎么办