分类:

1) 通过mii-tool指令
       [root@localhost root]# mii-tool
        eth0: negotiated 100baseTx-FD, link ok
        eth1: no link
       或
       [root@localhost root]# mii-tool -v
        eth0: negotiated 100baseTx-FD, link ok
          product info: vendor 00:50:43, model 2 rev 3
          basic mode:   autonegotiation enabled
          basic status: autonegotiation complete, link ok
          capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
          advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
          link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
        eth1: no link
          product info: vendor 00:50:43, model 2 rev 3
          basic mode:   autonegotiation enabled
          basic status: no link
          capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
          advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
       或
      [root@localhost root]# mii-tool -w
       21:20:33 eth0: negotiated 100baseTx-FD, link ok
       21:20:33 eth1: no link

//mii-tool主要是用于配置网卡工作模式的指令,同时也可以进行查询、监控等工作!

2)
     [root@localhost /]# /etc/init.d/network status
      Configured devices:
      lo eth0 eth1
      Currently active devices:
      lo eth0
     等同于
     [root@localhost root]# service --status-all
      ............
      ............
      Configured devices:
      lo eth0 eth1
      Currently active devices:
      lo eth0
      ............
      ............
   3)ifconfig -a
    [root@localhost /]# ifconfig -a
    eth0 Link encap:Ethernet HWaddr 00:09:6B:09:08:FC
          inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
          inet6 addr: fe80::209:6bff:fe09:8fc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:106732953 errors:0 dropped:0 overruns:0 frame:0
          TX packets:104379788 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:2351331877 (2.1 GiB) TX bytes:391707945 (373.5 MiB)
          Base address:0x2500 Memory:fbfe0000-fc000000
   eth1   Link encap:Ethernet HWaddr 00:09:6B:09:08:FD
          BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
          Base address:0x2540 Memory:fbfc0000-fbfe0000

4)ethtool

#ethtool eth0
Settings for eth0:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes: 10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: g
        Wake-on: d
        Current message level: 0x000000ff (255)
        Link detected: yes

#ethtool eth1

Settings for eth1:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes: 10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: Unknown! (0)
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: g
        Wake-on: d
        Current message level: 0x000000ff (255)
        Link detected: no
从上面可以看出eth0 处于连接状态,eth1没有连接

查看Linux下网卡状态或 是否连接的更多相关文章

  1. 查看Linux下网卡状态或 是否连接(转)

      1) 通过mii-tool指令       [root@localhost root]# mii-tool        eth0: negotiated 100baseTx-FD, link o ...

  2. linux下网卡bonding配置(转)

    linux下网卡bonding配置   章节 bonding技术 centos7配置bonding centos6配置bonding 一.bonding技术 bonding(绑定)是一种linux系统 ...

  3. Linux下网卡混杂模式设置和取消

    工作中发现一个网卡工作状态不对了,查看了一下,发现这个网卡和正常工作的网卡  信息不一样,它显示的居然是混杂模式,而正常工作的是  running 模式 ,所以来了解下混杂模式怎么取消... 下文来自 ...

  4. linux下网卡bonding配置

    linux下网卡bonding配置   章节 bonding技术 centos7配置bonding centos6配置bonding 一.bonding技术 bonding(绑定)是一种linux系统 ...

  5. [转载]linux下网卡漂移导致网络不可用

    转自:https://blog.csdn.net/hyatsz/article/details/47690993 linux下网卡漂移导致网络不可用 2015年08月16日 00:48:50 hyat ...

  6. Linux 下网卡参数配置

    目录 Linux 下网卡参数配置 第一种:修改 interfaces 文件 网卡配置实例 回环参数配置 DHCP方式配置 静态 IP 地址分配 无线网卡配置 March 17, 2015 7:48 P ...

  7. 查看Linux下*.a库文件中文件、函数、变量

    查看Linux下*.a库文件中文件.函数.变量等情况在Linux 下经常需要链接一些 *.a的库文件,那怎么查看这些*.a 中包 含哪些文件.函数.变量: 1. 查看文件:ar -t xxx.a 2. ...

  8. Linux下 网卡测速

    参考: How do I verify the speed of my NIC? Linux下 网卡测速 命令: $ sudo ethtool eth0 Settings for eth0: Supp ...

  9. 查看Linux下系统资源占用常用命令

    一 top命令 1.作用top命令用来显示执行中的程序进程,使用权限是所有用户. 2.格式top [-] [d delay] [q] [c] [S] [s] [i] [n] 3.主要参数d:指定更新的 ...

随机推荐

  1. jQuery 验证实例(shopnc二次开发)

    shopnc 商家用户实现添加用户与前台用户分离, jQuery 验证实例 equalTo:等于 <div id="saleRefund" show_id="1&q ...

  2. 【ecos学习4】[转]ubuntu 11.04 tftp 设置

    安装 TFTP 服务 sudo apt-get install xinetdsudo apt-get install tftp-hpasudo apt-get install tftpd-hpa 修改 ...

  3. Windows -DOS 下Yii创建应用及出错处理

    Win7下,以管理员身份运行cmd.exe 本例是在wamp环境下:切换到d盘,再切换到framework目录.............1--C:\windows\system32>d: 2-- ...

  4. Learn LIBSVM---a practical Guide to SVM classification

    想学习一下SVM,所以找到了LIBSVM--A Library for Support Vector Machines,首先阅读了一下网站提供的A practical guide to SVM cla ...

  5. QWidget 键盘事件 焦点(源代码级别研究)

    在Qt中,键盘事件和QWidget的focus密不可分:一般来说,一个拥有焦点(focus)的QWidget或者grabKeyboard()的QWidget才可以接受键盘事件. 键盘事件派发给谁? 如 ...

  6. Centos安装webbench

    webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便. 1.适用系统:Linux 2.编译安装: 引用 wget htt ...

  7. poj 1149 PIGS_网络流

    #include<iostream> #include<queue> #include<cstdio> #include<cstring> using ...

  8. 十个JAVA程序员容易犯的错误

    十个JAVA程序员容易犯的错误 1. Array 转 ArrayList 一般开发者喜欢用: List<String> list = Arrays.asList(arr); Arrays. ...

  9. Android工程师面试准备知识点

    听+7哥说,把下面的全弄懂,面试必过,所以我就试着去把所有题目补充了一下,各位能耐的网友们,如果有吐槽或者补充的尽管给我留言,在这里谢过大家了. 1.   android的多线程如何通信 答:Andr ...

  10. Hadoop权威指南学习笔记二

    MapReduce简单介绍 声明:本文是本人基于Hadoop权威指南学习的一些个人理解和笔记,仅供学习參考,有什么不到之处还望指出,一起学习一起进步. 转载请注明:http://blog.csdn.n ...