Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ 1 [2] >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: DHCP Tip, How to automatically get an IP< Next Oldest | Next Newest >
chaostic Offline





Group: Members
Posts: 328
Joined: Mar. 2005
Posted: July 02 2008,02:03 QUOTE

Quote (vendion @ July 01 2008,21:44)
That is only for hours and seconds, is that the best that pump can do?  I guess I could figure the exact number of hours there is in a year and lease the IP for that, but that is just kind of a weird thing to do.

You can use bash to do the math for you.

days:
pump -i [interface] -l $(( days * 24 ))

weeks:
pump -i [interface] -l $(( days * 7 * 24 ))

months (30 days)
pump -i [interface] -l $(( days * 30 * 24 ))

And pump is an old redhat dhcp client daemon. It is neither full featured, nor would there be a reason for someone to use a dhcp server when they want year long dhcp address.

The whole idea that behind dhcp is that you have a group of changing computers and limited ips. For a small set of home computers, dhcp is just laziness. It's a super lazy convenience.

Your real problem, is that your dhcp server is for some reason giving you a different ip on renewals. By any chance, is the dhcp license expiring before renewals? Is the same thing happening for any other computer on your network? I have about 6 on my wireless and 2 wired computers, and depending on which one is off while another turns on by day 10, the ips would change around. Kinda annoying, sometimes, but I like not having to worry about static ips. (That, and by now, every laptop and desktop in my house have their license expire on a different day 10).

Could you just set up a static ip address and be done with it?
Back to top
Profile PM 
vendion Offline





Group: Members
Posts: 21
Joined: Nov. 2007
Posted: July 03 2008,15:36 QUOTE

The dhcp server on my router keeps the IP leases for one day then expires.  This does not explain the new IPs every couple of hours, this is just weird.  My other computers on my network, 1 wired, 3 wireless, does not do this once the lease is up they renew and keep the IP that they had.  The only time they get the new IP is if they are off for one day or more.  I'm also assuming that because this is the DHCP client that is constantly requesting a new IP using "ifup" won't make a difference because even with ifup I would have to go through the DHCP client.

--------------
http://img.photobucket.com/albums/v640/vendion/435862.png
Back to top
Profile PM 
vendion Offline





Group: Members
Posts: 21
Joined: Nov. 2007
Posted: July 03 2008,15:43 QUOTE

Quote (chaostic @ July 01 2008,21:03)
You can use bash to do the math for you.

days:
pump -i [interface] -l $(( days * 24 ))

weeks:
pump -i [interface] -l $(( days * 7 * 24 ))

months (30 days)
pump -i [interface] -l $(( days * 30 * 24 ))

Thanks I'll put that to use and see if that fixed the problem.


--------------
http://img.photobucket.com/albums/v640/vendion/435862.png
Back to top
Profile PM 
7 replies since June 26 2008,20:12 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ 1 [2] >/
reply to topic new topic new poll
Quick Reply: DHCP Tip

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code