共计 3164 个字符,预计需要花费 8 分钟才能阅读完成。
今天丸趣 TV 小编给大家分享一下如何查看 linux 是不是万兆网的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。
查看 linux 是不是万兆网的方法:1、通过 ethtool 和 lspci 命令查看网卡是千兆还是万兆网卡;2、通过 ifconfig 命令查看机器网络端口,然后执行“sudo ethtool eno1”命令查看网络带宽是千兆还是万兆即可。
Linux 查看网卡是千兆还是万兆网卡
目前用过的两个命令:
1、ethtool
ethtool 网络接口名
#ethtool em4
Settings for em4:
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 pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: Unknown
Supports Wake-on: g
Wake-on: d
Link detected: yes
2、lspci
当前是博通 BCM5709 千兆网卡 Gigabit(万兆网卡显示为 10-Gigabit)
#lspci -vvv | grep Ethernet
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 GigabitEthernet (rev 20)
Subsystem: Dell PowerEdge R710 BCM5709 Gigabit Ethernet
Product Name: Broadcom NetXtreme II Ethernet Controller
01:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
Subsystem: Dell PowerEdge R710 BCM5709 Gigabit Ethernet
Product Name: Broadcom NetXtreme II Ethernet Controller
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
Subsystem: Dell PowerEdge R710 BCM5709 Gigabit Ethernet
Product Name: Broadcom NetXtreme II Ethernet Controller
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
Subsystem: Dell PowerEdge R710 BCM5709 Gigabit Ethernet
Product Name: Broadcom NetXtreme II Ethernet Controller
pcilib: sysfs_read_vpd: read failed: Connection timed out
小知识:
Gigabit 是数据存储的单位,通常用符号 Gbit 或 Gb 表示。它的换算公式:1 Gb = 10 的 9 次方 bits = 1,000,000,000 bits。
另一个常见的单位是 Gibibit,gibibit 是用来表示二进制换算的,1 gibibit = 2 的 30 次方 bits = 1,073,741,824 bits。
Linux 查看网络带宽是千兆还是万兆
首先查看机器网络端口
[root@namenode ~]# ifconfig
eno1: flags=4163 UP,BROADCAST,RUNNING,MULTICAST mtu 1500
inet 192.168.60.190 netmask 255.255.255.0 broadcast 192.168.80.255
inet6 fe80::b62e:99ff:fe65:3bd6 prefixlen 64 scopeid 0x20 link
ether b4:2e:99:65:3b:d6 txqueuelen 1000 (Ethernet)
RX packets 1034361639 bytes 496433512301 (462.3 GiB)
RX errors 0 dropped 144034 overruns 0 frame 0
TX packets 977985340 bytes 163296216477 (152.0 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xf7200000-f7220000
查看端口带宽 (root 或 sudo 权限),通过下面输出可以看到 speed 那一行,表示千兆网。
[root@namenode ~]# sudo ethtool eno1
Settings for eno1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
以上就是“如何查看 linux 是不是万兆网”这篇文章的所有内容,感谢各位的阅读!相信大家阅读完这篇文章都有很大的收获,丸趣 TV 小编每天都会为大家更新不同的知识,如果还想学习更多的知识,请关注丸趣 TV 行业资讯频道。