免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3369 | 回复: 6
打印 上一主题 下一主题

网卡速率问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-23 11:44 |只看该作者 |倒序浏览
centos
# uname -a
Linux zhangxu 2.6.9-42.ELsmp #1 SMP Sat Aug 12 09:39:11 CDT 2006 i686 i686 i386 GNU/Linux
日志中报:
kernel: bnx2: eth1 NIC Link is Down
kernel: bnx2: eth1 NIC Link is Up, 100 Mbps full duplex, receive & transmit flow control ON
这样千M的网卡就变成百兆的了,如下:
# ethtool eth1
Settings for eth1:
        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 auto-negotiation: Yes
        Speed: 100Mb/s 注意这里
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes
只有/etc/init.d/netwrok restat之后才能到1000M
ethtool eth1
Settings for eth1:
        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 auto-negotiation: Yes
        Speed: 1000Mb/s  注意这里
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: d
        Wake-on: d
        Link detected: yes
麻烦各位帮忙分析下什么原因,或者怎么能让其启动的时候直接不自适应
附# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
BROADCAST=192.168.2.255
HWADDR=00:1D:09:16:34:70
IPADDR=192.168.2.19
NETMASK=255.255.255.0
NETWORK=192.168.2.0
ONBOOT=yes
TYPE=Ethernet

论坛徽章:
34
亥猪
日期:2015-03-20 13:55:11戌狗
日期:2015-03-20 13:57:01酉鸡
日期:2015-03-20 14:03:56未羊
日期:2015-03-20 14:18:30子鼠
日期:2015-03-20 14:20:14丑牛
日期:2015-03-20 14:20:31辰龙
日期:2015-03-20 14:35:34巳蛇
日期:2015-03-20 14:35:56操作系统版块每日发帖之星
日期:2015-11-06 06:20:00操作系统版块每日发帖之星
日期:2015-11-08 06:20:00操作系统版块每日发帖之星
日期:2015-11-19 06:20:00黄金圣斗士
日期:2015-11-24 10:43:13
2 [报告]
发表于 2009-09-23 12:24 |只看该作者
试试 mii-tool 命令,ifconfig 好像也可以改的。

论坛徽章:
0
3 [报告]
发表于 2009-09-23 14:35 |只看该作者
原帖由 vermouth 于 2009-9-23 12:24 发表
试试 mii-tool 命令,ifconfig 好像也可以改的。

我的意思是
kernel: bnx2: eth1 NIC Link is Down
kernel: bnx2: eth1 NIC Link is Up, 100 Mbps full duplex, receive & transmit flow control ON
当日志中Down之后 让起启动的时候直接就不是自适应
默认应该是加在/etc/sysconfig/network-scripts/ifcfg-eth1中的

ethtool工具来禁用网卡eth0驱动模块的网卡自适应特性
# ethtool -s eth0 autoneg off speed 1000 duplex full

[ 本帖最后由 xuledw 于 2009-9-23 14:52 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2009-09-23 15:10 |只看该作者
测试机中加入/etc/sysconfig/network-scripts/ifcfg-eth1中加入
ETHTOOL_OPTS="speed 1000 duplex full autoneg off
没有问题 但是在服务器
# ethtool -s eth1 speed 1000 duplex full autoneg off
Cannot set new settings: Invalid argument
  not setting speed
  not setting duplex
  not setting autoneg
就报这个 郁闷了

论坛徽章:
0
5 [报告]
发表于 2009-09-26 13:01 |只看该作者
原帖由 vermouth 于 2009-9-23 12:24 发表
试试 mii-tool 命令,ifconfig 好像也可以改的。

mii-tool是不支持千M网卡的。
要用ethtool

论坛徽章:
0
6 [报告]
发表于 2009-09-26 13:01 |只看该作者

回复 #4 xuledw 的帖子

你的交换机是千M的吗?

论坛徽章:
0
7 [报告]
发表于 2009-09-27 13:36 |只看该作者

回复 #1 xuledw 的帖子

如果驱动正确 网卡应该是不会反复如此的
看看系统的messages的日志信息
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP