linux查看哪个网卡插着网线,查看linux系统下网卡是否连接网线的状态
查看Linux下网卡状态或是否连接
一、通过mii-tool指令
[root@linuxzgf ~]# mii-tool
eth0: negotiated 100baseTx-FD, link ok
eth1: no link
[root@linuxzgf ~]#
或
[root@linuxzgf ~]# mii-tool -v
eth0: negotiated 100baseTx-FD, link ok
product info: vendor 00:50:43, model 10 rev 2
basic mode: autonegotiation enabled
basic status: autonegotiation complete, link ok
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
link partner: 100baseT4 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
eth1: no link
product info: vendor 00:50:43, model 10 rev 2
basic mode: autonegotiation enabled
basic status: no link
capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
[root@linuxzgf ~]#
或
[root@linuxzgf ~]# mii-tool -w
14:52:45 eth0: negotiated 100baseTx-FD, link ok
14:52:45 eth1: no link
//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
[root@linuxzgf ~]#
[root@linuxzgf ~]# ethtool eth1
Settings for eth1:
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: Unknown! (65535)
Duplex: Unknown! (255)
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000007 (7)
Link detected: no
[root@linuxzgf ~]#
从上面可以看出eth0 处于连接状态,eth1没有连接
三、
[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
[root@linuxzgf ~]#
等同于
[root@linuxzgf root]# service --status-all
............
............
Configured devices:
lo eth0 eth1
Currently active devices:
lo eth0
............
............
四、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
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:16436 Metric:1
RX packets:147 errors:0 dropped:0 overruns:0 frame:0
TX packets:147 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:27895 (27.2 KiB) TX bytes:27895 (27.2 KiB)
五、lspci也可以看到网卡的信息
linux查看哪个网卡插着网线,查看linux系统下网卡是否连接网线的状态相关推荐
- Linux系统下网卡网络配置基础
Ifconfig命令使LINUX核心知道软件回送和网卡这样一些网络接口,这样Linux就可以使用它们.除了上面介绍的这些用法之外,ifconfig命令用来监控和改变网络接口的状态,并且还可以带上很多命 ...
- linux设置网卡速度,linux系统下网卡通信速率修改方法
修改网卡的通信速率.全双工/半双工模式.具体操作方案如下: · 查看网卡通信速率 查看linux平台下网卡的通信速率,可以通过"ethtool ethX"来完成,下图为查看linu ...
- 双网卡同网段静态路由_WINDOWS系统下双网卡设置路由 本文主要涉及到静态路由...
WINDOWS系统下双网卡设置路由 本文主要涉及到静态路由. 二.WINDOWS系统下设置路由 在WINDOWS下手动设置路由主要在DOS系统中命令符下(在运行输入 栏中键入COMMAND或者CMD即 ...
- 查看蓝牙命令linux,【转载】Linux系统下命令行连接蓝牙设备 查看查找 蓝牙
[css]通过transform缩放邮件客户端h5页面 摘要 最近一直在折腾邮件通知的东东,大概逻辑就是如果有新邮件,向收件人的app推送一条服务号消息,并且在单击该消息的时候,需要展示邮件的详情. ...
- linux系统下网卡故障解决
1.故障环境说明: 服务器:两台联想G6 配置相同 scsi硬盘两块. 由于其中一台服务器损坏,现将坏服务器的硬盘拿下来插到新服务器上. 硬盘上原有的系统为: Red hat enterprises ...
- 浪潮linux网卡驱动,浪潮NF5280M5安装redhat7.2下网卡驱动
驱动文档如下: Building and Installation To build a binary RPM* package of this driver, run 'rpmbuild -tb i ...
- linux 5.5安装万兆网卡驱动,RedHat 5.5系统下安装MW54U无线USB网卡驱动
首先下载ndiswrapper -1.52.tar.gz和mw54u在windows xp32 和 windows vista 32下的驱动 下面我们来进行安装 第一步:安装ndiswrapper - ...
- Mac系统下使用SecureCRT连接Linux虚拟机及上传文件
连接虚拟机 再回到第一个界面,点击 Connect 如提示输入密码,则输入 Linux 虚拟机登录密码即可 看到如下界面则表示登录成功(可能需要稍等一会) 若要改变字体大小或颜色,需要打开偏好设置,按 ...
- mfc连接ubuntu mysql数据库_Ubuntu 16.04 Linux系统下使用C++连接mysql数据库
Ubuntu安装mysql sudo apt-get install mysql-server,mysql-client,libmysqlclient-dev 安装的时候会提示你设置数据库的密码 安装 ...
最新文章
- Linkis计算中间件部署过程记录
- springboot最佳实践-SpringBoot应用如何编写
- mac os 录屏快捷键_Mac跨平台自动同步记事本
- js实现排序去重计算字符次数
- crash recovery mysql_InnoDB crash recovery 完整过程
- linux socket 编程(C语言)
- android webview的使用问题
- 写了一条Sybase SQL语句,用于生成一个表中所有数据的插入记录的生成
- 从 SGD 到 Adam —— 深度学习优化算法概览(一) 重点
- cpu与简单模型机设计实验_180套经典夹具设计方案(附详解+模型),原来夹具设计这么简单!...
- ocr原理 oracle,Oracle技术之RAC Voting disk和OCR的管理
- 软件工程—实践者的研究方法
- aamp;m大学计算机科学,名校介绍丨美国 德克萨斯AM大学 Texas AM University
- 洛谷 P1427 小鱼的数字游戏
- 英语在线听力翻译器_英语翻译_在线英语听力室
- NOI2016铜色记
- 国内首家中高端自由职业者共享平台——易分之一,即将上线运营
- python手机版怎么用-如何用Python操控手机APP攻略!建议收藏!很全面
- 视频画面滚动字幕怎么做,让你几分钟学会的方法
- java 机机接口定义_【JAVA】接口