ip helper-address... help!

Hello!

I have the following config on my router LAN interfaces to allow use of two DHCP servers on other network:

ip helper-address 192.168.0.201 ip helper-address 192.168.0.202

Can you explain me how it works exactly, because I see two possibilities:

  1. The router "sees" the DHCPDISCOVER packet and forwards the packet to the 192.168.0.201, and if no DHCPOFFER comes back from the address, it forwards the packet to the second address - 192.168.0.202. Then, for example, DHCPOFFER arrives from 192.168.0.202 so the router forwards DHCPREQUEST to the 192.168.0.202 only.

OR

  1. The router "sees" the DHCPDISCOVER packet and forwards it to both addresses simultaneously. Then DHCPOFFER arrives from (for example)
192.168.0.201, and what does the router do next? Does it send DHCPREQUEST to 192.168.0.201 only, or to both addresses 192.168.0.201 and 192.168.0.202?

I ask because my two dhcp servers are not synchronized, and there is a situation sometimes that one dhcp server gives the client an ip address already assigned by the second dhcp server. I know that dhcp servers should stay synchronized and they should know about each other address assignemnts. But I have no idea if the problem lies in the dhcp servers or wrong router configuration. I don't know the ip helper-address process in such detail.

Could you help me, please?

Regards, Tomasz Grzelak

Reply to
Tomasz Grzelak
Loading thread data ...

I think it sends out simultaneously to two servers. The two servers will respond and the router forwards the two responses independently. It's up to the client to deal with the two responses. Use a sniffer on your client to see for sure.

Reply to
Cen

Some DHCP servers have the ability to ping a particular IP address before they assign it.

Check and see if your DHCP servers have this capability if they do consider enalbing it.

Reply to
Merv

This shouldn't be a problem. DHCP servers are required to test whether the address is already in use before assigning it, using ping. And when a client gets an address from a DHCP server, it will usually do an ARP query to see if it's in use.

Reply to
Barry Margolin

but there are two dhcp servers running, and when they both receive DHCPDISCOVER (I assume now that a router forwards the packet simultaneously to both addresses defined with 'ip helper address...'), they both send DHCPOFFER to the client (at the moment there is no ip address assigned to the client, so both dhcp servers cannot ping the ip address, and can send the same ip in the offering). Am I right or wrong?

And the second scenario - a router forwards the request to the second dhcp server, after the request to the first dhcp server fails. Then there should be no problem with dhcp servers to ping clients to check if they are in the network already, and if they do not stay synchronized, there something wrong with them (unfortunatelly theye are m$ windows dhcp servers... :( )

But what scenario really takes place? Can anyone explain this to me?

Anyway, I'll try to sniff some packets... :)

Regards, Tomasz Grzelak

Reply to
Tomasz Grzelak

You're right. But since the client only uses one of the responses, that case isn't a problem.

The case I thought you were concerned with is where Server 1 tries to assign an address that was already assigned by Server 2 to some other machine. Server 1 will detect this when it pings the address.

Reply to
Barry Margolin
  1. The router "sees" the DHCPDISCOVER packet and forwards it to both addresses simultaneously. Then DHCPOFFER arrives from (for example)
192.168.0.201, and what does the router do next? Does it send DHCPREQUEST to 192.168.0.201 only, or to both addresses 192.168.0.201 and 192.168.0.202?

In DHCP operations,if the dhcp client finds the offer agreeable, it will send another broadcast, a DHCPREQUEST, specifically requesting those particular IP parameters. Why does the client broadcast the request instead of unicasting it to the server? A broadcast is used because the first message, the DHCPDISCOVER, may have reached more than one DHCP server. If more than one server makes an offer, the broadcasted DHCPREQUEST allows the other servers to know which offer was accepted. The offer accepted is usually the first offer received.

Reply to
Rave

Thank you all for your replies. I built a test lab with two dhcp forwarding routers, two clients, and two dhcp servers. I had no problem with doubled address assignemnts. I sniffed the packets and saw, that a router with two 'ip helper-address' commands sent simultaneously two DHCPDISCOVER, next two DHCPREQUEST packets. A client had an option 'ServerID' set to IP of one of the servers in the DHCPREQUEST packet, so both servers knew whom the address was assigned to, as they received the packet.

So the problem in my production environment is with the servers or with the dhcp clients (I use different systems, and maybe some dhcp clients don't send the Server ID option?). I will have to investigate that.

Any way, the problem is not the router configuration, because the dhcp forwarding process behaves quite logically (I finally understand what goes inside).

Regards, Tomasz Grzelak

Reply to
Tomasz Grzelak

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.