Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2395966
  • 博文数量: 328
  • 博客积分: 4302
  • 博客等级: 上校
  • 技术积分: 5486
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-01 11:14
个人简介

悲剧,绝对的悲剧,悲剧中的悲剧。

文章分类

全部博文(328)

文章存档

2017年(6)

2016年(18)

2015年(28)

2014年(73)

2013年(62)

2012年(58)

2011年(55)

2010年(28)

分类: LINUX

2014-10-15 16:00:24

如果一个服务器有多个网口,只有某些连接到了网络,这时如何确定哪些连接了那些没有连接呢?可以有如下的几种方法。
首先,都要把网口启动“ifconfig eth3 up”


1. 利用ifconfig命令


从命令的输出可以看出,没有连接的端口不带有"RUNNING"信息
  1. # ifconfig -a
  2. ...
  3. eth4 Link encap:Ethernet HWaddr 90:E2:BA:15:29:A4
  4.           UP BROADCAST MULTICAST MTU:1500 Metric:1
  5.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  6.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  7.           collisions:0 txqueuelen:1000
  8.           RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

  9. eth5 Link encap:Ethernet HWaddr 90:E2:BA:15:29:A5
  10.           UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  11.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  12.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  13.           collisions:0 txqueuelen:1000
  14.           RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


2. 利用mii-tool


  1. [root@localhost root]# mii-tool
  2. eth0: negotiated 100baseTx-FD, link ok
  3. eth1: no link


3. 利用ethtool


  1. # ethtool eth4 | grep Link
  2.         Link detected: no
阅读(2058) | 评论(0) | 转发(0) |
0

上一篇:三层交换机基本配置

下一篇:Flex and Bison

给主人留下些什么吧!~~