Find the answer to your Linux question:
Results 1 to 10 of 10
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    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.

  2. #2
    Just Joined! mrrangerman's Avatar
    Join Date
    Jul 2008
    Posts
    34
    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.

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

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,754
    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.

  5. #5
    Linux Newbie
    Join Date
    Sep 2004
    Location
    UK
    Posts
    161
    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?

  6. #6
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,754
    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?

    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.

  7. #7
    Linux Newbie
    Join Date
    Sep 2004
    Location
    UK
    Posts
    161
    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?

  8. #8
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,754
    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.

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

  10. #10
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,754
    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; 11-06-2009 at 10:48 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •