求助 Ubuntu 不能用有线网络,能正常使用Wifi

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
aichange
帖子: 3
注册时间: 2016-02-21 14:14
系统: Ubuntu&Win7

求助 Ubuntu 不能用有线网络,能正常使用Wifi

#1

帖子 aichange » 2016-02-21 15:36

我的电脑装了2个系统,一个是 Win7 ,一个是刚装的 Ubuntu 14.04.lts.装上后Ubuntu 能连上有线网络,可是不能上网,wifi 可以正常使用.另外,win7的有线无线网络都能正常使用.
根据[url]http://forum,ubuntu.org.cn/viewtopic.php?f=116&t=472965[/url]
此帖的回复,在终端运行的命令及结果如下:

代码: 全选

~$ sudo nmcli dev show
	[sudo] password for carl: 
	Usage: nmcli device { COMMAND | help }
        COMMAND := { status | list | disconnect | wifi }

 	status
  	list [iface <iface>]
  	disconnect iface <iface> [--nowait] [--timeout <timeout>]
  	wifi [list [iface <iface>] [bssid <BSSID>]]
  	wifi connect <(B)SSID> [password <password>] [wep-key-type key|phrase] [iface <iface>] [bssid <BSSID>] [name <name>]
               [--private] [--nowait] [--timeout <timeout>]

错误:'dev' 命令 'show' 无效。

~$ ping -c 2 114.114.114.114
PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data.

--- 114.114.114.114 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1008ms


~$ ping -c 2 mirrors.163.com
	ping: unknown host mirrors.163.com

~$ sudo dhclient -v eth0
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/

Listening on LPF/eth0/34:17:eb:5f:a5:c9
Sending on   LPF/eth0/34:17:eb:5f:a5:c9
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0xd0acaa69)
DHCPREQUEST of 192.168.3.104 on eth0 to 255.255.255.255 port 67 (xid=0x69aaacd0)
DHCPOFFER of 192.168.3.104 from 192.168.3.1
DHCPACK of 192.168.3.104 from 192.168.3.1
RTNETLINK answers: File exists
bound to 192.168.3.104 -- renewal in 3214 seconds.



~$ sudo ifconfig -a
eth0      Link encap:以太网  硬件地址 34:17:eb:5f:a5:c9  
          inet 地址:192.168.3.104  广播:192.168.3.255  掩码:255.255.255.0
          inet6 地址: fe80::3617:ebff:fe5f:a5c9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  跃点数:1
          接收数据包:4270 错误:0 丢弃:10 过载:0 帧数:0
          发送数据包:1992 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000 
          接收字节:343646 (343.6 KB)  发送字节:189720 (189.7 KB)

lo        Link encap:本地环回  
          inet 地址:127.0.0.1  掩码:255.0.0.0
          inet6 地址: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  跃点数:1
          接收数据包:4458 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:4458 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:0 
          接收字节:369262 (369.2 KB)  发送字节:369262 (369.2 KB)

wlan0     Link encap:以太网  硬件地址 30:3a:64:58:35:e0  
          inet6 地址: fe80::323a:64ff:fe58:35e0/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  跃点数:1
          接收数据包:13267 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:14937 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000 
          接收字节:9635273 (9.6 MB)  发送字节:2123471 (2.1 MB)


~$ sudo iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11abgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=22 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:on
          
lo        no wireless extensions.



~$ sudo route -nv
内核 IP 路由表
目标            网关            子网掩码        标志  跃点   引用  使用 接口
0.0.0.0         192.168.3.1     0.0.0.0         UG    0      0        0 eth0
192.168.3.0     0.0.0.0         255.255.255.0   U     1      0        0 eth0


~$ sudo lshw -C network
  *-network               
       description: Ethernet interface
       product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:01:00.0
       logical name: eth0
       version: 07
       serial: 34:17:eb:5f:a5:c9
       size: 100Mbit/s
       capacity: 100Mbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8106e-1_0.0.1 06/29/12 ip=192.168.3.104 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s
       resources: irq:44 ioport:4000(size=256) memory:b0b00000-b0b00fff memory:b0800000-b0803fff
  *-network
       description: Wireless interface
       product: Wireless 3160
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: wlan0
       version: 83
       serial: 30:3a:64:58:35:e0
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=3.19.0-25-generic firmware=25.17.12.0 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn
       resources: irq:48 memory:b0a00000-b0a01fff



~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 202.96.134.133
nameserver 202.96.128.68
nameserver 127.0.1.1

头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 求助 Ubuntu 不能用有线网络,能正常使用Wifi

#2

帖子 vickycq » 2016-02-21 17:04

一个是 Win7 ,一个是刚装的 Ubuntu 14.04
先尝试从 BIOS 关闭网络唤醒(WoL)

其他网友也有发现 r8169 驱动对 RTL8101/2/6E 的支持不理想:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1132156

该网卡没有内置 EEPROM 可能导致无法固定 MAC 地址,造成问题。参考
http://ubuntuforums.org/showthread.php?t=1964200
https://bugs.launchpad.net/ubuntu/+sour ... comments/7
http://realtek.info/pdf/rtl8101e_datasheet_1.2.pdf

或尝试使用 Realtek 官方的 r8101 驱动:(2015-12-08 更新)
http://www.realtek.com.tw/Downloads/dow ... TypeID=3#2
安装 linux-headers-`uname -r`, build-essential 等必备工具,自行编译
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
aichange
帖子: 3
注册时间: 2016-02-21 14:14
系统: Ubuntu&Win7

Re: 求助 Ubuntu 不能用有线网络,能正常使用Wifi

#3

帖子 aichange » 2016-02-21 17:38

哈哈 @vickycq 真是热心人,我已经按照另外个帖子说的把 Windows 和主板的网络唤醒 关闭了,还是不行。
vickycq 写了:
一个是 Win7 ,一个是刚装的 Ubuntu 14.04
先尝试从 BIOS 关闭网络唤醒(WoL)

其他网友也有发现 r8169 驱动对 RTL8101/2/6E 的支持不理想:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1132156

该网卡没有内置 EEPROM 可能导致无法固定 MAC 地址,造成问题。参考
http://ubuntuforums.org/showthread.php?t=1964200
https://bugs.launchpad.net/ubuntu/+sour ... comments/7
http://realtek.info/pdf/rtl8101e_datasheet_1.2.pdf

或尝试使用 Realtek 官方的 r8101 驱动:(2015-12-08 更新)
http://www.realtek.com.tw/Downloads/dow ... TypeID=3#2
安装 linux-headers-`uname -r`, build-essential 等必备工具,自行编译
这些我再试试。 :Haha
aichange
帖子: 3
注册时间: 2016-02-21 14:14
系统: Ubuntu&Win7

Re: 求助 Ubuntu 不能用有线网络,能正常使用Wifi

#4

帖子 aichange » 2016-02-22 22:54

vickycq 写了:
或尝试使用 Realtek 官方的 r8101 驱动:(2015-12-08 更新)
http://www.realtek.com.tw/Downloads/dow ... TypeID=3#2
安装 linux-headers-`uname -r`, build-essential 等必备工具,自行编译
网卡驱动安装好了以后能,在只连有线的情况下可以: ping http://www.baidu.com 也能: ping 202.108.22.5
可是还是不能打开网页,又搜了一圈,说是 resolvcong 服务的问题.可是

代码: 全选

/etc/resolv.conf  //内容修改不了啊

:Cry :Cry
回复