编辑

编辑

我的板载以太网适配器在雷雨天气中烧坏了,我刚买了一个网络适配器(Intelbras Pef 132),但它不工作,它没有连接,它说在 Linux 系统上运行,我正在运行 Ubuntu 14.04,它附带的驱动器是“8139too.c”和一个 makefile。我试图运行,make但它说

gcc -O6 -Wall -DCONFIG_KERNELD -DMODULE -D__KERNEL__ -DLINUX -DUSE_MEM_OPS -I/usr/src/linux-headers-3.19.0-47/include/ -c 8139too.c -o 8139too.o
8139too.c:106:26: fatal error: linux/config.h: No such file or directory
 #include <linux/config.h>
                          ^
compilation terminated

我改变了NEW_INCLUDE_PATHmake 路径中的变量以/usr/src/linux-headers-3.19.0-56/include/匹配我当前的内核,但它仍然给我同样的错误。

命令ifconfig -a

eth1      Link encap:Ethernet  HWaddr 00:1a:3f:af:f7:b7  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1:avahi Link encap:Ethernet  HWaddr 00:1a:3f:af:f7:b7  
          inet addr:169.254.11.21  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:2420 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2420 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:223888 (223.8 KB)  TX bytes:223888 (223.8 KB)

wlan0     Link encap:Ethernet  HWaddr e8:de:27:09:33:ba  
          inet addr:192.168.0.13  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::eade:27ff:fe09:33ba/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:79163 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47850 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:111213209 (111.2 MB)  TX bytes:4969674 (4.9 MB)

wlan0是我现在正在使用的(我兄弟的 wifi 适配器),eht1是我买的适配器。

#dmesg | grep -e eth -e 8139

[    0.277199] pci 0000:05:02.0: [10ec:8139] type 00 class 0x020000
[    1.349651] 8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
[    1.349657] 8139cp 0000:05:02.0: This (id 10ec:8139 rev 10) is not an 8139C+ compatible chip, use 8139too
[    1.351813] 8139too: 8139too Fast Ethernet driver 0.9.28
[    1.352563] 8139too 0000:05:02.0 eth0: RealTek RTL8139 at 0x000000000001e800, 00:1a:3f:af:f7:b7, IRQ 17
[   11.861547] 8139too 0000:05:02.0 eth1: renamed from eth0
[   11.871537] systemd-udevd[348]: renamed network interface eth0 to eth1
[   18.202933] 8139too 0000:05:02.0 eth1: link down
[   18.202986] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 3290.204357] 8139too 0000:05:02.0 eth1: link down
[ 3290.204434] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 4845.027723] 8139too 0000:05:02.0 eth1: link down
[ 4845.027843] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 5989.527102] 8139too: 8139too Fast Ethernet driver 0.9.28
[ 5989.528048] 8139too 0000:05:02.0 eth0: RealTek RTL8139 at 0x000000000001e800, 00:1a:3f:af:f7:b7, IRQ 17
[ 5989.529618] 8139too 0000:05:02.0 eth1: renamed from eth0
[ 5989.545796] systemd-udevd[18359]: renamed network interface eth0 to eth1
[ 5989.548202] 8139too 0000:05:02.0 eth1: link down
[ 5989.548283] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 6076.132252] 8139too: 8139too Fast Ethernet driver 0.9.28
[ 6076.133132] 8139too 0000:05:02.0 eth0: RealTek RTL8139 at 0x000000000001e800, 00:1a:3f:af:f7:b7, IRQ 17
[ 6076.133622] 8139too 0000:05:02.0 eth1: renamed from eth0
[ 6076.147222] systemd-udevd[18408]: renamed network interface eth0 to eth1
[ 6076.149372] 8139too 0000:05:02.0 eth1: link down
[ 6076.149451] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready

我将最后两行添加到/etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet dhcp

该文件/etc/udev/rules.d/70-persistent-net.rules包含以太网的两条规则,我认为 eth0 是烧坏的那条。

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="48:5b:39:f9:34:bb", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1a:3f:af:f7:b7", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

我尝试注释掉 r8169,但没有任何反应。

那么,这个适配器有什么问题?为什么它无法连接?我该如何正确安装它?

编辑

cat /var/log/syslog | grep eth1返回

Apr  1 19:58:25 fernando-PC avahi-autoipd(eth1)[2588]: Found user 'avahi-autoipd' (UID 105) and group 'avahi-autoipd' (GID 113).
Apr  1 19:58:25 fernando-PC avahi-autoipd(eth1)[2588]: Successfully called chroot().
Apr  1 19:58:25 fernando-PC avahi-autoipd(eth1)[2588]: Successfully dropped root privileges.
Apr  1 19:58:25 fernando-PC avahi-autoipd(eth1)[2588]: Starting with address 169.254.11.21
Apr  1 19:58:31 fernando-PC avahi-autoipd(eth1)[2588]: Callout BIND, address 169.254.11.21 on interface eth1
Apr  1 19:58:31 fernando-PC avahi-daemon[692]: Joining mDNS multicast group on interface eth1.IPv4 with address 169.254.11.21.
Apr  1 19:58:31 fernando-PC avahi-daemon[692]: New relevant interface eth1.IPv4 for mDNS.
Apr  1 19:58:31 fernando-PC avahi-daemon[692]: Registering new address record for 169.254.11.21 on eth1.IPv4.
Apr  1 19:58:35 fernando-PC avahi-autoipd(eth1)[2588]: Successfully claimed IP address 169.254.11.21
Apr  1 19:58:35 fernando-PC NetworkManager[2731]:    SCPluginIfupdown: guessed connection type (eth1) = 802-3-ethernet
Apr  1 19:58:35 fernando-PC NetworkManager[2731]:    SCPlugin-Ifupdown: update_connection_setting_from_if_block: name:eth1, type:802-3-ethernet, id:Ifupdown (eth1), uuid: 7b635ed6-2640-7ad8-675d-744db12dd9fa
Apr  1 19:58:35 fernando-PC NetworkManager[2731]:    SCPlugin-Ifupdown: adding eth1 to connections
Apr  1 19:58:35 fernando-PC NetworkManager[2731]:    SCPlugin-Ifupdown: adding iface eth1 to eni_ifaces
Apr  1 19:58:35 fernando-PC NetworkManager[2731]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:1e.0/0000:05:02.0/net/eth1, iface: eth1)
Apr  1 19:58:35 fernando-PC NetworkManager[2731]: <info> (eth1): carrier is OFF
Apr  1 19:58:35 fernando-PC NetworkManager[2731]: <info> (eth1): new Ethernet device (driver: '8139too' ifindex: 2)
Apr  1 19:58:35 fernando-PC NetworkManager[2731]: <info> (eth1): exported as /org/freedesktop/NetworkManager/Devices/1
Apr  1 20:05:23 fernando-PC dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3 (xid=0x51da0147)
.
.
.
Apr  1 20:38:38 fernando-PC dhclient: DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8 (xid=0xabe24e5a)

答案1

我现在感觉真的很生气、很解气、很愚蠢。

问题是雷电也烧坏了路由器端口。

花了大约 5 个小时后,我尝试在 Windows 上安装主板和驱动程序,但也没有用,并且“帮助”菜单显示电缆未连接,我尝试更换电缆和端口...瞧。

这个故事的寓意是,一定要仔细检查电缆、端口和调制解调器/路由器。如果不是软件/驱动器问题,那一定是硬件问题!

感谢所有发表评论的人。

相关内容