您好,登錄后才能下訂單哦!
這篇文章主要講解了“linux配置IP地址重啟網絡報錯RTNETLINK answers: File exists怎么辦”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“linux配置IP地址重啟網絡報錯RTNETLINK answers: File exists怎么辦”吧!
安裝操作系統時,沒有設置IP,安裝完成后,設置IP時重啟網絡報錯:
#service network restart
RTNETLINK answers: File exists
檢查發現起了 NetworkManager:
#chkconfig --list|grep -i manager
NetworkManager 0:off 1:ff 2:on 3:on 4:on 5:on 6:off
關閉NetworkManager即可:
#chkconfig NetworkManager off
#service NetworkManager stop
#service network restart
但是重啟網絡后發現沒有IP地址:
# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:07:e5:89 brd ff:ff:ff:ff:ff:ff
inet6 fe80::20c:29ff:fe07:e589/64 scope link
valid_lft forever preferred_lft forever
檢查發現是因為下面的IPADDR 和 NETMASK手工配置時寫成了小寫,無法識別到
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
ipaddr=192.168.1.11
netmask=255.255.255.0
改成大小就好了:
IPADDR=192.168.1.11
NETMASK=255.255.255.0
重啟網絡,識別到IP地址:
#service network restart
# ip ad
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:07:e5:89 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.11/24 brd 192.168.1.255 scope global eth0
inet6 fe80::20c:29ff:fe07:e589/64 scope link
valid_lft forever preferred_lft forever
感謝各位的閱讀,以上就是“linux配置IP地址重啟網絡報錯RTNETLINK answers: File exists怎么辦”的內容了,經過本文的學習后,相信大家對linux配置IP地址重啟網絡報錯RTNETLINK answers: File exists怎么辦這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。