前些天安装了Elementary OS 本以为有线网络已断开的问题会解决,但是安装好后问题依然存在。本人先前安装的是Ubuntu 12.04 后来升级到了13.04,在宿舍中上网插上网线一切正常,但是在教室中却不行,一直提示有线网络已断开,google了一下 修改ip 修改/etc/network/interfaces的方法都试过了还是不能解决, 后来想了想,宿舍可以,但是教室u而不可以,肯定不是网卡驱动的事情,而且网上有人说过网卡与交换机的不兼容性问题,于是百度了一下,果然有类似的问题。电脑网卡的工作模式设置不正确有可能导致与交换机不能通讯。 于是乎问题解决了 解决过程如下 1.安装ethtool软件设置网卡的工作模式 - 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 这是我电脑设置过的网卡信息 - Settings for eth0:
- Supported ports: [ TP MII ]
- Supported link modes: 10baseT/Half 10baseT/Full
- 100baseT/Half 100baseT/Full
- 1000baseT/Half 1000baseT/Full
- Supported pause frame use: No
- Supports auto-negotiation: Yes
- Advertised link modes:Not reported
- Advertised pause frame use: No
- Advertised auto-negotiation: No
- Speed: 100Mb/s
- Duplex: Full
- Port: MII
- PHYAD: 1
- Transceiver: internal
- Auto-negotiation: off
- Cannot get wake-on-lan settings: Operation not permitted
- Current message level: 0x000020c6 (8390)
- probe link rx_err tx_err hw
- Cannot get link status: Operation not permitted
关闭了网卡的自动协商功能,设置网卡在100M下工作,设置全双工的工作模式命令如下 - sudo ethtool -s eth0 autoneg off speed 100 duplex full
设置以后 电脑奇迹般的能连上有线网络了3.设置 开机自启动 打开/etc/init.d/rc.local - sudo vim /etc/init.c/rc.local
在文件的最后添加- /sbin/ethtool -s eth0 autoneg off speed 100 duplex full
到此结束,希望能解决你的问题 |