樹莓派(Debian)系統設置了靜態IP之后還會獲取動態IP的問題解決(scope global secondary eth0)


解決方法:

1、配置好靜態IP在/etc/network/interface

2、關閉dhcp服務(不知道這個服務是干嘛的,明明是客戶端還需要這個)

sudo systemctl stop dhcpcd
sudo systemctl disable dhcpcd
sudo systemctl daemon-reload
sudo systemctl restart networking

如果此時中斷或掛起沒法動時,尤其是使用SSH登錄的,可以使用【~】+【.】+【Enter】退出。

 

參考:

https://raspberrypi.stackexchange.com/questions/13359/where-does-my-secondary-ip-come-from

https://raspberrypi.stackexchange.com/questions/32516/multiple-ip-addresses-being-assigned


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM