cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
555
Views
2
Helpful
14
Replies

DHCP issue

rcsfinest
Level 1
Level 1

Hey I'm new here and I had a quick question, I have this practice lab I've been working on and i can't seem to get end devices in my VLANs to get IPs from the DHCP server. I tried everything, checking to make sure routing is enabled (it is), checked that the static IPs are right (I think they are) and I'm stumped. 

1 Accepted Solution

Accepted Solutions

Have you configured IP helper? Let's focus for a bit on PC 2 in VLAN 10. In order for that PC to get an IP address you need to configure IP helper on the L3 switch where you have VLAN 10 SVI configured. I'm not sure if the "HR SW" and "HW MLSW 1" are L2 or L3 switches. Assuming that "HR SW" is a L3 switch, you need to configure the IP helper on VLAN 10 SVI. However, if "HR SW" is a L2 switch and "HW MLSW 1" is the L3 switch then the IP helper would need to be configured on "HW MLSW 1" VLAN 10 SVI. If both switches are L2 switches then the IP helper would need to be configured on the HQ router under the interface that is facing the "HW MLSW 1" switch. Basically you need the IP helper to be configured on PC 2 gateway.

Configuring the IP helper will take care of converting the DHCP boradcast messages to unicast and then the packets will be routed rather than broadcasted to the DHCP server. Also, the DHCP server needs to know how to get back to the helper device. For instance, if the IP helper was configured on the "HW MLSW 1" switch VLAN 10 SVI, the DHCP server needs to know how to route the DHCP responses back to that switch SVI, because when you configure the IP helper the source of the packets will be the interface where the IP helper was configured assuming no NAT was applied anywhere on the path.

To configure IP helper you need to apply the command "ip helper-address < the DHCP server IP address >". This command should work for both switches and rotuers.

View solution in original post

14 Replies 14

rcsfinest
Level 1
Level 1
 

Hello,

 

Can you provide a diagram of how things are connected?

In addition to routing, if our VLANs are on different subnet than the DHCP server you will need to add the helper-address command.

Also make sure the DHCP server can reach all VLAN subnets with a ping/connectivity test.

 

-David

Sorry I completely forgot some overhead view of my issue, here's a short video of an end device doing a DHCP request.

As already mentioned by @David Ruess, if the DHCP server is sitting on a different VLAN or a remote site then you need to configure DHCP helper. DHCP helper will act as a relayer. For instance, say if an endpoint in VLAN 10 is trying to get an IP address and the DHCP server happens to be located in VLAN 20, in that case the broadcast traffic sent by the endpoint in VLAN 10 will be converted to unicast traffic by VLAN 10 gateway (could be an SVI on the switch) and sent to the DHCP server. However, this will only work if VLAN 10 gateway has the DHCP server configured as a DHCP helper.

Here's a short video of the end device doing a DHCP request. 

Where your DHCP server is located on that topology? : D

This is the other Vlan showing the same issue.

Have you configured IP helper? Let's focus for a bit on PC 2 in VLAN 10. In order for that PC to get an IP address you need to configure IP helper on the L3 switch where you have VLAN 10 SVI configured. I'm not sure if the "HR SW" and "HW MLSW 1" are L2 or L3 switches. Assuming that "HR SW" is a L3 switch, you need to configure the IP helper on VLAN 10 SVI. However, if "HR SW" is a L2 switch and "HW MLSW 1" is the L3 switch then the IP helper would need to be configured on "HW MLSW 1" VLAN 10 SVI. If both switches are L2 switches then the IP helper would need to be configured on the HQ router under the interface that is facing the "HW MLSW 1" switch. Basically you need the IP helper to be configured on PC 2 gateway.

Configuring the IP helper will take care of converting the DHCP boradcast messages to unicast and then the packets will be routed rather than broadcasted to the DHCP server. Also, the DHCP server needs to know how to get back to the helper device. For instance, if the IP helper was configured on the "HW MLSW 1" switch VLAN 10 SVI, the DHCP server needs to know how to route the DHCP responses back to that switch SVI, because when you configure the IP helper the source of the packets will be the interface where the IP helper was configured assuming no NAT was applied anywhere on the path.

To configure IP helper you need to apply the command "ip helper-address < the DHCP server IP address >". This command should work for both switches and rotuers.

I'll try this out, that first switch is a L2 switch, are the packets supposed to be broadcasted out of every port like that?

Yes, broadcast will go to all ports within the broadcast domain with the exception for the port the traffic came from.

Then the IP helper should be applied to the second switch under VLAN 10 SVI.

I tried this and the packets still aren't going out the correct interface. Just so I have the syntax right, it's int Vlan name, the. IP helper-address x.x.x.x, right?

Not under the VLAN name, it will be under the VLAN interface. Example:

interface vlan10
   ip helper-address 1.2.3.4

rcsfinest
Level 1
Level 1

Here's the topo.