linux系统查看网卡是否开启,查看Linux下网卡状态或 是否连接
1) 通过mii-tool指令
[root@localhost root]# mii-tool
eth0: negotiated 100baseTx-FD, link ok
eth1: no link
或
[root@localhost root]# mii-tool -v
eth0: negotiated 100baseTx-FD, link ok
product info: vendor 00:50:43, model 2 rev 3
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: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
eth1: no link
product info: vendor 00:50:43, model 2 rev 3
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@localhost root]# mii-tool -w
21:20:33 eth0: negotiated 100baseTx-FD, link ok
21:20:33 eth1: no link
//mii-tool主要是用于配置网卡工作模式的指令,同时也可以进行查询、监控等工作!
2)
[root@localhost /]#/etc/init.d/network status Configured devices:
lo eth0 eth1
Currently active devices:
lo eth0
等同于
[root@localhost root]# service –status-all
…………
…………
Configured devices:
lo eth0 eth1
Currently active devices:
lo eth0
…………
…………
3)ifconfig -a
[root@localhost /]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:09:6B:09:08:FC
inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::209:6bff:fe09:8fc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:106732953 errors:0 dropped:0 overruns:0 frame:0
TX packets:104379788 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2351331877 (2.1 GiB) TX bytes:391707945 (373.5 MiB)
Base address:0x2500 Memory:fbfe0000-fc000000
eth1 Link encap:Ethernet HWaddr 00:09:6B:09:08:FD
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:0x2540 Memory:fbfc0000-fbfe0000
4)ethtool
#ethtool eth0
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: yes
#ethtool eth1
Settings for eth1:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised auto-negotiation: Yes
Speed: Unknown! (0)
Duplex: Half
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x000000ff (255)
Link detected: no
从上面可以看出eth0 处于连接状态,eth1没有连接
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/180526.html原文链接:https://javaforall.cn
相关文章
- linux系统查看版本命令,Linux系统查看系统版本命令[通俗易懂]
- Linux 版本百科:一网打尽所有版本(linux版本大全)
- Linux安装之旅:开启探索新世界的大门(linux安装界面)
- 服务器Back to the Previous Level of Linux Server(返回上级linux)
- 行Linux下运行命令保存到文件中(linux下编辑保存命令)
- Linux初级知识考核:成为Linux技术专家的第一步(linux初级试题)
- 基于Linux系统的系统检查实践(linux系统检查)
- 掌握Linux基础命令行:利器一般般(linux基础命令行)
- Linux:学习编程语言的必经之路(linux用的什么语言)
- Linux集群架构:构建强大的系统(linux集群架构图)
- Linux系统下安装NS2的指南(linux安装ns2)
- 标题:解除Linux系统的防火墙保护(关闭linux的防火墙)
- Linux系统的发展分支:探索全新世界(linux的分支)
- Linux的演变:延续的分支(linux的分支)
- 禁用Linux系统防火墙:一步一步(关闭linux的防火墙)
- Linux系统的分支及其应用(linux的分支)
- 如何在Linux中安装QWT?——一份详细的教程(linux安装qwt)
- 北京开启Linux运维新时代(北京linux运维培训)
- 挑战Linux编程,展示真实智慧(linux编程题)
- 如何查看 Linux 系统运行时间?25 字带你了解!(linux运行时间)
- 探索Linux系统下开放的端口(linux查看开通的端口)
- 简单易行的方法,Linux系统安装雅黑字体!(linux安装雅黑)
- 设置Linux系统下进程启动参数的调整(linux 进程启动参数)
- 如何在Linux系统中创建文件(linux创建文件)