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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

configure multiple dhcp pools on switch for multiple VLANs

Is it possible to have multiple dhcp pools for multiple VLANs? The switch is a 6509 and/or 4506 catalyst. I don't want to use server-based products. Thanks in advance.

5 REPLIES

Re: configure multiple dhcp pools on switch for multiple VLANs

Is it possible to have multiple dhcp pools for multiple VLANs? The
switch is a 6509 and/or 4506 catalyst. I don't want to use server-based
products. Thanks in advance.

You can check out the below link for configuration details:-

http://www.cisco.com/en/US/docs/ios/12_1/iproute/configuration/guide/1cddhcp.html#wp1000999

Hope to Help !!

Ganesh.H

VIP Super Bronze

Re: configure multiple dhcp pools on switch for multiple VLANs

Hi Harris,

Here is a sample config from a 3750 with multiple pools and multiple helper-addresses The same commands should be used on 6500 or 4500.

Switch-B(config)#do sh run | i dhcp
ip dhcp pool 20.20.20.0
ip dhcp pool 30.30.30.0
Switch-B(config)#do sh run int vlan 10
Building configuration...

Current configuration : 121 bytes
!
interface Vlan10
ip address 10.10.10.1 255.255.255.0
ip helper-address 20.20.20.1
ip helper-address 30.30.30.1
end

Switch-B(config)#

HTH

Reza

New Member

Re: configure multiple dhcp pools on switch for multiple VLANs

On our router, we do it like this (I'm not sure this applies to IOS switches, but it does work on our router):

  1. create subinterfaces configured with VLANs and IP addresses
  2. create DHCP pools with networks that contain the IP addresses of the VLAN subinterfaces

The router will then assign DHCP clients their addresses based on the interface VLAN/network that the request was recieved on

Here are some config snippets:

The interfaces (Step 1)

interface GigabitEthernet0/0                                                   

no ip address                                                                 

duplex auto                                                                   

speed auto                                                                    

!                                                                              

interface GigabitEthernet0/0.1                                                                                       

encapsulation dot1Q 1 native                                                         

ip address 192.168.1.254 255.255.255.0                                        

!                                                                              

interface GigabitEthernet0/0.2                                                                                        

encapsulation dot1Q 2                                               

ip address 192.168.2.254 255.255.255.0                                       

!                                                                              

interface GigabitEthernet0/0.3                                                                                        

encapsulation dot1Q 3                                                        

ip address 192.168.3.254 255.255.255.0

and here are the DHCP pools (Step 2)

ip dhcp pool Pool1                                                  

   network 192.168.1.0 255.255.255.0

   domain-name DOMAIN.COM                                                                                    

   dns-server 192.168.1.10                                                 

   default-router 192.168.1.254  


ip dhcp pool Pool2                                                
   network 192.168.2.0 255.255.255.0                                           
   domain-name DOMAIN.COM                                       
   dns-server 192.168.1.10                                                     
   default-router 192.168.2.254

ip dhcp pool Pool3                                               
   network 192.168.3.0 255.255.255.0                                           
   domain-name DOMAIN.COM                                       
   dns-server 192.168.1.10                                                     
   default-router 192.168.3.254
 
So, if a request comes in on VLAN 3, it will be handled by GigabitEthernet0/0.3, which has an IP of 192.168.3.254, on network 192.168.3.0, which is used in DHCP Pool3. So, the client will then be assigned an IP address from Pool3.
 
This should also work for entirely seperate interfaces, as opposed to subinterfaces.
Hope that helps.

Re: configure multiple dhcp pools on switch for multiple VLANs

Hi,

You can of course have multiple DHCP pools for multiple Vlans.

HTH

Mohamed

New Member

configure multiple dhcp pools on switch for multiple VLANs

Hello,

I am also attempting to do the same configuration as above except all of the Subinterfaces are in the same VRF.  When I try to create multiple pools I receive the following error:

"% VRF USERNET is associated with pool DHCP-POOL1"

From what Ive been reading you can only have 1 DHCP Pool per VRF.  Is there any way around this?

Thanks.

26990
Views
0
Helpful
5
Replies