manish.karnik
Posts: 1
Joined: Sat Sep 02, 2017 11:45 am

Dynamic AND static IP for Pi Zero W

Thu Sep 21, 2017 6:46 am

Hello friends,

Is it all possible to have/assign a dynamic AND a static IP address to a Pi Zero W ?
If yes the how ?

Thanks

Manish

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Dynamic AND static IP for Pi Zero W

Thu Sep 21, 2017 7:07 am

do it on your DHCP server [i.e. router] set it to be a static value at home [on the router] and then it will use whatever when you move to another location as long as that other router will give you an IP
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: Dynamic AND static IP for Pi Zero W

Thu Sep 21, 2017 7:32 am

An easy way to have 2 IP addresses is to have your router assign a DHCP adress as usual (wlan0 or eth0) and then set an IP address (with ifconfig) for wlan0:1 or eth0:1. If you do it that way, make sure you stay away from the pool of DHCP addresses that can be assigned, otherwise you may end up with a network nightmare... :o
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

Return to “Beginners”