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

L3 Switches & DHCP

Heard that L3 switches can do DHCP relay between VLANs. What it means? And how does the DHCP relay works?


Re: L3 Switches & DHCP

The router receives the DHCP request - which is a UDP broadcast - and forwards the requests as a unicast to the DHCP server as specified by the ip helper-address command. Without this command, DHCP broadcasts by clients wouldn't get past the router, as they don't forward broadcasts. Helper-address command works on L3 switches (eg 2948G-L3) the same as with routers. Ip unnumbered interfaces are supported as well.

See link for command details:

If you specify more than one DHCP server, DHCP requests will be sent to each server, and the host will select which ever server's reply was recieved back first. The router will forward the dhcp broadcast as a unicast packet to the dhcp servers and populate the giaddr field with the primary IP address on the interface.



interface FastEthernet1

description Bldg 1 Network A

ip address

ip helper-address

ip helper-address

no ip redirects

no ip directed-broadcast

ip pim sparse-mode

standby priority 200

standby preempt

standby ip


Hope it helps.



Re: L3 Switches & DHCP


DHCP relay means that the router will act as a DHCP client on behalf of the real client if there is no DHCP server on the client's VLAN. The router will send the DHCP request to the server and forward the reply to the client. This allows one or a few DHCP servers to serve several VLANs.

I have described the router performing the DHCP relay function, and you asked about an L3 switch doing so. You will have to configure the routing portion of the switch, such as the MSFC in the 6500 switch, to do this by configuring the port-channel sub-interface with the command "ip helper-address x.x.x.x", where x.x.x.x is the address of a DHCP server that has a scope for that VLAN.

Hope this helps.



Re: L3 Switches & DHCP

You should be aware that the interface command "ip helper-address" forwards several other UDP-based protocols by default. This can be a problem in some Microsoft networking environments. If you just want to forward DHCP/BOOTP requests, you can issue extra commands to block forwarding of the others:

no ip forward-protocol udp tftp

no ip forward-protocol udp nameserver

no ip forward-protocol udp domain

no ip forward-protocol udp time

no ip forward-protocol udp netbios-ns

no ip forward-protocol udp netbios-dgm

no ip forward-protocol udp tacacs

The "netbios" ones are the Microsoft ones.

Hope this helps.

CreatePlease to create content