I would like to know if ip helper-address feature is working on a layer 2 switch (2950,2960) or you should use a Layer 3 switch to do that?
Thanks in advance.
i think it has to be a layer 3 switch as the "ip helper-address" command forwards the dhcp process into another subnet, thus routing is occuring and therefore the device has to be layer 3.
correct me if iam wrong.
Laurent and Florian,
To my great surprise, I actually found the ip helper-address command to be present on a SVI of a 2950 Catalyst switch. I would have to test it in a lab if it actually works, though. Theoretically, it should - it would send the repackaged unicast DHCP packet through its default gateway towards the predefined DHCP server. But first and foremost, it does not make sense. Laurent, if there is a router in your network then it is its job to do the DHCP Relay function. Why would you want to configure a DHCP Relay function on an L2 device that still has to send the DHCP packet via an existing router - and not configure the existing router itself with the ip helper-address command?
Well, there can be rare circumstances when this can be actually useful, such as when your L2 switch is smarter than your no-name router which is incapable of doing DHCP Relay itself. But I would like to hear from Laurent if he has any particular need to run the IP Helper on his 2950/2960 switch.
Well. I need the IP helper feature on the 2950 switch because the default gateway for the subnet is the ISP L3 switch and then whenever we have to change the DHCP IP then we don´t need to call the ISP and wait for the change.
It could be intersting to test if a L2 switch actually support the IP helper-address feature.
I have confirmed in our lab that both Cat2950 and Cat2960 are capable of running as DHCP Relay Agents. The prerequisites are:
There is a major limitation on the 2950 switches: as there can be at most one SVI in the "no shutdown" state at any time, the DHCP Relay feature can be activated only for a single VLAN whose SVI is currently activated. There is, I believe, no workaround available. The 2960 switches do not have this limitation.
IOSes used in my experiment:
I'd like to add the 4th condition which is necessary so the DHCP Relay works:
Good point. It should be noted that the service dhcp is a default setting on these platforms and so does not need to be explicitly entered unless disabled at some point in the past.