Ubuntu SIOCADDRT: no such process


配置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.

网上找了一些资料,也没得到解决,最后自己发现,配置文件写错了。

  1. root@node1:/etc/network# cat interfaces  
  2. # This file describes the network interfaces available on your system 
  3. # and how to activate them. For more information, see interfaces(5). 
  4.  
  5. # The loopback network interface 
  6. auto lo 
  7. iface lo inet loopback 
  8.  
  9. # The primary network interface 
  10. auto eth0 
  11. iface eth0 inet static 
  12. address 1.1.1.1 
  13. metmask 255.0.0.0 
  14. gateway 1.1.1.254 
  15. dns-nameservers 1.1.1.254 

输入的时候,可能太快了,把netmask写成了metmask,小记一下!

相关内容