DHCP TipForum: Networking Topic: DHCP Tip started by: dsteflik Posted by dsteflik on June 26 2008,20:12
I'm running DSL on an old Toshiba 3015 with DSL installed on a compact flash card instead of a Hard Drive. I'm using a Netgear WG511T pcmcia card. To bring up the wireless at home on my linksys router I would normally run a short script that would get a static IP from the router then do an ifconfig ath0 up and it would always work.The other night at the local Linux User's Group meeting I couldn't get an IP using ifconfig and iwconfig , the ath0 interface was recognized but there wasn't anyway I could get an IP. After getting home I did some googleing and found that DSL uses "pump" as its dhcp client and to get an IP all I needed to do was (at a command line type : sudo pump -i ath0 as soon as i did that pump went and retrieved all of the dhcp info and the wireless came up nice and clean. Dick Steflik. [I][B] Posted by jpeters on June 28 2008,06:19
I have to do the same for my ath0 cards to work.
Posted by vendion on June 30 2008,16:10
Since this is a DHCPtip thread, can someone tell me how to set DSL's DHCP client (said "pump") to keep the same local IP. I'm trying to get a server set up on Damn Small Linux, mostly because this is the only Linux distro that I was able to get to boot correctly, and the system gets a new IP anywhere from a couple of hours to a day. For an example two days ago this machine had the IP of 192.168.2.19, yesterday it had the IP of 192.168.2.20, and today it went through .21-.23 in a matter of hours all with no reboot or shutdown. I know its not just my router's fault, it keeps the lease on IPs for a day and it should recognize the MAC address of this computer and see that it is already given an IP so it should not assign a new one but that is not happening.
Posted by chaostic on June 30 2008,16:34
Try "pump --help" for all options, mainly "-l" or "-L". As a side note, the pump on my system (3.4.11) seems to renew ip every 10 hours, when my router is set for 10 days, 30 seconds long leases. Ip stays the same though (Hostname does get changed at 10 hours if the hostname has changed though). Posted by vendion on July 02 2008,01: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.
Posted by chaostic on July 02 2008,02: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 )) 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? Posted by vendion on July 03 2008,15:36
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.
Posted by vendion on July 03 2008,15:43
Thanks I'll put that to use and see if that fixed the problem. |