在 Ubuntu 14.10 上识别以太网适配器

在 Ubuntu 14.10 上识别以太网适配器

我尝试使用 Ubuntu 14.10 在我的笔记本电脑 HP Pavilion 上连接到互联网,但存在 Ubuntu 无法识别有线连接或以太网适配器的问题:

当我输入时ifconfig,它只显示:

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:181 errors:0 dropped:0 overruns:0 frame:0
          TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:13318 (13.3 KB)  TX bytes:13318 (13.3 KB) 

输入时ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          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)

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:181 errors:0 dropped:0 overruns:0 frame:0
          TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:13318 (13.3 KB)  TX bytes:13318 (13.3 KB)

当我按照如下说明操作时:

http://www.pcworld.com/article/2455972/how-to-fix-your-internet-connection-in-ubuntu-linux.html

首先,它显示有线连接的“电缆已拔出” - 尽管电缆已连接 - 即使在手动编辑 IPv4 设置后,“保存”按钮仍然关闭。

我尝试按照以下答案进行操作: Ubuntu 服务器无法识别以太网

以下是我所得到的:

ifconfig -a | grep eth给出:

eth0      Link encap:Ethernet  HWaddr 00:00:00:00:00:00  

sudo ifdown eth0 && ifup eth0给出:

RTNETLINK answers: No such process
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

nano /etc/network/interfaces

auto eth1
iface eth1 inet static
address 192.168.1.3
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 192.168.1.1 

然后sudo ifdown eth1 && sudo ifup -v eth1给了:

ifdown: interface eth0 not configured
Configuring interface eth0=eth0 (inet)
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.1.3/255.255.255.0 broadcast 192.168.1.255     dev eth0 label eth0
RTNETLINK answers: File exists
Failed to bring up eth0.

将 eth1 更改为 eth0:

safi@safi:~$ sudo ifdown eth0 && sudo ifup -v eth0
ifdown: interface eth0 not configured
Configuring interface eth0=eth0 (inet)
run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
ip addr add 192.168.1.3/255.255.255.0 broadcast 192.168.1.255     dev eth0 label eth0
RTNETLINK answers: File exists
Failed to bring up eth0.

我该如何继续?

相关内容