06-10-2011 03:45 AM - edited 03-07-2019 12:44 AM
hi,
i have a query regarding dhcp..
say we have a vlan 1 ip range 172.22.1.0 255.255.255.128
and vlan 2 172.22.1.128 255.255.255.128
ip dhcp pool VLAN_1
network 172.22.1.0 255.255.255.128
default-router 172.22.1.1
dns-server 172.22.2.8
domain-name abc
lease 3
ip dhcp pool VLAN_2
network 172.22.73.128 255.255.255.128
default-router 172.22.1.129
domain-name abc
dns-server 172.22.2.8
lease 2
we also have created two vlans : vlan001 and vlan002
everything works fine but just wondering how will the cisco switch know to link the dhcp pool to the vlans as the names dont match at all
Thanks
Solved! Go to Solution.
06-10-2011 03:53 AM
It depends on the default-router ip address. Interface vlan 1 will "forward" requests to dhcp pool VLAN_1, because its address is configured as a default-gateway on that pool. The same is for interface vlan 2.
06-10-2011 03:53 AM
It depends on the default-router ip address. Interface vlan 1 will "forward" requests to dhcp pool VLAN_1, because its address is configured as a default-gateway on that pool. The same is for interface vlan 2.
06-10-2011 03:59 AM
Hi,
It's not going to work because VLAN 2 default router is not in the same subnet as the scope so VLAN2 and VLAN1 won't be able to communicate.
Regards.
Alain.
06-10-2011 04:14 AM
thanks for the reply. i have got the concept
06-10-2011 04:16 AM
I think it is just a typo, the author says "everything works fine"
06-10-2011 04:20 AM
yep its just a typo...its working fine...and i have understood the concept...so thanks to both...now i know that for creating a dhcp pool you definetly need to have int vlan..is it crt ?
06-10-2011 04:29 AM
You need an interface vlan for routing, it acts a s default gateway for the subnet. If you have only one subnet (vlan), you dont need gateway, thus no need for interface vlan, so you can configure dhcp pool without default-gateway option (theoretically).
06-10-2011 04:43 AM
Hi,
the default-gateway is an option in the DHCP reply and it is passed to the DHCP client but if you don't configure it then you'll have to statically configure it on your client otherwise how is he gonna reach destinations not in his subnet?
And As far as which pool to select it has nothing to do with default-gateway but with the ip address of the interface it is received on and the the value of a field in the DHCP packets telling if there was a relay in between and from which subnet this packet was relayed.
Regards.
Alain.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide