越来越多的网卡……求助[已解决]

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
头像
lonelycorn
帖子: 438
注册时间: 2007-05-20 18:44
来自: 唐山,河北,中国
联系:

越来越多的网卡……求助[已解决]

#1

帖子 lonelycorn » 2007-10-30 12:34

每次我开机后都会出现一块新网卡(ethi+1)(原来的就没了),现在已经到第52块了。
因为我用的是学校的固定ip,每次设置了ip之后都会在interface那个文件里留下我当前的ethi所使用的Ip。导致用过的Ip不能再用。
显示的是nvidia nforce networking controller
主板是nvidia nforce 630m芯片组。
7.10+xp
多谢大家帮助,只要把/etc/udev/rules.d/75-persistent-net-generator.rules 文件中的

代码: 全选

 ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*|ath*|wlan*|ra*|sta*" \
         NAME!="?*", DRIVERS=="?*", GOTO="persistent_net_generator_do"
这两行注释就不会增加了。
上次由 lonelycorn 在 2008-02-27 22:31,总共编辑 2 次。
头像
windwiny
帖子: 2254
注册时间: 2007-03-13 17:26

#2

帖子 windwiny » 2007-10-30 12:51

每次重设就是了,,先用ifconfig 找出名称,再设IP地址

写个脚本自动执行
头像
lonelycorn
帖子: 438
注册时间: 2007-05-20 18:44
来自: 唐山,河北,中国
联系:

可是网卡会越来越多

#3

帖子 lonelycorn » 2007-11-02 16:02

以后……超过了4位的话……
头像
lonelycorn
帖子: 438
注册时间: 2007-05-20 18:44
来自: 唐山,河北,中国
联系:

#4

帖子 lonelycorn » 2008-02-14 22:34

eth2147483647……所幸现在是dhcp不用总设置ip……
我逗无了奈了……
HP的本跑ubuntu还得把我折腾死。
显卡、无线/有线网卡、声卡、键盘……

代码: 全选

while :
do
  work_hard
done
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#5

帖子 eexpress » 2008-02-14 23:13

☎ grep eth0 /etc/iftab
eth0 mac xx:xx:xx:de:3a:98 arp 1

这样设置下mac。就固定了。
● 鸣学
heejun
帖子: 60
注册时间: 2006-05-01 12:29
来自: zju

#6

帖子 heejun » 2008-02-15 0:09

修改
/etc/udev/rules.d/z25_persistent-net.rules
用mac 匹配网卡
如下
# 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.

# PCI device 0x11ab:0x4363 (sky2)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:1b:24:6c:64:db", NAME="eth0"

# PCI device 0x8086:0x4229 (iwl4965)
SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:13:e8:6c:53:3f", ATTR{type}=="1", NAME="wlan0"
头像
lonelycorn
帖子: 438
注册时间: 2007-05-20 18:44
来自: 唐山,河北,中国
联系:

#7

帖子 lonelycorn » 2008-02-16 22:44

明天试试~
多谢大家先! :em05
我逗无了奈了……
HP的本跑ubuntu还得把我折腾死。
显卡、无线/有线网卡、声卡、键盘……

代码: 全选

while :
do
  work_hard
done
头像
lonelycorn
帖子: 438
注册时间: 2007-05-20 18:44
来自: 唐山,河北,中国
联系:

#8

帖子 lonelycorn » 2008-02-17 12:03

/etc/iftab这个文件不存在阿。
我应当怎么修改呢?怎么用mac匹配网卡?我看所有的“网卡”都有不同的mac呀
目前我的/etc/udev/rules.d/70-persistent-net.rules 这个文件显示如下:
是不是因为我的wlan原来驱动没装好,显示的是eth1的原因?
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:39:55:09", NAME="eth0"

# PCI device 0x14e4:0x4311 (bcm43xx)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:00:1a:73:95", NAME="eth1"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:16:7d:da", NAME="eth2"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:10:2f:8d", NAME="eth3"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:b4:f6:90", NAME="eth4"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:0e:04:db", NAME="eth5"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:42:6a:d4", NAME="eth6"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:09:ec:26", NAME="eth7"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:ba:07:61", NAME="eth8"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:64:af:bb", NAME="eth9"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:06:6b:e3", NAME="eth10"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:3d:35:0e", NAME="eth11"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:95:a4:8c", NAME="eth12"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:3a:3a:ae", NAME="eth13"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:3c:c2:bf", NAME="eth14"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:f0:4a:79", NAME="eth15"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:a4:ab:91", NAME="eth16"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:8c:3f:4c", NAME="eth17"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:a5:d1:a8", NAME="eth18"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:2d:dc:04", NAME="eth19"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:6a:7d:44", NAME="eth20"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:ac:c9:00", NAME="eth21"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:4c:a3:aa", NAME="eth22"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:f9:ef:1e", NAME="eth23"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:6b:1c:43", NAME="eth24"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:7e:3e:d8", NAME="eth25"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:1b:2e:63", NAME="eth26"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:13:09:43", NAME="eth27"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:56:db:b5", NAME="eth28"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:c4:8e:0c", NAME="eth29"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:db:23:d3", NAME="eth30"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:46:a9:ed", NAME="eth31"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:85:70:4a", NAME="eth32"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:aa:c1:2d", NAME="eth33"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:62:fa:9a", NAME="eth34"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:fb:22:7b", NAME="eth35"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:a4:88:da", NAME="eth36"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:5b:01:d8", NAME="eth37"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:fa:22:70", NAME="eth38"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:b0:8d:d8", NAME="eth39"

