cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2061
Views
0
Helpful
6
Replies

IOS as DHCP server with ip helper-address

oj88
Level 1
Level 1

A client has a remote office wherein an L3 switch is configured with ip helper-addresses (on multiple vlan interfaces) configured to obtain their IP address from the head office. But due to the often-times unreliable WAN link, end users are sometimes unable to get an IP address.

My solution was to configure the remote L3 switch (3750) as the backup DHCP server and to enable it when the WAN link goes down. I thought that it was a simple transition of by just removing/reinstating the IP helper-address commands, I'll have control on where users can get their IP addresses (local switch or remote DHCP).

However, I was surprised to find out that even with an ip helper-address defined, the users were getting their IP addresses from the switch. I was under the impression that once an ip helper-address is defined, it will take precedence over the built-in IOS DHCP server.

Is this the true behavior of the ip helper-address feature or am I hitting a bug?

Switch IOS version is: 12.2(25r)SEE3

Thanks!

2 Accepted Solutions

Accepted Solutions

glen.grant
VIP Alumni
VIP Alumni

All the ip helper address does is take a dhcp broadcast request and make it a unicast to the defined address . The clients will usually take the first device which answers first which will be the directly attached switch because it is closer and will respond faster . You would have to turn off the service on the switch first before the primary would take over.

View solution in original post

Orlando

In support of the answer from Glen: yes this is the proper and expected behavior and is NOT a bug. The helper address does not pre-emptivly take over from the locally configured DHCP service. If the local switch has DHCP configured and also has the helper address configured then the switch will forward the DHCP request to the remote DHCP server and will also generate a response to the client to offer its own address pool. You have not correctly understood how it works and Glen has correctly explained it.

HTH

Rick

HTH

Rick

View solution in original post

6 Replies 6

glen.grant
VIP Alumni
VIP Alumni

All the ip helper address does is take a dhcp broadcast request and make it a unicast to the defined address . The clients will usually take the first device which answers first which will be the directly attached switch because it is closer and will respond faster . You would have to turn off the service on the switch first before the primary would take over.

Orlando

In support of the answer from Glen: yes this is the proper and expected behavior and is NOT a bug. The helper address does not pre-emptivly take over from the locally configured DHCP service. If the local switch has DHCP configured and also has the helper address configured then the switch will forward the DHCP request to the remote DHCP server and will also generate a response to the client to offer its own address pool. You have not correctly understood how it works and Glen has correctly explained it.

HTH

Rick

HTH

Rick

Glen, Rick... thanks for clearing that up.

Another related question; I wanted to leave the client with the shortest script to enable/disable local switch DHCP. I know that the "no service dhcp" command would effectively disable the switch DHCP in a single command. But, will it affect the function of ip helper-address? I know I read that dhcp relay is also turned off with "no service dhcp", but I just need confirmation.

Bumping

But, will it affect the function of ip helper-address? I know I read  that dhcp relay is also turned off with "no service dhcp", but I just  need confirmation.

I too would like to if this is true or not.

I have not tested this recently and so am not authoritative. But I am pretty sure that no service dhcp does not have any impact on the behavior of ip helper-address.

HTH

Rick

HTH

Rick

Correct me if I am wrong,

disabling the dhcp service will also disable the relay agent (ip helper). Because of this the dhcp service needs to be enabled (which is default), but it does not need to be running for ip helper to work.

By “running” I mean that a dhcp pool does not need to be configured. In the enabled but ‘not running’ mode the dhcp service will relay DHCP requests when the ip helper command is used, but it does not respond to DHCP requests on UDP port 67 or 68 itself. So in enabled/not-running mode the relay agent works, but the DHCP server service is not active. With disabled (no service dhcp) mode both the DHCP relay agent and built-in DHCP server are disabled.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: