Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Networking > Speed Up DHCP Server

Forgot Password?
 Linux Networking   Hardware/Software related, Modems, Internet connection sharing, IPTables etc.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 2 Weeks Ago   #1 (permalink)
Just Joined!
 
Join Date: Nov 2009
Posts: 3
Speed Up DHCP Server

I am using IPCOP, which I believe is based upon ubuntu, and running it on a 500MHz appliance, turning it into a router. When I perform an ipconfig /renew from my Windows PC, it takes about four seconds to get the IP address. I need this to be faster, preferably less than one second. How can this be done? I would think the DHCP server should be able to pick an IP address and send it to the client within a few milliseconds.
jim5121111 is offline  


Reply With Quote
Old 2 Weeks Ago   #2 (permalink)
Just Joined!
 
mrrangerman's Avatar
 
Join Date: Jul 2008
Posts: 27
Just what makes you think this is a linux problem?

I just run a test on my system, ipconfig /release on my windows system then ipconfig /renew right at 4sec from the time I pressed enter to the listing of the ip. My dhcp server is on a pIII running smoothwall. I guess I just don't understand what the big deal is having to wait 4sec. Why do you need to run ipconfig /renew on your windows system in the first place? Doesn't your windows system retain an ip address? If that's the case I'd be looking into that problem.
mrrangerman is offline   Reply With Quote
Old 2 Weeks Ago   #3 (permalink)
Just Joined!
 
Join Date: Nov 2009
Posts: 3
4 seconds is a big deal because I need the linux IPCOP appliance DHCP server to be faster than the DHCP servers in standard routers.

Because you asked, here is the background.

For several people, I am setting up a small appliance that has two ethernet ports and running IPCOP. This appliance is connected between the modem and router. On the router, it will be connected to one of the four LAN ports, so the router is acting like a network switch and the appliance running IPCOP will control the routing. However, because the routers also have DHCP servers, there could be contention with having two DHCP servers on the network. What I have found is that it is ok to have two DHCP servers on a network. When the client requests and address, both DHCP servers will respond back with an address, but the client will receive the first address received, and ignore the address sent by the slower DHCP server. This is how it is working on my network at home where I have two DHCP servers running, and everything works fine because the IPCOP appliance happens to be faster in this instance. However, there are many other routers out there, some of which could have faster DHCP servers.

I want this to be as simple as possible for people to set up. I could have them manually turn off the DHCP servers in their routers, but many of them are not computer savvy and will not know how to change the configuration of their router and would likely get frustrated if I supply instructions. It would be much simpler to just ensure the IPCOP appliance DHCP server adequately fast.

A bit long winded, but there is the background.
jim5121111 is offline   Reply With Quote
Old 2 Weeks Ago   #4 (permalink)
Linux Engineer
 
Join Date: Nov 2007
Posts: 1,135
Quote:
Originally Posted by jim5121111 View Post
What I have found is that it is ok to have two DHCP servers on a network.
No, this is a horrible idea. What about longer network cables or some other interference that affects who responds to the DHCP request first? You are basing your design on assumptions outside your control = guaranteed failure.
HROAdmin26 is offline   Reply With Quote
Old 2 Weeks Ago   #5 (permalink)
Linux Newbie
 
Join Date: Sep 2004
Location: UK
Posts: 114
If the router is acting as a switch? Why not just turn off the DHCP server on the router?

Assuming this is what you mean?
Code:
Modem  ---- IPCOP ---- Router (as switch)
                             |
                             |-- WS1
                             |-- WS2
__________________
In a world without walls and fences, who needs Windows and Gates?
blinky is offline   Reply With Quote
Old 2 Weeks Ago   #6 (permalink)
Linux Engineer
 
Join Date: Nov 2007
Posts: 1,135
Quote:
Originally Posted by blinky View Post
If the router is acting as a switch? Why not just turn off the DHCP server on the router?

Assuming this is what you mean?
Code:
Modem  ---- IPCOP ---- Router (as switch)
                             |
                             |-- WS1
                             |-- WS2
Seriously?

Quote:
I want this to be as simple as possible for people to set up. I could have them manually turn off the DHCP servers in their routers, but many of them are not computer savvy and will not know how to change the configuration of their router and would likely get frustrated if I supply instructions.
HROAdmin26 is offline   Reply With Quote
Old 2 Weeks Ago   #7 (permalink)
Linux Newbie
 
