DHCP configuration

Unanswered Question
May 1st, 2009
User Badges:

Hi,

If we define two DHCP pools on routers.

Each with one subnet but same DNS server IP. But we do not bound it to any of the LAN interfaces. Will this work if there is any DHCP request is received on LAN?

If yes is it so that first pool will be used to distribute IP's to clients and then pool 2 will be used?

Or it is just like access-lists created but of no use as long as we use it on interface or in route-map.. sounds similar to me.

Any experience please share.

Any link on cisco.com?

Thanks in advance

Subodh

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (2 ratings)
Loading.
John Blakley Fri, 05/01/2009 - 07:49
User Badges:
  • Purple, 4500 points or more

Subodh,


When you create a pool on the router, it automatically binds to an interface that falls in that subnet:


ip dhcp pool TEST

network 192.168.1.0 255.255.255.0


int f0/0

ip address 192.168.1.1 255.255.255.0


The above would serve anyone coming in on the fa0/0 interface, and would serve addresses from the above pool.


In order to have a pool that doesn't match any interfaces, I don't think you'll be able to use your dhcp server pools. (I could be wrong.)


For example:


ip dhcp pool TEST

network 192.168.1.0 255.255.255.0


int fa0/0

ip address 192.168.5.1 255.255.255.0


Even if you used a helper address, you wouldn't be able to match the address to a pool because it's going to try to use whatever interface it came in on.


If there's a way to do it, I'd be interested in hearing also.


HTH,

John

Jon Marshall Fri, 05/01/2009 - 07:51
User Badges:
  • Super Blue, 32500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

Subodh


You don't need to bind it to LAN interfaces with a command but presumably the LAN interfaces will be using an address from each pool eg.


R1


int fa0/0

ip address 192.168.5.1 255.255.255.0


int fa0/1

ip address 192.168.6.1 255.255.255.0


ip dhcp excluded-address 192.168.5.1 192.168.5.5


ip dhcp excluded-address 192.168.6.1 192.168.6.5


ip nat pool P1

network 192.168.5.0 /24

default-router 192.168.5.1

dns etc....


ip nat pool P2

network 192.168.6.0 /24

default-router 192.168.6.1

dns etc...


Fa0/0 and fa0/1 on R1 will be connected into a switch. On that switch you should have 2 vlans eg. vlan 5 & vlan 6.


Connect fa0/0 into a switchport and allocate that port into vlan 5.


Connect fa0/1 into a switchport and allocate that port into vlan 6.


Then any clients in vlan 5 will get an ip address out of the 192.168.5.x range and any clients in vlan 6 will get an ip address out of the 192.168.6.x range.


Attached is a link for all the DHCP server options -


http://www.cisco.com/en/US/docs/ios/ipaddr/configuration/guide/iad_dhcp_svr_cfg_ps6350_TSD_Products_Configuration_Guide_Chapter.html#wp1046221


Jon

Actions

This Discussion