Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to obtain an IP address from a DHCP server even when the "ip helper address" command is configured

Core Issue

The format of the Dynamic Host Configuration Protocol (DHCP) messages is based on the format of Bootstrap Protocol (BOOTP) messages. This ensures:

  • support for BOOTP relay agent functionality when the ip helper-address command is issued
  • interoperability between BOOTP clients and DHCP servers

BOOTP relay agents eliminate the need for the deployment of a DHCP server on each physical network segment.

If the no ip boot server command is configured, it does not stop the forward of the DHCP packets to the DHCP server. Instead, it continues to forward the DHCP request packet with the giaddr field populated with 0.0.0.0 as it originated from the client and that is forwarded to the DHCP server.

If the giaddr field is set to 0.0.0.0, the DHCP server does not assign an IP address to its client. Therefore, the ip bootp server command becomes mandatory in order for a switch to function properly as a DHCP relay agent and to populate the giaddr field appropriately.

In some scenarios, the clients connected to the switch do not obtain the IP address because DHCP requests can be duplicated and sourced from multiple VLANs if a loop exists in the network.

For example, if you connect a PC to an HUB, it can cause an Spanning-Tree Protocol (STP) loop in the network. This occurs because when you connect a PC to a HUB, it does not get an IP address from the DHCP address and tries to points its MAC address for two different ports at the same time.

Resolution

In order to resolve this issue, the ip bootp server command must be enabled in order for routers to use the ip helper-address command in order to forward DHCP User Datagram Protocol (UDP) broadcasts and for the router to properly act as a DHCP relay agent on behalf of the DHCP client.

The ip bootp server command listens to BOOTP requests (UDP port 67/68) and acts upon them as a DHCP relay agent. So, the specific funtion of this command is to perform the DHCP relay function, which is to set the giaddr field in the DHCP request packet with the IP address of the interface of the router from which the DHCP request came.

Note: In newer Cisco IOS® software releases, the service dhcp command handles the DHCP relay agent function instead of the ip bootp server command.

Refer to these documents for more information:

Version history
Revision #:
1 of 1
Last update:
‎07-01-2009 04:12 AM
Updated by:
 
Labels (1)