Join Date: Sep 2004
Location: UK
Posts: 114
Quote:
Originally Posted by HROAdmin26 View Post
Seriously?
I'm serious, the simplest solution (technology wise) probably the best.

Given a choice between finding/coding a super duper fast dhcp server to ensure it always serve's the request first or turn off the DHCP function on the router?

I'd pick turning off the routers DHCP function every time or alternatively replace the router with a 5/8 port unmanaged switch (approx $ 10-15 USD).
__________________
In a world without walls and fences, who needs Windows and Gates?
blinky is offline   Reply With Quote
Old 2 Weeks Ago   #8 (permalink)
Linux Engineer
 
Join Date: Nov 2007
Posts: 1,135
Quote:
Originally Posted by blinky View Post
I'm serious, the simplest solution (technology wise) probably the best.

Given a choice between finding/coding a super duper fast dhcp server to ensure it always serve's the request first or turn off the DHCP function on the router?

I'd pick turning off the routers DHCP function every time or alternatively replace the router with a 5/8 port unmanaged switch (approx $ 10-15 USD).
Did you MISS the part where the OP *already said* he is aware that he can disable the DHCP server but doesn't want to? Did you *read* the OP's post?

Yes, if he's going to add a DHCP server, he should disable the existing one. He is aware of this option.
HROAdmin26 is offline   Reply With Quote
Old 2 Weeks Ago   #9 (permalink)
Just Joined!
 
Join Date: Nov 2009
Posts: 3
Quote:
Originally Posted by HROAdmin26 View Post
What about longer network cables or some other interference
A slow 10MBs signal has a 25ns rise time, and a 1000 foot ethernet cable has a 1us transmission line delay time. These numbers are far less than four seconds. I am planning to give the DHCP server highest priority for the appliance CPU, so I doubt interference from other processes will be a problem. So far, everything has worked perfectly. The appliance CPU is 500MHz, which should be faster than standard routers. I am still curious as to why it takes four seconds to obtain an IP address.

Most people have never configured a router, so it is better that I not have to teach them. Connect the cable and you're done.
jim5121111 is offline   Reply With Quote
Old 2 Weeks Ago   #10 (permalink)
Linux Engineer
 
Join Date: Nov 2007
Posts: 1,135
Quote:
Originally Posted by jim5121111 View Post
A slow 10MBs signal has a 25ns rise time, and a 1000 foot ethernet cable has a 1us transmission line delay time. These numbers are far less than four seconds. I am planning to give the DHCP server highest priority for the appliance CPU, so I doubt interference from other processes will be a problem. So far, everything has worked perfectly. The appliance CPU is 500MHz, which should be faster than standard routers. I am still curious as to why it takes four seconds to obtain an IP address.

Most people have never configured a router, so it is better that I not have to teach them. Connect the cable and you're done.
I have been doing this for almost 15 years. There are any number of "anomalies" that *will* cause weird stuff to happen. You have NO WAY to guarantee this configuration. What happens if your DHCP service chokes and the "router" hands out 50 IP's before you realize it? That'll be a nice, manual cleanup process.

You are releasing/renewing an IP in Windows. Do you know what the TIME_WAIT state is for TCP sockets? And its default value? 240 seconds = 4 minutes. Why? Because of the inherent nature of an ethernet system. There is a time delay to ensure all of the packets "shake out" on the network. I work with *high traffic* networks/hosts where all 64K ports can get exhausted on one system. One possible workaround is to lower the TIME_WAIT - but going below 30-60 seconds is generally a bad idea.

This may be related to why Windows has a "delay" releasing and renewing its IP via DHCP. You may find more info in Windows forums/docs.

What if your "client" uses a different OS that doesn't act like Windows? Way too many ways for this not to work.

** And for the record, I have seen identical DHCP servers (Cisco devices) attached to the same switch via different length CAT5 cables. Sometimes a client will get a first response from one DHCP, and sometimes from the other. There are way too many factors inside the switch, inside the cable, and inside the DHCP device.

Last edited by HROAdmin26; 2 Weeks Ago at 11:48 PM..
HROAdmin26 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 03:55 PM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2