Cisco Support Community
cancel
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?

3 REPLIES

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: http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fipras_r/1rfipadr.htm#xtocid21

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.

Eg.

!

interface FastEthernet1

description Bldg 1 Network A

ip address 172.69.93.1 255.255.255.192

ip helper-address 172.69.2.74

ip helper-address 172.69.2.200

no ip redirects

no ip directed-broadcast

ip pim sparse-mode

standby priority 200

standby preempt

standby ip 172.69.93.6

!

Hope it helps.

Steve

Bronze

Re: L3 Switches & DHCP

Hi,

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.

Mark

Gold

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.

271
Views
0
Helpful
3
Replies
CreatePlease to create content