linux/centos如何查看网卡是100M还是1000M

 我来答
路尧家的顾小言
2019-10-20 · TA获得超过9412个赞
知道答主
回答量:336
采纳率:100%
帮助的人:6.2万
展开全部

可以使用ethtool命令进行查看,使用格式ethtool 网络接口名。

以下为例,eth0为网卡名,使用ifconfig查看当前使用的网卡。

Speed表示网卡带宽,Duplex表示工作模式,Supported link modes表示支持的工作模式。

扩展资料:

ethtool命令的其它用法:

1、查询网络端口位置:ethtool -p ethX

这个命令多用于管理多网口的服务器主机,由于背板的网络端口数量大,有时候不知道那个物理端口对应eth0或其他设备号,我们就可以使用这个命令来查询。

用法:ethtool -p eth0

效果:设备号eth0对应的物理端口的两个指示灯会闪烁

2、修改网络端口速率:ethtool -s

这个命令多用于手工设置网络速率,一般千兆网卡支持10|100|1000三个速率,单位是Mbps。 

用法:ethtool -s eth0 speed 1000 duplex full autoneg off

效果:将设备号eth0对应的物理端口设置为速率为1000Mbps,全双工工作模式,同时关闭自动协商。

Storm代理
2023-07-25 广告
StormProxies是一家国内优质海外HTTP代理商,拥有一个庞大的IP资源池,覆盖200多个地区,IP数量大且匿名度高。其优点还包括超高并发、稳定高效、技术服务等特点,同时提供HTTP、HTTPS以及SOCKS5协议支持。此外,Sto... 点击进入详情页
本回答由Storm代理提供
leisure_75

推荐于2017-10-13 · 还没有填写任何签名哦
leisure_75
采纳数:14134 获赞数:76350

向TA提问 私信TA
展开全部
使用以下2个命令可以查看:
1)查看网卡型号
lspci | grep Ethernet
这个命令可以查看你的网卡设备型号,根据型号就知道是什么性能了。
2)查看网卡实际通讯速率
dmesg | grep eth0
这个命令可以列出网卡工作速率。看到 Up 1000Mps full duplex 就知道是千兆网卡了。
(这里 eth0是网卡的设备名,不同机器名称可能不同。可以用ifconfig 查看自己网卡的设备名)
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
yexicheng
推荐于2017-09-21 · TA获得超过1.2万个赞
知道大有可为答主
回答量:8857
采纳率:69%
帮助的人:7302万
展开全部
[root@www.ctohome.com]# mii-tool -V
mii-tool.c 1.9 2000/04/28 00:56:08 (David Hinds)
SIOCGMIIREG on eth0 failed: Input/output error
eth0: negotiated 100baseTx-FD, link ok

[root@www.ctohome.com]# mii-tool -v
SIOCGMIIREG on eth0 failed: Input/output error
eth0: negotiated 100baseTx-FD, link ok
product info: vendor 00:aa:00, model 57 rev 0
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

[root@www.ctohome.com]# 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: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbag
Wake-on: g
Current message level: 0x00000001 (1)
Link detected: yes

要测试是否是1000M端口,最保险的说用wget测试一个对方的带宽足够大的下载地址:

wget http://cachefly.cachefly.net/100mb.test
--2011-03-14 22:19:12-- http://cachefly.cachefly.net/100mb.test
Resolving cachefly.cachefly.net... 205.234.175.175
Connecting to cachefly.cachefly.net|205.234.175.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: `100mb.test.2'

100%[===================================================================================================================>] 104,857,600 39.1M/s in 2.6s

2011-03-14 22:19:14 (39.1 MB/s) - `100mb.test.2' saved [104857600/104857600]

如果下载速度能超过15MB/s,那么不是100M端口了,通常就是1000M端口

如果是独立服务器,可以通过下面命令核查网卡端口:

[root@www.ctohome.com ]# 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: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbag
Wake-on: g
Current message level: 0x00000001 (1)
Link detected: yes
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
gf475471240
2018-07-04
知道答主
回答量:14
采纳率:0%
帮助的人:5.6万
展开全部
ethtool eth0 | grep Speed
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式