# PCI device 0x14e4:0x4311 (ndiswrapper)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1a:73:95:99:84", ATTRS{type}=="1", NAME="wlan0"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:bd:24:a2", NAME="eth40"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:b7:48:9b", NAME="eth41"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:56:5a:20", NAME="eth42"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:f7:d2:a4", NAME="eth43"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:d2:c5:e9", NAME="eth44"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:98:16:9f", NAME="eth45"

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:00:6c:44:b2:0d", NAME="eth46"
我逗无了奈了……
HP的本跑ubuntu还得把我折腾死。
显卡、无线/有线网卡、声卡、键盘……

代码: 全选

while :
do
  work_hard
done
头像
lonelycorn
帖子: 438
注册时间: 2007-05-20 18:44
来自: 唐山,河北,中国
联系:

#9

帖子 lonelycorn » 2008-02-17 12:07

/etc/udev/rules.d/75-persistent-net-generator.rules文件如下:

# these rules generate rules for persistent network device naming

ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*|ath*|wlan*|ra*|sta*" \
NAME!="?*", DRIVERS=="?*", GOTO="persistent_net_generator_do"

GOTO="persistent_net_generator_end"
LABEL="persistent_net_generator_do"

# build device description string to add a comment the generated rule
SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($attr{driver})"
SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($attr{driver})"
SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})"
SUBSYSTEMS=="xen", ENV{COMMENT}="Xen virtual device"
ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($attr{driver})"

IMPORT{program}="write_net_rules $attr{address}"
ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"

LABEL="persistent_net_generator_end"
我逗无了奈了……
HP的本跑ubuntu还得把我折腾死。
显卡、无线/有线网卡、声卡、键盘……

代码: 全选

while :
do
  work_hard
done
Niter
帖子: 4
注册时间: 2008-02-24 9:18

The problem is now settled!

#10

帖子 Niter » 2008-02-27 16:41

My system has the same problem and this leave me frustrated for a long time.
But now, I've got the answer from the international ubuntu forum and this is proved to be true for my acer 4520:
-------------------------------------------
first edit file in /etc/udev/rules.d/70-persistent-net.rules
you can see much of PCI device that is generated by your system
just clear all of this
and left two interfaces for eth0 and eth1

this is my /etc/udev/rules.d/70-persistent-net.rules

# PCI device 0x10de:0x054c (forcedeth)
SUBSYSTEM=="net", DRIVERS=="forcedeth", ATTRS{address}=="00:00:6c:79:ce:e9", NAME="eth0"

# PCI device 0x14e4:0x4311 (bcm43xx)
SUBSYSTEM=="net", DRIVERS=="bcm43xx", ATTRS{address}=="00:1c:26:23:50:e7", NAME="eth1"

don't forget to add name of driver there...

after this file clear,then we must go to the generator of this file
this file located in /etc/udev/rules.d/75-persistent-net-generator.rules
this file make your NIC logical address increasing after booting

this is my /etc/udev/rules.d/75-persistent-net-generator.rules

#ACTION=="add", SUBSYSTEM=="net", KERNEL=="eth*|ath*|wlan*|ra*|sta*" \
# NAME!="?*", DRIVERS=="?*", GOTO="persistent_net_generator_do"

GOTO="persistent_net_generator_end"
LABEL="persistent_net_generator_do"

# build device description string to add a comment the generated rule
SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($attr{driver})"
SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($attr{driver})"
SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})"
SUBSYSTEMS=="xen", ENV{COMMENT}="Xen virtual device"
ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($attr{driver})"

IMPORT{program}="write_net_rules $attr{address}"
ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"

LABEL="persistent_net_generator_end"

in default the first and second line aren't uncommented
because this is the generator you can just uncomment that lines
or for antoher options you can delete those file
it'll works also
------------------------------------
Many thanks to '888' of ubuntuforums.org!
头像
lonelycorn
帖子: 438
注册时间: 2007-05-20 18:44
来自: 唐山,河北,中国
联系:

#11

帖子 lonelycorn » 2008-02-27 22:23

Thanks for this and i'll try if it works.
我逗无了奈了……
HP的本跑ubuntu还得把我折腾死。
显卡、无线/有线网卡、声卡、键盘……

代码: 全选

while :
do
  work_hard
done
头像
lonelycorn
帖子: 438
注册时间: 2007-05-20 18:44
来自: 唐山,河北,中国
联系:

#12

帖子 lonelycorn » 2008-02-27 22:29

thanks to you guy! i'll never have eth2147483647! :em05
我逗无了奈了……
HP的本跑ubuntu还得把我折腾死。
显卡、无线/有线网卡、声卡、键盘……

代码: 全选

while :
do
  work_hard
done
skyskai
帖子: 8
注册时间: 2008-01-28 20:21

#13

帖子 skyskai » 2008-02-29 14:07

谢谢谢谢,又学了一招。哈哈。
回复