linux配置网卡onboot,今天重新认识了Linux 网卡配置

root@x4100-9098/etc/ssh#mii-tool eth3

eth3: negotiated 100baseTx-HD, link ok

root@x4100-9098/etc/ssh#ethtool eth3

Settings for eth3:

Supported ports: [ TP ]

Supported link modes:   10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

1000baseT/Full

Supported pause frame use: No

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: Half

Port: Twisted Pair

PHYAD: 0

Transceiver: internal

Auto-negotiation: on

MDI-X: Unknown (auto)

Supports Wake-on: d

Wake-on: d

Current message level: 0x00000007 (7)

drv probe link

Link detected: no

我想问的问题是eth3接网线了吗?

找了个linux大牛,看了下,就说了一句:  you need modify the NIC as onboot=yes

证明:

Link detected: no >>>>>  1)可能是没接好网线

2)没设置onboot=yes.

要使用网卡,最好设置onboot=yes,  没设置    onboot=NO 的还有一个后果是,无论如何插拔这个nic, /var/log/meassages里面都不会有任何提示。

当设置好       onboot=yes 后,并重起这个NIC, 正常显示的结果是:

root@x4100-9098~#ethtool eth3

Settings for eth3:

Supported ports: [ TP ]

Supported link modes:   10baseT/Half 10baseT/Full

100baseT/Half 100baseT/Full

1000baseT/Full

Supported pause frame use: No

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: Half

Port: Twisted Pair

PHYAD: 0

Transceiver: internal

Auto-negotiation: on

MDI-X: off (auto)

Supports Wake-on: d

Wake-on: d

Current message level: 0x00000007 (7)

drv probe link

Link detected: yes

root@x4100-9098~#mii-tool

No interface specified

usage: mii-tool [-VvRrwl] [-A media,... | -F media] ...

-V, --version               display version information

-v, --verbose               more verbose output

-R, --reset                 reset MII to poweron state

-r, --restart               restart autonegotiation

-w, --watch                 monitor for link status changes

-l, --log                   with -w, write events to syslog

-A, --advertise=media,...   advertise only specified media

-F, --force=media           force specified media technology

media: 100baseT4, 100baseTx-FD, 100baseTx-HD, 10baseT-FD, 10baseT-HD,

(to advertise both HD and FD) 100baseTx, 10baseT

root@x4100-9098~#

root@x4100-9098~#mii-tool eth3

eth3: negotiated 100baseTx-HD, link ok

root@x4100-9098~#mii-tool eth2

eth2: no link

root@x4100-9098~#mii-tool eth1

eth1: negotiated 100baseTx-HD, link ok

root@x4100-9098~#mii-tool eth0

eth0: negotiated 100baseTx-FD flow-control, link ok

重点:

1) mii-tool和 ethtool 工具

2) 如何看状态

相关资料:

http://waibaohuo.blog.163.com/blog/static/129005368201041863046769/

http://blog.itpub.net/27042095/viewspace-732946/

http://blog.chinaunix.net/uid-24830931-id-3345567.html

阅读(1111) | 评论(0) | 转发(0) |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值