https://access.redhat.com/solutions/1465433

How to find out if the ethernet cable is plugged into the physical interface without bringing up an interface?

SOLUTION 已验证 - 已更新 2015年十一月26日17:18 -

English

环境

  • Red Hat Enterprise Linux

    • 6.x

问题

  • How to check if the ethernet cable is plugged into the physical interface without bringing up an interface?

决议

  • For checking the status of the ethernet cable use ip link command.

1) If the ethernet cable is connected, and it is up also then it will show in the ip link command. Check the output of eth0.

Raw

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 5000link/ether 00:16:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether 00:16:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

In this case, eth0 <BROADCAST,MULTICAST,UP,LOWER_UP> is connected , and the status of the ethernet cable is also Up "state UP qlen 5000".

2) If ethernet cable is connected, but it is down then check below output:

Raw

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 5000link/ether 00:16:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether 00:16:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

In this case, eth0 <NO-CARRIER,BROADCAST,MULTICAST,UP> is connected, but the status of the ethernet cable is down.

3) If ethernet cable is not connected,then check below output:

In this nothing will come.

Raw

# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000link/ether 00:16:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

How to find out if the ethernet cable is plugged into the physical interface without bringing up NIC相关推荐

  1. USB C应该简化我们的生活,而不是一团糟

    重点 (Top highlight) 调试器 (Debugger) Techies hailed USB-C as the future of cables when it hit the mains ...

  2. Demystifying Ethernet Types— Difference between Cat5e, Cat 6, and Cat7

    Demystifying Ethernet Types- Difference between Cat5e, Cat 6, and Cat7 ​ Ethernet represents the plu ...

  3. Power over Ethernet Switch - PoE 交换机

    Power over Ethernet Switch - PoE 交换机 For some NVR / IP camera setups, it may be necessary to use an ...

  4. 10G Ethernet Mac IP核

    目录 1. 10G以太网结构 1.1 以太网媒体接入控制器(MAC) 1.2 物理接口收发器(PHY) 2.1 IP核使用 2.2 example 代码说明 1. 10G以太网结构 一个完整的10G以 ...

  5. 今晚 8 点直播 | OpenCV 20 年,首款开源软硬一体的 OAK 套件来了!

    从 2000 年首个开源 OpenCV Alpha 版本,到不久前刚刚发布的 OpenCV 4.4,跨平台计算机视觉库 OpenCV 在不知不觉间已经走过了 20 个年头. 相信不少 IT.AI 的从 ...

  6. CCNA1 - Final Exam Answers (04/18/2008 10:30)

    1.Which physical network topology is easy to monitor and troubleshoot, easy to add new devices to as ...

  7. cisco网络故障处理手册

    故障处理方法   一.网络的复杂性 一般网络包括路由.拨号.交换.视频.WAN(ISDN.帧中继.ATM.-).LAN.VLAN.- 二.故障处理模型 1. 界定问题(Define the Probl ...

  8. 某网络专业人士笔记(超级珍藏)

    第1章 故障处理方法 一.网络的复杂性 一般网络包括路由.拨号.交换.视频.WAN(ISDN.帧中继.ATM.-).LAN.VLAN.- 二.故障处理模型 1. 界定问题(Define the Pro ...

  9. 鸟哥的Linux私房菜(服务器)- 第四章、连上 Internet

    第四章.连上 Internet 最近更新日期:2011/07/20 终于要来到修改 Linux 网络参数的章节了!在第二章的网络基础中, 我们知道主机要连上 Internet 需要一些正确的网络参数设 ...

最新文章

  1. 条款22: 尽量用“传引用”而不用“传值”
  2. 三分钟教会你搭建动态网络
  3. 风险管理、收尾管理和知识产品管理
  4. python详细安装步骤-Python的详细安装步骤
  5. javaScript——廖雪峰老师学习笔记(一)
  6. Spark系列-初体验(数据准备篇)
  7. 权重随机算法的java实现
  8. [转]Java总结篇系列:Java泛型
  9. Julia: fill, repeat, repmat
  10. 什么是NP完全问题?
  11. Google的Java常用类库 Guava资料
  12. 仿ios相机apk_icamera仿苹果安卓版-icamera仿苹果软件下载-多多root网
  13. 有道单词导入 大量有道单词 生词本 批量导入 添加 有道单词XML 背单词
  14. 使用递归函数输出斐波那契数列
  15. 电子病历模板编辑器_这几个邮件模板网站,帮助提升工作效率
  16. 【正则表达式】字符与运算符
  17. VBA之正则表达式(24)-- 字符串转数组
  18. 自定义控件 - 流式布局(CofferFlowLayout)
  19. 面试必问的 Java 字节流与字符流
  20. android HOME、back(按钮、事件)截取获得,综合解决方案和分析,包含android4.0系统

热门文章

  1. LeetCode 1184 公交站间的距离[数组] HERODING的LeetCode之路
  2. MQTT协议连接阿里云
  3. Z-index属性详解
  4. photoshop去除文字_如何在Photoshop中去除粉刺和其他瑕疵
  5. TextView组件,常用属性
  6. 还在手工制作APP规范文档?这款设计神器你不容错过
  7. 纯 CSS 创作一个表达怀念童年心情的条纹彩虹心特效...
  8. 号称年薪30万占比最多的专业,你知道是啥嘛?
  9. Nacos源码系列—关于服务注册的那些事
  10. 清华计算机系19级研究生状元,19级研究生录取数据曝光!考上的人都来自这些学校...