Chinaunix首页 | 论坛 | 博客
  • 博客访问: 841382
  • 博文数量: 150
  • 博客积分: 5123
  • 博客等级: 大校
  • 技术积分: 1478
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-06 10:03
文章分类

全部博文(150)

文章存档

2011年(2)

2010年(139)

2009年(9)

分类: 系统运维

2010-07-02 16:13:00

遇到两台机器的万兆铜线网卡怎么也弄不通(万兆网卡的类型为:Intel Corporation 82598EB 10 Gigabit AF Network Connection),这种情况发生过几次了,后来经过测试发现使用下面这些办法后,就会莫名其妙的通了:
ethtool -s eth4 advertise 0x03F
设置速度为1000Mb,然后再把速度改回去:
ethtool -s eth4 advertise 0x800
好果还不通,把万兆网卡的驱动重新装载:
rmmod ixgbe
modprobe ixgbe
然后再:
ethtool -s eth4 advertise 0x03F
ethtool -s eth4 advertise 0x800

万兆网卡不指定速度为10000,不知道为什么:
运行ethtool -s eth4 speed 10000后直接出ethtool的帮助信息,所以如果想改动万兆网卡的速度,需要使用advertise子项。

不能关闭自动协商参数:
[root@ctr_db3 etc]# ethtool -s eth4 autoneg off
Cannot set new settings: Invalid argument
  not setting autoneg
    
[root@ctr_db3 etc]# ethtool -s eth4 advertise 0x800 autoneg off speed 1000 duplex full
Cannot set new settings: Invalid argument
  not setting speed
  not setting duplex
  not setting autoneg

[root@ctr_db3 etc]# ethtool -s eth4 autoneg off speed 1000 duplex full
Cannot set new settings: Invalid argument
  not setting speed
  not setting duplex
  not setting autoneg

[root@ctr_db3 etc]# ethtool eth4
Settings for eth4:
        Supported ports: [ TP ]
        Supported link modes:   1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  1000baseT/Full
                                10000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 10000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes

可以设置的advertise参数:
advertise的值:
0x001    10 Half
0x002    10 Full
0x004    100 Half
0x008    100 Full
0x010    1000 Half(not supported by IEEE standards)
0x020    1000 Full
0x8000   2500 Full(not supported by IEEE standards)
0x800    10000 Full
0x03F    Auto

ethtool -s eth4 advertise 0x03F

[root@ctr_db3 etc]# ethtool -s eth4 advertise 0x800
[root@ctr_db3 etc]# ethtool eth4
Settings for eth4:
        Supported ports: [ TP ]
        Supported link modes:   1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  1000baseT/Full
                                10000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 10000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes
[root@ctr_db3 etc]# ethtool -s eth4 advertise 0x03F
[root@ctr_db3 etc]# ethtool eth4
Settings for eth4:
        Supported ports: [ TP ]
        Supported link modes:   1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes

但是设置完eth4的advertise,速度变为1000Mb了。看另一端机器也变成了1000Mb了。
[root@node_data1 ~]# ethtool eth2
Settings for eth2:
        Supported ports: [ TP ]
        Supported link modes:   1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  Not reported
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes



Redhat5.x 自带的ixgbe驱动与iscsi是有冲突的,需要重新下载新的驱动,按下面的方法编译。
make CFLAGS_EXTRA="-DIXGBE_NO_LRO -DIXGBE_NAPI" install
我下载的驱动版本为:ixgbe-2.0.38.2
阅读(24006) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2011-04-13 23:50:58

不能关闭自动协商参数: [root@ctr_db3 etc]# ethtool -s eth4 autoneg off Cannot set new settings: Invalid argument not setting autoneg 我也遇到同样的问题,请问为什么不能关闭auto negotiation?