DHCP Question

Unanswered Question
Aug 15th, 2008

Hi all

I've not had any formal Cisco training. What i know is through watching others and having a go myself.

I've an office where the guy who set it up is on vacation.

He has configured both core distribution switches with the same DHCP range.

So for arguments sake lets say our subnet is 192.168.0.0/24. This is on both switches.

Does this in reality work? We're getting strange problems which I think could be DHCP related.

In the past I've only ever seen config's where half the subnet is on one DHCP "server", the other half is on the backup server.

Thanks in advance

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Giuseppe Larosa Sat, 08/16/2008 - 10:10

Hello Martin,

we use the same setup in some remote sites.

The reason it works is that before assigning an IP address from the pool the DHCP server performs a ping test to see if somebody answers.

So even if the two devices don't exchange info about the leases assigned it should work.

When a DHCP client makes a request to get an IP address it is heard by both devices, the first one to answer is the server that provides the IP address.

You can get some log messages that say that there is a conflict on ip addresses but this should be solved.

Hope to help

Giuseppe

micahcox Mon, 08/18/2008 - 23:25

It is not correct to configure two IOS routers to serve addresses from the same address range on the same broadcast domain (VLAN). The IOS DHCP server does not support a failover protocol that shares DHCP bindings between servers. Therefore neither is aware of the assignment the other is making. Cisco provides the commands to define disjoint pools of addresses for each DHCP server to avoid assigning the same address twice. They have documentation on their web site describing the need for disjoint address pools.

You can get a race condition even if the routers ping before assignment. Consider that both ping, get no response, and both offer leases to two different clients using the same address simultaneously. You would have a duplicate IP address on the network.

Good catch.

u can config ip dhcp excluded-address for every swtich .

for example

ip dhcp excluded-address 192.168.0.1 192.168.0.127 ;the other is ip dhcp excluded-address 192.168.0.128 192.168.0.254.

the ip address can not conflict .

u must be sure any one switch can provide enough ip for all computers ,so u will lost half usefull ip address.

Actions

This Discussion