Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
> Setting Up One Dhcp Server For, each subnet on WBEL 3.0
post Nov 11 2004, 08:00 AM
Post #1

Its GNU/

Group: Support Specialist
Posts: 1,439
Joined: 3-January 04
From: Germany
Member No.: 2,069

In this step-by-step guide I will show you how you can install a dhcp server for each subnet without having that ping-pong effect , that one dhcp server sends the cliend DHCPNACK and the other DHCPACK and causes delays from 5-30 even 60 seconds sometimes. I decieded to write this guide , since I think we have a problem regarding dhcp manuals, I was googling for 2 days and only found basic settings for dhcp servers, no tutorials or examples on how to set up a dhcp server for each subnet.

** This step-by-step guide though tested only on WBEL 3.0 should work without any problems with other distros using the latest stable dhcp server package

So here we go :

first let's take a look at our example network :

We have three subnets 192.168.0.x ; 192.168.1.x and 192.168.2.x
each of them located in the city 2 km (minimum) from each other.
They are connected together via wireless network to allow them connection to the internet.
The problem in this situation is , that wireless connection wont work sometimes due to really bad weather condition or electrical failure (they are really sensitive , even our current Pheenet wireless BRIDGE/ACCESPOINT's fail sometimes though very rare (and they cost around 200Eur here)). So putting up a DHCP server at the Gateway or at one of three sites is not reliable enough, what if for some reason one of the sites would fail at the wrong hour and a entire subnet would not be able to connect to their local server because they didn't get a valid ip address...well the boss would be in a very-very bad mood, so I can't allow this to happen.

So here are the example configuration files :

The first dhcp server will be responsible to subnet and will ignore (yes ignore, won't send DHCPNACK or anything at all back like no free lease etc...just ignore other clients, which is the right thing to do in this situation)

yum update
yum install dhcp

once dhcp is installed ...
touch /etc/dhcpd.conf
vi /etc/dhcpd.conf

and write the following into it :
ddns-update-style interim;
not authoritative;

subnet netmask {
default-lease-time 86400;
max-lease-time 86400;
option broadcast-address;
option routers;
option domain-name-servers;
option netbios-name-server; (aka WINS server)

host user1 {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address; (it's good to begin from 10 since some idiotic Wireless cards
default to smile.gif )


host usern {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address 192.168.1.n;
(I have 45 hosts defined like this in my config ... and it works okay)

/etc/init.d/dhcpd stop
/etc/init.d/dhcpd start

the second dhcp server will be responsible to and will ignore all the other clients

** use the same procedure as above to install the dhcp server and use the same configuration procedure, offcourse the subnet part will be different and all the clients as well

!!!DANGER!!! NEVER EVER use authoritative in these config files !!! NEVER EVER!
only use not authoritative at the top, that is all.

if you check your log files now you can see that on the dhcp server that is supposed to give out that specific ip address to that mac address (/var/log/messages)
DHCPDISCOVER from xx:xx:xx:xx:xx:xx via eth0
DHCPOFFER on to xx:xx:xx:xx:xx:xx via eth0
DHCPREQUEST for ( from xx:xx:xx:xx:xx:xx
DHCPACK on to xx:xx:xx:xx:xx:xx

while the dhcp server that ignored it show the following in it's log file :

DHCPDISCOVER from xx:xx:xx:xx:xx:xx via eth0: netowrk no free leases
DHCPREQUEST for ( from xx:xx:xx:xx:xx:xx via eth0: ignored (not authoritative)

note: sometimes the log files will show that you should set authoritative if it's authoritative for this and that...but it works...

Robert B

Robert Becskei
May the source be with us!
AMD X2-3800 @ 2400Mhz
2048MB DDR 400Mhz
DFI Lanparty UT4 NF4 ULTRA-D
GeForce 7800GT
Pioneer DVD-RW
17inch Samsung Syncmaster 757NF
WinXP Pro (SP2)/ CentOS 4.3
Go to the top of the page
+Quote Post

Posts in this topic

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 22nd July 2018 - 01:44 PM