different ip subnets for different vlan

oddyager

Diamond Member
May 21, 2005
3,398
0
76
say i have 2 different vlans on a switch but I want one to pull addresses from 10.1.1.0 and the other from 10.1.2.0 from the same dhcp server (i'll create 2 different scopes on the server itself). how can i tell each vlan to grab from where?
thanks!
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
tell the router where to forward dhcp requests. Technically it's called a DHCP relay agent.

in cisco terms it's "Ip helper address"

Just setup the scopes on the dhcp server. Then the relay agent will forward the dhcp requests to the server. the relay agent will insert into the dhcp request a field that lets the server know what subnet the request came from.
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
Originally posted by: spidey07
tell the router where to forward dhcp requests. Technically it's called a DHCP relay agent.

in cisco terms it's "Ip helper address"

Just setup the scopes on the dhcp server. Then the relay agent will forward the dhcp requests to the server. the relay agent will insert into the dhcp request a field that lets the server know what subnet the request came from.

this works really well, btw, I am running 6 or 8 subnets off one DHCP server
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
Originally posted by: nweaver
this works really well, btw, I am running 6 or 8 subnets off one DHCP server

pssh, I've got about 10000+ on two dhcp servers. Neener.

eitherway, best practice is to have two dhcp servers for all subnets.
 

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
Originally posted by: spidey07
Just setup the scopes on the dhcp server. Then the relay agent will forward the dhcp requests to the server. the relay agent will insert into the dhcp request a field that lets the server know what subnet the request came from.
I always wondered:

What do you do about any DHCP clients that are on the SAME subnet as the DHCP Server (and there's no router between them and the DHCP Server)? How do THOSE clients get an IP address from the "correct" Scope?
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
there's no relay agent information in the dhcp request (hasn't passed through a router/relay agent), so the dhcp server assumes it is local and OFFERS an address from the scope of its local NIC.
 

oddyager

Diamond Member
May 21, 2005
3,398
0
76
sorry if this sounds stupid (it probably is) but what do you mean on the router? this is kind of ghetto demo of what i have setup:

several 3550 switches --> 6500 backbone switch --> several firewalls here --> several routers here

so do i add the ip helpder address command on the 6500? i tried and did not see any commands for (I also tried the routers and don't see the command either). I'm running the latest IOS software.

EDIT:

Actually, I do see the command when I'm in interface but I'm not understanding how that works. :) Do I have to add the ip helper address on ALL of my routers?
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
you only need the IP helpder address on the router interface that defines that subnet. Basically it takes the dhcp broadcast and turns it into a directed datagram to the server. Normal routing delivers it.

so whatever router is the default gateway for this subnet, the ip helper goes there. In your instance it is either the 3550s or the 6500 that have the SVI (vlan interface) for that network.
 

oddyager

Diamond Member
May 21, 2005
3,398
0
76
Awesome thanks. I see how it can be setup using the switch as the default gateway. what if i use a pix as the default gateway though? are the commands the same?
 

oddyager

Diamond Member
May 21, 2005
3,398
0
76
you've gone this far. you must! i'll dig it up on cisco. thanks for your help again.
 

jlazzaro

Golden Member
May 6, 2004
1,743
0
0
For the PIX, set the IP address of the DHCP server to which the relay agent forwards requests:

dhcprelay server 192.168.1.10 inside

Setup dhcprelay for the name of the interface on which the DHCP relay agent accepts client requests.

dhcprelay enable inside1
dhcprelay enable inside2


Use show dhcprelay to verify