
【解决方法】
1、ifconfig查看现在使用的网卡。
2、ethtool命令查看网卡的具体信息,如eth0是连接状态,则正常使用。
2、在ifconfig中可以看到有eth2这个网卡,但不知道是否连线,这时用ethtool就可以看到link是no,那么表示是没有连线的。
Linux *** 作系统是UNIX *** 作系统的一种克隆系统,它诞生linux系统于1991 年的10 月5 日(这是第一次正式向外公布的时间)。以后借助于Internet网络,并通过全世界各地计算机爱好者的共同努力,已成为今天世界上使用最多的一种UNIX 类 *** 作系统,并且使用人数还在迅猛增长。
Linux是一套免费使用和自由传播的类Unix *** 作系统,是一个基于POSIX和UNIX的多用户、多任务、支持多线程和多CPU的 *** 作系统。它能运行主要的UNIX工具软件、应用程序和网络协议。它支持32位和64位硬件。Linux继承了Unix以网络为核心的设计思想,是一个性能稳定的多用户网络 *** 作系统。它主要用于基于Intel x86系列CPU的计算机上。这个系统是由全世界各地的成千上万的程序员设计和实现的。其目的是建立不受任何商品化软件的版权制约的、全世界都能自由使用的Unix兼容产品。
一、通过mii-tool指令[root@linuxzgf ~]# mii-tool
//mii-tool主要是用于配置网卡工作模式的指令,同时也可以进行查询、监控等工作!
二、ethtool
[root@linuxzgf ~]# ethtool eth0
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: yes
从上面 Link detected 可以看出eth0 处于连接状态
三.[root@linuxzgf ~]# /etc/init.d/network status
配置设备:
lo eth0 eth0.10 eth0.2 eth0.3 eth0.4 eth0.5 eth0.7 eth0.8 eth1
当前的活跃设备:
lo eth0 eth0.10
[四、ifconfig -a
[root@linuxzgf ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:E0:81:80:D8:96
inet6 addr: fe80::2e0:81ff:fe80:d896/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:626032 errors:0 dropped:0 overruns:0 frame:0
TX packets:415035 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:123631002 (117.9 MiB) TX bytes:297575498 (283.7 MiB)
Base address:0x2000 Memory:df300000-df320000
eth1 Link encap:Ethernet HWaddr 00:E0:81:80:D8:97
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)
Base address:0x2020 Memory:df320000-df340000
五、lspci也可以看到网卡的信息
有的人用ifconfig -a 查网卡已经配置的正确的IP地址,可是就是ping不能网络,到机房一看网线没接,^@^! 网络不通 会有好多原因,但最先查的就是网卡的网络是还已连接并UP。就像办公室的MM喊着说上不了网,结果“本地连接”都是“X”的一样的情况。[root@localhost root]# mii-tooleth0: negotiated 100baseTx-FD, link oketh1: no link或[root@localhost root]# mii-tool -veth0: negotiated 100baseTx-FD, link okproduct info: vendor 00:50:43, model 2 rev 3basic mode: autonegotiation enabledbasic status: autonegotiation complete, link okcapabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HDadvertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-controllink partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HDeth1: no linkproduct info: vendor 00:50:43, model 2 rev 3basic mode: autonegotiation enabledbasic status: no linkcapabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HDadvertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control或[root@localhost root]# mii-tool -w21:20:33 eth0: negotiated 100baseTx-FD, link ok21:20:33 eth1: no link//mii-tool主要是用于配置网卡工作模式的指令,同时也可以进行查询、监控等工作!2)[root@localhost /]# /etc/init.d/network statusConfigured devices:lo eth0 eth1Currently active devices:lo eth0等同于[root@localhost root]# service --status-allConfigured devices:lo eth0 eth1欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)