dhcp / giaddr / configuration for giaddr update

hi group. this may be not strictly be a cisco question and if this is off topic, i'm sorry. it does however pertain to configuration of cisco routers.

if a dhcp server is connected to a router that connects many different subnets... how does the dhcp server know which subnet a dhcp request came from? does this information come from the giaddr field of the dhcp request packet? if yes, is the value of this field set to the address of the of the router interface that originally received the packet or the router interface that the packet is forwarded through?

and does the giaddr update itself require any configuration of the router device or does the router know to update it automatically? if it requires configuration, how is it done? thanks for reading

Reply to
sirspammedalot017
Loading thread data ...

No sure on the field, but the value is definitely the address of the receiving router interface, which then becomes the source of the request. In a situation like mine where I have core routers for hundreds of vlans, the dhcp server would never know which is which and what to assign without knowing the subnet for which the request is coming from. As far as I know, yes, the dhcp server must have the correct information for the router in each network, but on the router itself, no there is no additional configuration except for ip helper- address on each interface it is required and a known path to whatever ip the dhcp server is.

Reply to
Trendkill

yes this function is known as DHCP relay agent -

on Cisco router yes - configured on the required interfaces wi the command ip helper-address

Reply to
Merv

thanks for the helpful reply. this has actually raised another question for me. what happens in the case of a dhcp request being forwarded through several routers before reaching the dhcp server, assuming this kind of situation is supported? im going to assume the original receiving interface gets written a single field of the packet (giaddr). given that, then after going through additional routers, this value would get over-written and as a result, there wouldn't be a known return path for the response beyond the nearest router.

how would the packet f> >

Reply to
sirspammedalot017

Only the original receiving router re-writes the packet and forwards on. You have to remember that the main reason this is done is because the client does not have an IP address and therefore the packet cannot route back without a source address. The router then proxies this request for the client using its own interface, but knows the original boxes MAC to forward the reply when it comes. As soon as it proxies the request, its own IP is used, which should be fully routable, and no other routers need to interfere. To other routers, this is just another packet, from the one interface on the one router, to the DHCP server. Business as usual...

Reply to
Trendkill

"what happens in the case of a dhcp request being forwarded through several routers before reaching the dhcp server"

The key thing is that the relay agent sends a unicast to the dhcp server and not a broadcast so it travels through the network unaltered to the dhcp server. (clearly ttl field is decremented, etc.). Intermediate relay agents don't see the packet at all.

Reply to
Bod43

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.