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

Configuring VLANs and DHCP on 1800 router

We are currently in the process of planning to implement VLANs onto our network. Currently we have a 10.1.21.0 /24 network which I will subnet into a 10.1.21.0/27 network.

We use dell switches but the cisco router that will be in use is a 1841. Im a bit confused as to how DHCP will work In this situation. Currently DHCP is running on a windows server, but I suppose I would have to move it from there onto the router.

Would I need to create a different DHCP pool for each VLAN subnet, similar to this?

1841(config)#ip dhcp pool vlan2

1841(dhcp-config)#network 10.1.21.0 255.255.255.224

1841(dhcp-config)#default-router 10.1.21.1

1841(config)#ip dhcp pool vlan3

1841(dhcp-config)#network 10.1.21.32 255.255.255.224

1841(dhcp-config)#default-router 10.1.21.33

So If I wanted 5 vlans I would have 5 pools for the 5 different subnets?

If this is the case my question is how does a client get associated with a pool? Like how does the router assign a client in vlan4 an address from the vlan4 pool?

Can anyone please give me some pointers on setting up DHCP on a router in a VLAN environment.

Thanks!

9 REPLIES
Community Member

Re: Configuring VLANs and DHCP on 1800 router

we can achieve the same by 2 methods:-

1) by having the Multihomed DHCP server( This is not scalable soultion)

2) Use the DHCP Relaying

when we have the DHCP server on the different subnet we need to have the DHCP relay agent to forward the DHCP request from client to the dhcp server, In general the DHCP-Relay agent set the giaddr attribute in the DHCP request to inform the DHCP server to send the DHCP response back to respective relay agent.

when we have the Non-Zero giaddr attribute in the DHCP request, The DHCP server assigned the IP address on the basis of the giaddr.The DHCP server matches the giaddr with defined scope and assign the IP address to the client froma the pool who matches the range with giaddr.

In cisco when we define the ip helper-address on the vlan to forward the DHCP request it places the vlan Interface IP address

as the 'giaddr' field in a DHCP message from a client and on the basis of that DHCP server assign the address from the different pools

Hope it resolve your query!!!!

Mohmmad Imran

Community Member

Re: Configuring VLANs and DHCP on 1800 router

so can i keep the DHCP server on a windows sever by using the ip help-address to point to the DHCP server on each sub interface?

Community Member

Re: Configuring VLANs and DHCP on 1800 router

Yes....

In our envoirnment the DHCP server are on windows world-wide and we are configuring the IP-Helper address on the VLAN interfaces to forward the DHCP request to DHCP and it works without any problem.

Mohmmad Imran

Community Member

Re: Configuring VLANs and DHCP on 1800 router

Ok, so i suppose you would have to have separate DHCP scopes for each VLAN?

so if im setting up 5 VLANs i would need 5 DHCP scopes on my windows server. Is this correct?

Community Member

Re: Configuring VLANs and DHCP on 1800 router

if your vlan are subnet based then yes you have to create 5 different dhcp scope on DHCP server

Mohmmad Imran

Community Member

Re: Configuring VLANs and DHCP on 1800 router

if your vlan are subnet based then yes you have to create 5 different dhcp scope on DHCP server

Mohmmad Imran

Community Member

Re: Configuring VLANs and DHCP on 1800 router

well yes each vlan is on a different subnet.

so the config would be something like this:

1841(config-subif)#encapsulation dot1q 7

1841(config-subif)#ip address 10.1.21.225 255.255.255.224

1841(config-subif)#ip helper-address 10.1.21.3 (<-- where 10.1.21.3 is the DHCP server for our LAN)

1841(config-subif)#

Community Member

Re: Configuring VLANs and DHCP on 1800 router

yes....

Community Member

Re: Configuring VLANs and DHCP on 1800 router

thank you for your help!

2154
Views
0
Helpful
9
Replies
CreatePlease to create content