strange network

Simon Hobson dhcp1 at thehobsons.co.uk
Fri Mar 30 22:20:09 UTC 2007


Jose Amengual M. wrote:

>I have 10 gateways in the same subnet in my network like.
>
>Gw1 10.0.0.1
>Gw2 10.0.0.2
>Gwn 10.0.0.x
>Subnet mask 255.0.0.0
>
>  I will have like 5000 new clients behind a isc-dhcp, but each 
>actual gateway only support 512 clients simultaneously, for that 
>reason I need to make in any way that my DHCP server send to the 
>client different gateways address for any new connection like round 
>robin load balancing.

Put your address ranges into different groups like this :

subnet 10.0.0.0 subnet-mask 255.0.0.0 {
   pool {
     range 10.0.2.1 10.0.2.254;
     range 10.0.3.1 10.0.3.254;
     option routers 10.0.0.1;
   }
   pool {
     range 10.0.4.1 10.0.4.254;
     range 10.0.5.1 10.0.5.254;
     option routers 10.0.0.2;
   }
   pool {
     range 10.0.6.1 10.0.6.254;
     range 10.0.7.1 10.0.6.254;
     option routers 10.0.0.3;
   }
  ...
}


This way, there are only 510 addresses available in each pool, so you 
cannot have too many clients using one gateway. You will find that 
initially clients will get addresses starting with the highest 
available address - and thus the clients will not be evenly spread 
across the gateways. With enough clients, enough churn, and over 
time, the clients will become more evenly spread.

If you need to approximate some load balance, you can force clients 
to use the lower addresses first by restricting the higher addresses 
from being used - just add the ranges to the config as needed. Eg, in 
the above config snippet, add only the first pool, then when it is 
(say) half used, add the second pool. When that is half used, add the 
third pool, and so on.


More information about the dhcp-users mailing list