cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
36613
Views
21
Helpful
12
Replies

Does ip helper-address work on a Layer 2 Switch (2950)?

lap
Level 2
Level 2

Hi,

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.

Best regards,

Laurent

12 Replies 12

flokki123
Level 3
Level 3

hi,

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.

florian

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?

Best regards,

Peter

Hi,

there is no need to ip helper-address in  L2 switch.

Hi,

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.

Best regards,

Peter

Hi all,

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.

Best regards,

Laurent

Hi Laurent,

I have confirmed in our lab that both Cat2950 and Cat2960 are capable of running as DHCP Relay Agents. The prerequisites are:

  • Have a SVI (i.e. the interface Vlan X) created for the particular VLAN in which the clients reside. This SVI must be configured with an appropriate IP address, netmask and the ip helper-address command, and it must be activated using the no shutdown command
  • Have the correct default gateway configured for the switch using the ip default-gateway command
  • This switch itself must be capable of successfully pinging the DHCP server specified in the ip helper-address command

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:

2950: c2950-i6k2l2q4-mz.121-22.EA13.bin

2960: c2960-lanbasek9-mz.122-58.SE1.bin

Best regards,

Peter

Hi Peter,

Perfect reply!

Thanks a lot for that.

/Laurent

I'd like to add the 4th condition which is necessary so the DHCP Relay works:

  • make sure that dhcp service is not disabled i.e issue the dommand: service dhcp

Cheers, 
Frank

Hi Frank,

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.

Best regards,
Peter

So, has it been determined whether or not it is more suitable to use an L2 device as a relay agent versus a multi-layer or L3 device?

A L3 device would be more suitable.

In this case, the 29xx switch is taking advantage of features above and beyond what's needed by "just" a L2 switch, but since these switches are not full blown L3 switches, you also bump into limitations.

I agree with Joseph that a layer 3 switch (or router) is more suitable. Especially true in terms of the 2950 switch where you are limited to forwarding DHCP for a single vlan. Peter made an interesting point about cases where it might make sense to do the DHCP forwarding on a layer 2 switch. But in general it would be preferable to perform this on a layer 3 device.

 

HTH

 

Rick

HTH

Rick
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:

Review Cisco Networking products for a $25 gift card