ifup / ifdown eth0 / eno1 reports unknown interface when it exists!

li {list-style-type:decimal;}.wiz-editor-body ol.wiz-list-level2 > li {list-style-type:lower-latin;}.wiz-editor-body ol.wiz-list-level3 > li {list-style-type:lower-roman;}.wiz-editor-body blockquote {padding: 0 12px;}.wiz-editor-body blockquote > :first-child {margin-top:0;}.wiz-editor-body blockquote > :last-child {margin-bottom:0;}.wiz-editor-body img {border:0;max-width:100%;height:auto !important;margin:2px 0;}.wiz-editor-body table {border-collapse:collapse;border:1px solid #bbbbbb;}.wiz-editor-body td,.wiz-editor-body th {padding:4px 8px;border-collapse:collapse;border:1px solid #bbbbbb;min-height:28px;word-break:break-word;box-sizing: border-box;}.wiz-hide {display:none !important;}
-->

try use :

sudo ifconfig eth0 up/down 

reseaon:

sudo ifdown eno1 or sudo ifup eno1, will not work because eno1 is not explicitly defined inside /etc/network/interfaces file.

So ifup | ifdown | ifquery family of functions is pretty unaware of what is inside the system unless this is written inside /etc/network/interfaces, but they could be since they all depend internally on ip¹ command.

It is more secure to use the sudo ifconfig eno1 down or sudo ifconfig eno1 up.

Note: There are couple things sudo ifconfig eno1 down or sudo ifconfig eno1 up will not do comparing to sudo ifdown eno1 and sudo ifup eno1ifup and ifdown will keep the state of interfaces inside /run/network/ifstate so ifstate command can tell you the state of the interface. And one another thing, if you ifup or ifdown the interface, the scripts inside /etc/network/if-*.d will run (if-down.d if-post-down.d if-pre-up.d if-up.d)

来源: https://askubuntu.com/questions/870447/ifdown-interface-reports-unknown-interface-when-it-exists

原文地址:https://www.cnblogs.com/jins-note/p/10153153.html

时间: 2024-08-04 16:42:57

ifup / ifdown eth0 / eno1 reports unknown interface when it exists!的相关文章

VM克隆之后启动eth0找不到eth0:unknown interface:no such device

问题出现:VMware 克隆之后,ifconfig命令执行找不到eth0,报错 eth0:unknown interface:no such device 是因为/etc/sysconf/network-scripts/ifcfg-eth0配置复制过来和虚拟主机的网卡Mac等信息不匹配 解决方法: 删除/etc/udev/rules.d/70-persistent-net.rules,重启一下就可以重新生成网卡信息 # rm -rf /etc/udev/rules.d/70-persistent

Ignoring unknown interface ethx=ethx

记录 今天使用了公司的云进行试验,结果发现BT5没有网卡,首先我是这样解决的 现象: /etc/init.d/networking restart 重启网卡 ifconfig 查看网卡,并没有网卡起来 ifconfig -a 查看所有的网卡,发现有一个eth4 ifup eth4 启用eth4这块网卡,提示失败(Ignoring unknown interface eth4=eth4) 解决: 首先是查看/etc/udev/rules.d/70-persistent-net.rules文件里面记

ifup,ifdown命令详解

基础命令学习目录首页 原文链接:https://www.cnblogs.com/jing99/p/7881779.html ifup命令网络配置 ifup命令用于激活指定的网络接口.ifdown命令用于禁用指定的网络接口. 实时地手动修改一些网络接口参数,可以利用ifconfig来实现,如果是要直接以配置文件,亦即是在 /etc/sysconfig/network-scripts里面的ifcfg-ethx等文件的设置参数来启动的话,那就得要通过ifdown或ifup来实现了. 语法 ifup(参

eth0: ERROR while getting interface flags: No such device 没有eth0 有其他的eth

# sudo ifconfig eth0 down eth0: ERROR while getting interface flags: No such device 然后根据这个错误,查看当前的IP信息,结果如下: # ifconfig -a         结果没有发现eth0,倒是出现了eth4.顿时明白了出错的原因,是因为在用命令关闭eth0服务的时候,没有找到相关的设备.根据这些关键字,上网查找了相关的解决方案,而这里的解决方案是:移动/删除rules文件. 这是因为(Ubuntu)系

恐怖的ifdown eth0;0

下午闲的蛋疼,随手给测试机配了个浮动地址eth0:0. ping了下OK,内网访问没问题. 准备收手的时候,瞄了一眼ifcfg-eth0:0的配置,发现广播地址BROADCAST写成了BOADCAST,我这么追求完美的男人怎么能容忍这个. 果断,vi打开再加个字母.潇洒地wq保存,准备重启接口刷新配置. 键盘飞起,输入那个自己无比熟悉的指令:ifdown eth0;0 桥豆嘛得!!!总感觉有什么不对劲的样子?!!!啊~!!! 为什么不是ifdown eth0:0?那个熟悉的冒号在哪?为什么是个分

ifdown eth0 && idup eth0 ifdown --exclude=l0 -a && ifup --exclude=lo -a

linux ifconfig命令配置ip地址

Linux下网卡命名规律:eth0,eth1.第一块以太网卡,第二块. lo为环回接口,它的IP地址固定为127.0.0.1,掩码8位.它代表你的机器本身. ifconfig [Interface] 是查看网卡的信息 ,如果不加参数查看的是所有的网卡信息 加上参数eth0的话是查看eth0网卡的信息 网卡信息的一些解释: 第一行:连接类型:Ethernet(以太网)HWaddr(硬件mac地址) 第二三行:网卡的IP地址.子网.掩码 第四行:UP(代表网卡开启状态)RUNNING(代表网卡的网线

Ubuntu重启网卡的三种方法

一.network利用root帐户# service network restart 或者/etc/init.d/networking restart 二.ifdown/ifup# ifdown eth0# ifup eth0 三.ifconfig# ifconfig eth0 down# ifconfig eth0 up Ubuntu14.04修改配置,重启网卡没有生效,出现如下问题: service  networking restart //重启网络服务stop: Job failed w

Docker深入浅出系列 | 单节点多容器网络通信

目录 教程目标 准备工作 带着问题开车 同一主机两个容器如何相互通信? 怎么从服务器外访问容器 Docker的三种网络模式是什么 Docker网络通信原理 计算机网络模型回顾 Linux中的网卡 查看网卡接口信息 网卡的操作 ip a核心信息详解 网卡的配置文件 修改网卡配置,绑定一个新ip地址 网卡的重启与启动 Linux网络虚拟化技术 创建虚拟网络环境 连通两个Network Namespace 通过Bridege建立多个namesapce通信 Docker容器的网络 bridge网络模式实