ubuntu14.10 有线连接连接不上

1.安装ethtool软件设置网卡的工作模式

  1. sudo apt-get install ethtool
2. ethtool的命令

概要:

ethtool ethX //查询ethX网口基本设置

ethtool –h  //显示ethtool的命令帮助(help)

ethtool –i ethX//查询ethX网口的相关信息

ethtool –d ethX//查询ethX网口注册性信息

ethtool –r ethX//重置ethX网口到自适应模式

ethtool –S ethX//查询ethX网口收发包统计

ethX 是网卡的代表,具体可以用ifconfig命令查看 第一块有线网卡是eth0

这是我电脑设置过的网卡信息

  1. Settings for eth0:
  2.  Supported ports: [ TP MII ]
  3.  Supported link modes: 10baseT/Half 10baseT/Full
  4.  100baseT/Half 100baseT/Full
  5.  1000baseT/Half 1000baseT/Full
  6.  Supported pause frame use: No
  7.  Supports auto-negotiation: Yes
  8.  Advertised link modes:Not reported
  9.  Advertised pause frame use: No
  10.  Advertised auto-negotiation: No
  11.  Speed: 100Mb/s
  12.  Duplex: Full
  13.  Port: MII
  14.  PHYAD: 1
  15.  Transceiver: internal
  16.  Auto-negotiation: off
  17. Cannot get wake-on-lan settings: Operation not permitted
  18.  Current message level: 0x000020c6 (8390)
  19. probe link rx_err tx_err hw
  20. Cannot get link status: Operation not permitted

关闭了网卡的自动协商功能,设置网卡在100M下工作,设置全双工的工作模式

命令如下

  1. sudo ethtool -s eth0 autoneg off speed 100 duplex full
设置以后 电脑奇迹般的能连上有线网络了

3.设置 开机自启动

打开/etc/init.d/rc.local

  1. sudo vim /etc/init.c/rc.local
在文件的最后添加
  1. /sbin/ethtool -s eth0 autoneg off speed 100 duplex full
到此结束,希望能解决你的问题
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值