linux系统查看网卡是否开启,查看Linux下网卡状态或 是否连接

linux系统查看网卡是否开启,查看Linux下网卡状态或 是否连接1)通过mii-tool指令[root@localhostroot]#mii-tooleth0:negotiated100baseTx-FD,linkoketh1:nolink或[root@localhostroot]#mii-tool-veth0:negotiated100baseTx-FD,linkokproductinfo:vendor00:50:43,…

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

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.net/180526.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • cannot convert the variable type_lingodeer怎么弄成中文

    cannot convert the variable type_lingodeer怎么弄成中文python报错如下:TypeError:cannotunpacknon-iterableNoneTypeobject解决方法:报错的原因是函数返回值得数量不一致,查看函数返回值数量和调用函数时接收返回值的数量是不是一致,修改一致即可…

    2025年7月25日
    2
  • git rebase详解(图解+最简单示例,一次就懂)[通俗易懂]

    git rebase详解(图解+最简单示例,一次就懂)[通俗易懂]在拉公共分支最新代码的时候使用rebase,也就是gitpull-r但往公共分支上合代码的时候,使用merge

    2022年8月22日
    7
  • 使用python实现京东抢购脚本

    使用python实现京东抢购脚本环境:python3.7浏览器:火狐在pythonscripts文件夹下边放入相应版本的geckodrivercmd页面:pipinstallseleniumpipinstalldatetime事先需要把商品放入购物车,电脑时间和北京时间一致fromseleniumimportwebdriverimporttimeimportda…

    2022年6月18日
    71
  • 签名字体怎么练_练字方法练自己名字签字

    签名字体怎么练_练字方法练自己名字签字导读:今天来给大家分享【签名字体怎么练】技法来源于网络,只是分享学习一下。感谢大家的支持,如果,你在签名字体上有什么不懂的可以来询问我的。谢谢大家的浏览!签名字体怎么练1、签名也是字体造型的再创作,因此签名设计对一个人的书法水平和理解能力还是有一定要求的。在此,我建议大家可以先练习好楷书和行书。如果真的没那个天分,就好好练习数字1.2.3.4.5.6.7.8.9。为什么练习数字可以对设计签名有帮助呢,因为数字和汉字笔画在书写方面具有一定的相似性,可以借鉴。同时帮助您练顺运笔。2、要想设计好签名,就要

    2025年9月21日
    5
  • AWVS10.5&12超详细使用教程

    AWVS10.5&12超详细使用教程AWVS介绍awvs

    2025年5月27日
    2
  • excel多列合并关联数据[通俗易懂]

    excel多列合并关联数据[通俗易懂]假设现在有三张表第一张第二张第三张姓名与操作id相对应,现在想弄出这样的一个表,将多列数据整合起来那怎么做呢?需要用到函数vlookup这个查找值是合并时不变的那列,在这个案例下,就是指日期+姓名+操作id这三列,但是这里是不能写这么多的,只能是一列的第一个值,作为查找值,应该是像主键一样具有唯一的id。第一步,将三列合并为一列,需要用到函数concatenate公式

    2022年7月17日
    15

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号