无法在 Linux 上设置 NIC 以建立千兆链接

El *_*rto 8 networking ubuntu gigabit-ethernet ethtool

我有 Ubuntu 11.10 64 位和一个(实际上是两个,但只有一个连接)英特尔 82578 千兆网卡,它以 100 Mbps 的速度运行,我希望它以 1000 Mbps 的速度运行,但我不能。我怎样才能找出问题所在?

这是我尝试使用 ethtool 设置速度时发生的情况:

# ethtool -s eth0 speed 1000
Cannot advertise speed 1000
Run Code Online (Sandbox Code Playgroud)

我也试过这个并失去了网络连接:

# ethtool -s eth0 speed 1000 duplex full
Run Code Online (Sandbox Code Playgroud)

我已经没有关于去哪里寻找的想法了。

一些信息:

服务器连接到 Cisco RVS4000 路由器,该路由器的所有活动端口都配置为在 1000 Mbps 全双工下工作,具有自动协商功能。事实上,还有另一台服务器连接到路由器的另一个端口,它以 1000 Mbps 的速度运行良好。

关于我遇到问题的服务器的信息:

lshw:

# lshw -C network
  *-network               
       description: Ethernet interface
       product: 82578DM Gigabit Network Connection
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: eth0
       version: 05
       serial: 00:1e:67:15:2b:f1
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=1.3.10-k2 duplex=full firmware=0.10-2 ip=192.168.1.12 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:45 memory:b1a00000-b1a1ffff memory:b1a24000-b1a24fff ioport:2020(size=32)
  *-network
       description: Ethernet interface
       product: 82574L Gigabit Network Connection
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: eth1
       version: 00
       serial: 00:1e:67:15:2b:f0
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=1.3.10-k2 firmware=1.9-0 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:16 memory:b1900000-b191ffff ioport:1000(size=32) memory:b1920000-b1923fff
Run Code Online (Sandbox Code Playgroud)

工具

# 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 pause frame use: No
    Advertised auto-negotiation: Yes
    Speed: 100Mb/s
    Duplex: Full
    Port: Twisted Pair
    PHYAD: 2
    Transceiver: internal
    Auto-negotiation: on
    MDI-X: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000001 (1)
                   drv
    Link detected: yes
Run Code Online (Sandbox Code Playgroud)

dmesg 有关网络驱动程序的信息:

# dmesg |grep e1000e
[    1.938726] e1000e: Intel(R) PRO/1000 Network Driver - 1.3.10-k2
[    1.938729] e1000e: Copyright(c) 1999 - 2011 Intel Corporation.
[    1.938764] e1000e 0000:00:19.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    1.938775] e1000e 0000:00:19.0: setting latency timer to 64
[    1.938878] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X
[    2.181735] e1000e 0000:00:19.0: eth0: (PCI Express:2.5GT/s:Width x1) 00:1e:67:15:2b:f1
[    2.181737] e1000e 0000:00:19.0: eth0: Intel(R) PRO/1000 Network Connection
[    2.181771] e1000e 0000:00:19.0: eth0: MAC: 9, PHY: 9, PBA No: 0310FF-0FF
[    2.181785] e1000e 0000:03:00.0: Disabling ASPM L0s 
[    2.181799] e1000e 0000:03:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    2.181816] e1000e 0000:03:00.0: setting latency timer to 64
[    2.182046] e1000e 0000:03:00.0: irq 46 for MSI/MSI-X
[    2.182050] e1000e 0000:03:00.0: irq 47 for MSI/MSI-X
[    2.182053] e1000e 0000:03:00.0: irq 48 for MSI/MSI-X
[    2.293669] e1000e 0000:03:00.0: eth1: (PCI Express:2.5GT/s:Width x1) 00:1e:67:15:2b:f0
[    2.293672] e1000e 0000:03:00.0: eth1: Intel(R) PRO/1000 Network Connection
[    2.293754] e1000e 0000:03:00.0: eth1: MAC: 3, PHY: 8, PBA No: 1010FF-0FF
[   15.316964] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X
[   15.372707] e1000e 0000:00:19.0: irq 45 for MSI/MSI-X
[   19.897407] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx
[   19.897412] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO
Run Code Online (Sandbox Code Playgroud)

MDM*_*rra 11

听起来交换机端口或物理媒体有问题。如果您的自动协商将您设置为 100Mb,而您无法将其强制为 1Gb,那么您可能遇到了物理问题。

也就是说,如果您要强制使用 1Gb/s,则应确保在两侧都执行此操作。不要在不将相应的交换机端口也从自动关闭的情况下将网卡关闭自动。