首頁  >  文章  >  運維  >  怎麼檢查linux是不是萬兆網

怎麼檢查linux是不是萬兆網

藏色散人
藏色散人原創
2023-03-22 09:20:576676瀏覽

查看linux是不是萬兆網的方法:1、透過ethtool和lspci命令查看網卡是千兆還是萬兆網卡;2、透過ifconfig命令查看機器網路端口,然後執行“sudo ethtool eno1”指令查看網路頻寬是千兆還是萬兆即可。

怎麼檢查linux是不是萬兆網

本教學操作環境:linux5.9.8系統、Dell G3電腦。

怎麼看linux是不是萬兆網路?

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影片教學

以上是怎麼檢查linux是不是萬兆網的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn