Dealing with DHCP in scripts

Posted on
Mon Jul 23, 2012 1:44 pm
kd5crs11 offline
Posts: 108
Joined: Feb 09, 2009

Dealing with DHCP in scripts

So I'm using DHCP with my wireless lan. When a device leaves the lan, there is no guarantee it will get the same address next time it connects, right?

Thus, if I call out the IP address in my script, it may break when power goes out or other network changes.

So how do I refer to a IP device on my wireless lan such that the script can find the right device regardless of its IP address? I'm using Python if that helps.

Sorry if this is the wrong forum for the question.

Thanks.

Posted on
Mon Jul 23, 2012 1:54 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Dealing with DHCP in scripts

How about using DHCP with manual address? That is what I do with most of my hardware. I use DHCP for a range of addresses, but I manually specify addresses for most of my things when possible (Macs, laptops, iPhones, etc.). Depending on the hardware there is normally a DHCP with manual address option, or you can just use static address. Just make sure you use addresses outside of the range you have allocated for DHCP.

Image

Posted on
Mon Jul 23, 2012 1:59 pm
kd5crs11 offline
Posts: 108
Joined: Feb 09, 2009

Re: Dealing with DHCP in scripts

Ok, thanks. I'll look into that.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests