配置Ubuntu的网络时遇到了错误
发布时间:2016-09-10 01:45:10 所属栏目:Linux 来源:站长网
导读:配置Ubuntu的网络已经不是第一次了,今天遇到了个错误,以前从来没遇到过的,感觉很郁闷! 在使用/etc/init.d/networking restart的时候,出现了 RTNETLINK ans
配置Ubuntu的网络已经不是第一次了,今天遇到了个错误,以前从来没遇到过的,感觉很郁闷! 在使用/etc/init.d/networking restart的时候,出现了 RTNETLINK answers: File exists 表示很郁闷,然后ping了一下,提示网络不可达。看了一下路由表,发现没网关,最后使用命令加网关 # route add default gw 1.1.1.254 结果,又报错 SIOCADDRT: no such process. frustrating error. 网上找了一些资料,也没得到解决,最后自己发现,配置文件写错了。 root@node1:/etc/network# cat interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 1.1.1.1 metmask 255.0.0.0 gateway 1.1.1.254 dns-nameservers 1.1.1.254 输入的时候,可能太快了,把netmask写成了metmask,小记一下! URL:http://www.bianceng.cn/OS/Linux/201410/46051.htm (编辑:云计算网_宿迁站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
站长推荐