Raspbian set a static ip

Raspbian static ip

Recently the start raspberry pie 4b, and more official tutorial installed Raspbian. Due to the direct connection via wifi, every ip jumping inconvenient, so they think of setting a static ip.

Since Raspbian itself is based on Debian Linux system, said the Internet to find information is to modify / etc / network / interfaces configuration file, add static ip settings.

For Debian is concerned, it is indeed the case. But the problem will find that there is a problem by modifying the interfaces static ip settings, even made a static ip, DHCP service still Raspberry Pi dynamic allocation ip and dns address automatically, the default gateway routing tables lead to a conflict, as well as manually given By default dns is not in force.

In fact, in the / etc / network / interfaces of the start of the comment, it was already told us to modify the static ip, need to modify /etc/dhcpcd.conf, namely DHCP configuration file.

1568468094938

sudo vim /etc/dhcpcd.conf

Locate the following line of code

1568468211662

Delete comment symbol # in front of the designated wireless interface wlan0

1568468551796

Note: Manual static ip be careful not to root router DHCP are automatically assigned an IP conflict

Guess you like

Origin www.cnblogs.com/brock0624/p/11520408.html