ubunut 千兆网卡的疑问

我有一个ubuntu物理机,上面安装了两个网卡,现在网线插在了百兆网卡上enp2s0,千兆网卡网口enp1s0没插网线,可是查看enp1s0却显示是10Mb/s.
相关使用的命令如下,enp1s0是千兆网卡,enp2s0是百兆网卡.

root@sangfor-System-Product-Name:~#  cat /sys/class/net/enp1s0/speed 
10
root@sangfor-System-Product-Name:~# cat /sys/class/net/enp2s0/speed 
100

root@sangfor-System-Product-Name:~# ethtool enp1s0
Settings for enp1s0:
    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: 10Mb/s
    Duplex: Half
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000033 (51)
                   drv probe ifdown ifup
    Link detected: no




root@sangfor-System-Product-Name:~# ethtool enp2s0
Settings for enp2s0:
    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Full 
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Link partner advertised link modes:  10baseT/Half 10baseT/Full 
                                         100baseT/Half 100baseT/Full 
    Link partner advertised pause frame use: Symmetric Receive-only
    Link partner advertised auto-negotiation: Yes
    Link partner advertised FEC modes: Not reported
    Speed: 100Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000033 (51)
                   drv probe ifdown ifup
    Link detected: yes
root@sangfor-System-Product-Name:~# 

求解这是为什么?

阅读 5.8k
2 个回答

Speed: 10Mb/s 只是网卡物理规格允许的其中一项, 还可以是 100M1000M, 3选1, 没有其他可能了.

一般而言, 网卡启动时启用最小速度, 之后根据对端的规格, 做自适应调整(手动设置了规格的除外).
请参考 https://en.wikipedia.org/wiki...

举例来说, 设置了自适应的网卡接入 100M 交换机时, 它的速度就变成 100M, 介入 1000M 交换机时, 变成 1000M.

这个跟网卡驱动有关吧,许是默认没有UP时,这个网卡上设置的速率就是10M呢

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题