03-10-2010 07:53 AM - edited 03-06-2019 10:05 AM
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.
03-10-2010 08:00 AM
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
03-18-2019 06:59 AM
03-10-2010 08:09 AM
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
05-20-2010 10:12 AM
On our router, we do it like this (I'm not sure this applies to IOS switches, but it does work on our router):
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
05-20-2010 10:28 AM
Hi,
You can of course have multiple DHCP pools for multiple Vlans.
HTH
Mohamed
12-01-2011 08:12 AM
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.
03-18-2019 11:46 AM
Hello,
how are you configuring this ? I used the config below to associate multiple DHCP pools with the same vrf:
R1(config)#ip dhcp use vrf connected
hostname R1
!
vrf definition vrf1
rd 1:1
!
address-family ipv4
exit-address-family
!
ip dhcp excluded-address 192.168.10.1
ip dhcp excluded-address 192.168.20.1
ip dhcp excluded-address 192.168.30.1
ip dhcp excluded-address 192.168.40.1
!
ip dhcp pool LAN10
vrf vrf1
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
!
ip dhcp pool LAN20
vrf vrf1
network 192.168.20.0 255.255.255.0
default-router 192.168.20.1
!
ip dhcp pool LAN30
vrf vrf1
network 192.168.30.0 255.255.255.0
default-router 192.168.30.1
!
ip dhcp pool LAN40
vrf vrf1
network 192.168.40.0 255.255.255.0
default-router 192.168.40.1
!
interface GigabitEthernet0/0
vrf forwarding vrf1
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/0.30
encapsulation dot1Q 30
vrf forwarding vrf1
ip address 192.168.30.1 255.255.255.0
!
interface GigabitEthernet0/0.40
encapsulation dot1Q 40
vrf forwarding vrf1
ip address 192.168.40.1 255.255.255.0
!
interface GigabitEthernet0/1
vrf forwarding vrf1
ip address 192.168.20.1 255.255.255.0
duplex auto
speed auto
media-type rj45
03-18-2019 01:51 PM
Hello
@harris.em wrote:
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.
Below is a example of dhcp pools using vrf on SVI interfaces.
int vlan 10
ip address 10.1.10.254 255.255.255.0
int vlan 20
ip address 10.1.20.254 255.255.255.0
int vlan 30
ip address 10.1.30.254 255.255.255.0
int vlan 40
ip address 10.1.40.254 255.255.255.0
ip dhcp pool vlan10-20
vrf TEST
network 10.1.10.0 255.255.255.0
network 10.1.20.0 255.255.255.0 secondary
override default-router 10.1.20.254
default-router 10.1.10.254
lease 0 8
ip dhcp pool vlan30-40
vrf TEST
network 10.1.30.0 255.255.255.0
network 10.1.40.0 255.255.255.0 secondary
override default-router 10.1.40.254
default-router 10.1.30.254
lease 0 8
ip vrf TEST
ip dhcp use vrf connected <- when no helper addresses are required
ip dhcp use vrf remote <- when helper addresses are required
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