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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • painless 简介

    painless是一种为安全和性能而设计的脚本语言。语法与Java语法类似,可用于所有可以使用script的场景下。painless提供:快速性能:脚本的运行速度比其他脚本快几倍。安全性:具有方法调用/字段粒度的细粒度白名单。可选类型:变量和参数可以使用显式类型或动态定义类型。语法:扩展Java的语法以提供Groovy风格的脚本语言特性,使脚本更易于编写。优化:专门为ElasticS…

    2022年4月6日
    70
  • linux nmap命令,nmap命令

    linux nmap命令,nmap命令nmap(“NetworkMapper(网络映射器)”)是一款开放源代码的网络探测和安全审核的工具。它的设计目标是快速地扫描大型网络,当然用它扫描单个主机也没有问题。Nmap以新颖的方式使用原始IP报文来发现网络上有哪些主机,那些主机提供什么服务(应用程序名和版本),那些服务运行在什么操作系统(包括版本信息),它们使用什么类型的报文过滤器/防火墙,以及一堆其它功能。虽然Nmap通常用于…

    2022年5月28日
    40
  • python的concat函数_python concat函数

    python的concat函数_python concat函数test1=pd.DataFrame(np.random.randn(2,2),columns=[‘1′,’2’])test1test2=pd.DataFrame(np.random.randn(4,2),columns=[‘1′,’sss’])test2test3=pd.concat([test1,test2])test3test4=pd.concat([test1,test2],axis=1)…

    2022年5月1日
    50
  • 微信小程序api

    微信小程序api1.api1.概述小程序开发框架提供丰富的微信原生API,可以方便的调起微信提供的能力,如获取用户信息,本地存储,支付功能等2.api分类监听api约定以on开头的API用了来监听某个事件是否触发同步api约定,以Sync结尾的API都是同步API,直接接取函数返回的的结果既可,不需要等待异步api大多数API都是异步API,如wx.request,wx.login等,异步api方法主体是object结构,都有success/faill/complete几乎所有的异步api都支

    2022年7月16日
    16
  • 计算机定时关机命令,定时关机命令,小编教你怎么使用命令行定时关机

    计算机定时关机命令,定时关机命令,小编教你怎么使用命令行定时关机当我们在操作电脑的时候,有时会有需要定时关机,或者不在电脑前操作是需要过段时间自动关机,但是没有自带的定时关机软件,很多电脑用户又不喜欢安装第三方软件来完成该操作。那么怎么定时关机?下面,小编给大家带来了使用命令行定时关机的图文。有时候,下载一个东西,但是又要关闭电脑睡觉了,但是又想等东东下载好了,才去睡觉,想想如果能定时关机就好了。作为程序员的我,有时候就是作践自己啊,那怎么使用命令行定时关机?…

    2022年5月15日
    40
  • list列表下嵌套多个list_datalist和select的区别

    list列表下嵌套多个list_datalist和select的区别 aspxviewplaincopytoclipboardprint?%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”DataListNesting.aspx.cs” Inherits=”DataListNesting” %>  >  html xmlns=”http://www.w3.org/1

    2022年10月13日
    0

发表回复

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

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