cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
33113
Views
0
Helpful
8
Replies

ip helper-address with two dhcp server

ekhoo
Level 1
Level 1

I have two dhcp server running on vlan1, which serving our workstation on vlan2. 10.10.10.51 is our primary and 10.10.10.52 is secondary server.

My question is:

- Which server would my workstation get the dhcp from?

- If the primary server is down, could I reach the second dhcp server? and if the primary server back online.. Which server would be serving our dhcp client?

!

interface Vlan1

ip address 10.10.10.1 255.255.255.0

no ip redirects

ip directed-broadcast

!

interface Vlan2

ip address 10.10.20.1 255.255.255.0

ip helper-address 10.10.10.51

ip helper-address 10.10.10.52

no ip redirects

ip directed-broadcast

!

!

8 Replies 8

Hello,

your workstation would get the DHCP address from the first available IP address configured with the ip-helper command, which is usually the first address in the list, unless that server is, for some reason, not responding in a timely manner. So in your configuration:

ip helper-address 10.10.10.51

ip helper-address 10.10.10.52

the server with IP address 10.10.10.51 would be the first to respond, if it is unavailabe/offline, your clients would get their address from 10.10.10.52.

HTH,

Georg

Hi,

I don't agree.

AFAIK, using two ip helper-address entries in a router config will cause the dhcp request being sent to BOTH dhcp servers.

So both the primary and secondary dhcp server will send a dhcp offer to the workstation. The workstation will choose one of the offers and confirm it to the server.

So ip helper-address command will not help you to choose if dhcp server is primary or secondary.

You can either use different dynamic address pools on primary and secondary dhcp server (and the same static entries) or to arrange some kind of dhcp server failover:

See

http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_DHCP_imp_ClusteringSupport.htm

There is also RFC 2131 describing DHCP Failover Protocol.

Regards,

Milan

Milan,

Thanks.. I known the dynamic address pools can be implement on this situation but it wasn't the best solution to solve our problem at the moment.

So if you are using only static MAC - IP address assignments, you might even use two dhcp servers without any failover protocol.

If you are able to handle the same MAC-IP tables on both servers, it doesn't matter which server responses to the workstation as first, in real.

But this solution is NOT recommended, I'm afraid.

You could get into trouble in a case when one server crashes and starts to send NAK to all dhcp clients, e.g. (I noticed this situation two years ago.)

Regards,

Milan

Hello all,

my answer was based on the unavailability of one server, I guess obviously if one is offline, the other will dish out the address...

I debugged UDP with two ip helper addresses, and indeed, Milan is right, the BOOTP requests go to both servers. But the client can only accept one address anyway, and that is the first one that is assigned, usually from the first available server...

Hope that makes sense,

Georg

Georg,

I have the same opinion on this. However, i have no black and white to proof this concept.

Have anyone came across this problems before?

In Microsoft land and general Networking it will accept the first response. Which is why two servers is a bad idea unless of course you can set up different scopes or pools.

Rudy R.
Level 1
Level 1

We use isc-dhcpd for our DHCP server here at MonkeyBrains.  Some tips:

  http://www.madboa.com/geek/dhcp-failover/

Also, the dhcpd.conf man page is quite uesful:

  http://www.freebsd.org/cgi/man.cgi?query=dhcpd.conf&manpath=FreeBSD+9.0-RELEASE+and+Ports

or

  http://linux.die.net/man/5/dhcpd.conf

Those resources will help you understand what happens when with a master/slave DHCPd setup.