linux查看网卡有没有查网线,查看linux系统下网卡是否连接网线的状态

网上找到的资料,对我现在非常有用,现转到这里做备忘

一、通过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也可以看到网卡的信息

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值