ubunut 千兆网卡的疑问

发布于 2022-09-11 18:02:36 字数 2544 浏览 12 评论 0

我有一个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:~# 

求解这是为什么?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

挖个坑埋了你 2022-09-18 18:02:36

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

青萝楚歌 2022-09-18 18:02:36

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

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文