树莓派(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

posted @ 2018-02-07 14:58  EasonJim  阅读(5811)  评论(0编辑  收藏  举报