10-18-2002 08:48 AM - edited 03-02-2019 02:11 AM
Heard that L3 switches can do DHCP relay between VLANs. What it means? And how does the DHCP relay works?
10-18-2002 09:18 AM
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
10-18-2002 09:29 AM
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
10-20-2002 09:32 PM
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.
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: