Posts: 61
Joined: Mon Jan 09, 2017 8:32 am

Set static IP for only a network

Sat Nov 10, 2018 5:26 pm

Can i set up a static IP for only a network?
Example: i configured some wi fi networks on my Raspberry. I wanna set a static IP on one of them only, not for all.
I have also the GUI version of Raspbian.
Is it possible?
Thanks a lot


Posts: 2067
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: Set static IP for only a network

Sat Nov 10, 2018 6:35 pm

Stand by for 97 folk saying do it in the router!

I’ve not done this but seen a package called connman on Ubuntu that handled it - maybe it’s in the repository?
Need Pi spray - these things are breeding in my house...

Posts: 377
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Set static IP for only a network

Tue Nov 13, 2018 7:48 am

dhcpcd can configure interfaces dependent on the host network. This uses the Address Resolution Protocol (ARP) to probe hosts based on MAC or IP address before attempting DHCP resolution.

Read the dhcpcd.conf man page for detail of arping and example

Return to “Raspbian”