ubuntu Ignoring unknown interface eth0=eth0
来源:http://blog.sina.com.cn/s/blog_6fd605b50100qzvv.html
在设置静态IP的时候 不能保存
/etc/init.d/networking restart
提示
Ignoring unknown interface eth0=eth0. SIOCSIFADDR: No such device
ifconfig -a eth0是存在的
1.首先删除
70-persistent-net.rules 文件
该文件在 /etc/udev/rules.d/ 目录下
rm -f /etc/udev/rules.d/70-persistent-net.rules
之后重启让系统重新生成eth0配置文件
reboot
之后发现系统又自动获取IP了
2.手动修改 70-persistent-net.rules 文件
vi /etc/udev/rules.d/70-persistent-net.rules
把eth0改为eth1
3.修改 /etc/network/interfaces 文件
vi /etc/network/interfaces
内容如下
auto eth1 //自动启用eth1
iface eth1 inet static //eth1为静态IP
address 192.168.0.16 //ip地址
netmask 255.255.255.0 //子网掩码
gateway 192.168.0.1 //网关
4.修改/etc/resolv.conf
vi /etc/resolv.conf
修改DNS 内容如下
# Generated by NetworkManager
nameserver 219.149.194.55 //电信DNS
nameserver 8.8.8.8 //谷歌提供的免费DNS解析
ubuntu12.04 版这个方法行不通了,因为 resolv.conf 每次重新启动以后会覆盖以前的文件,提示不让修改。
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN因此需要在
/etc/network/interfaces 这个文件里最后一行加上
nameserver 219.149.194.55 //电信DNS nameserver 8.8.8.8 //谷歌提供的免费DNS解析
5.保存之后重启networking服务
/etc/init.d/networking restart
OK 可以上网了。
相关推荐
在linux中,修改MAC地址 # ifdown eth0 # ifconfig eth0 hw ether 12:34:56:78:90:12 (修改的MAC地址跟原来的地址不同) # ifup eth0 (修改成功) 后,用# ifconfig 查看,MAC地址改变了,但之后输入#service...
资源分类:Python库 所属语言:Python 使用前提:需要解压 资源全名:colcon_package_selection-0.2.6-py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
[ERROR] [1584194344.911065094]: Ignoring transform for child_frame_id “left_wheel_link” from authority “unknown_publisher” because of a nan value in the transform (-nan -nan -nan) (-nan -nan -nan ...
Ignoring unknown parameter "display charset" New SMB password: Retype new SMB password: Added user rootroot. cm04@cm-System-Product-Name:/usr/local/samba-4.1.6/etc$ cm04@cm-System-Product-Name:/usr/...
GNU C (Ubuntu/Linaro 4.7.2-2ubuntu1) version 4.7.2 (x86_64-linux-gnu) compiled by GNU C version 4.7.2, GMP version 5.0.2, MPFR version 3.1.0-p3, MPC version 0.9 GGC heuristics: --param ggc-min-expand...
Linux中chroot的使用.pdf
信息安全_数据安全_The_Advantage_of_Ignoring_the_Lo web安全 安全实践 金融安全 安全管理 安全开发
rsyslog安装包,用于linux上日志管理系统
% NaN表示无意义的数,比始0/0 D = repmat(NaN,n,k); % point-to-cluster distances 点到聚类的距离 Del = repmat(NaN,n,k); % reassignment criterion 重新赋值准则 m = zeros(k,1); % m是一个临时变量,存储的大小...
今天小编就为大家分享一篇关于Android开发导入项目报错Ignoring InnerClasses attribute for an anonymous inner class的解决办法,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随...
安装 npm install ignoring用法该工具使用起来非常简单。 您可以使用ignoring或gitignore 。 对于这些示例,我将使用gitignore 。创建一个gitignore 在当前目录中创建.gitignore文件 $ gitignore create创建全局...
I0701 12:37:56.115556 32319 solver.cpp:332] Iteration 0, loss = 0.898412 I0701 12:37:56.115597 32319 solver.cpp:433] Iteration 0, Testing net (#0) I0701 12:37:56.130832 32319 net.cpp:693] Ignoring ...
音乐分级后端 音乐分级应用程序的后端 本地运行 (如果是macOS) brew install pyenv (否则您需要自行安装和... Ignoring blinker: markers 'extra == "flask"' don't match your environment Looking in indexes:
创建烧瓶应用 用于创建烧瓶应用程序的应用程序 本地运行 (如果是macOS) brew install pyenv (否则您需要... Ignoring blinker: markers 'extra == "flask"' don't match your environment Looking in indexes: http
自述文件 该自述文件通常会记录启动和运行应用程序所需的所有步骤。 您可能要讲的内容: Ruby版本系统依赖配置数据库创建数据库初始化如何运行测试套件服务(作业队列,缓存服务器,搜索引擎等) 部署说明… 如果您...
the result, or ignoring it. The latter two methods return the number of elements in the upcoming container, so that each element in an array, or key-value pair in a map, can be unpacked or skipped ...
代码 文本 原因 E1000 Failsafe voltage error. Contact support.(故障保护电压错误。请联络支持人员。) 查看系统事件记录以了解严重故障事件。 E1114 Ambient Temp exceeds allowed range.(环境温度超过了许可...
C:\Users\86135>pip install pyqt5 Collecting pyqt5 Downloading ...| | 204kB 6.2kB/s eta 2:22:38ERR
*) fix bad block count not to increase on Samsung K9F1208U0C nand; *) snmp - fix dhcp lease table, snmp reported an incorrect information when a static lease had configured different address than ...
要求经过测试: Ubuntu 16.04 LTS Ubuntu 18.04 LTS Ubuntu 20.04 LTS 应该与: 所有Ubuntu 所有Debian角色变量 ag_timezone : A timezone (e.g Etc/UTC)依存关系没有任何。剧本范例 - hosts : servers roles : - { ...