Networking :: DHCP Tip



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?

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.
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.


original here.