歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu SIOCADDRT: no such process

Ubuntu SIOCADDRT: no such process

日期:2017/2/28 15:45:23   编辑:Linux教程

配置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. # The loopback network interface
  5. auto lo
  6. iface lo inet loopback
  7. # The primary network interface
  8. auto eth0
  9. iface eth0 inet static
  10. address 1.1.1.1
  11. metmask 255.0.0.0
  12. gateway 1.1.1.254
  13. dns-nameservers 1.1.1.254

輸入的時候,可能太快了,把netmask寫成了metmask,小記一下!

Copyright © Linux教程網 All Rights Reserved