Have a question or want to start a discussion? Post it! No Registration Necessary.
Now with pictures!
Subject
- Posted on
Cisco DHCP Multiple Subnets
- 09-01-2008
- QuadZeroRoute
September 1, 2008, 8:29 pm

When on a Cisco router, configuring DHCP I assume that I can have
multiple subnets although I have never seen an example at Cisco on
this. Would I just have multiple "network" statements for those
subnets?
Example
ip dhcp pool academy
network 172.16.0.0 255.255.255.0
network 172.16.10.0 255.255.255.0
network 172.16.20.0 255.255.255.0
The reason that I ask is that for InterVLAN routing you end up with
multiple subnets but I was never told how to manage DHCP for that
situation and while it looks straightforward I do not know that the
solution fits because I do not have equipment to try it on.
Thanks.

Re: Cisco DHCP Multiple Subnets

For those who have not seen the DHCP commands are are studying this, I
thought that I would throw out the solution so you can see it
according to what Brian explained.
For interVLAN communications according to Cisco you would configure:
Router_Two# config terminal
Router_Two(config)# interface fa 0/1
Router_Two(config-if)# no shutdown
Router_Two(config-if)# interface fa 0/1.1
Router_Two(config-if)# encapsulation dot1q 1 native
Router_Two(config-if)# ip address 172.16.0.1 255.255.255.0
Router_Two(config-if)# interface fa 0/1.10
Router_Two(config-if)# encapsulation dot1q 10
Router_Two(config-if)# ip address 172.16.10.1 255.255.255.0
Router_Two(config-if)# interface fa 0/1.20
Router_Two(config-if)# encapsulation dot1q 20
Router_Two(config-if)# ip address 172.16.20.1 255.255.255.0
...
Router_Two# show ip interface brief
FastEthernet 0/1 unassigned
FastEthernet 0/1.1 172.16.0.1
FastEthernet 0/1.10 172.16.10.1
FastEthernet 0/1.20 172.16.20.1
Serial 0/1 unassigned
...
and the DHCP solution would be:
Router_Two(config)# service dhcp
Router_Two(config)# ip dhcp pool native_VLAN
Router_Two(dhcp-config)# network 172.16.0.0 255.255.255.0
Router_Two(dhcp-config)# default-router 172.16.0.1
Router_Two(dhcp-config)# dns-server 172.16.0.10
Router_Two(dhcp-config)# netbios-name-server 172.16.0.10
Router_Two(dhcp-config)# domain-name cisco.com
Router_Two(dhcp-config)# lease infinite
Router_Two(dhcp-config)# exit
Router_Two(config)# ip dhcp pool accounting
Router_Two(dhcp-config)# network 172.16.10.0 255.255.255.0
Router_Two(dhcp-config)# default-router 172.16.10.1
Router_Two(dhcp-config)# dns-server 172.16.10.10
Router_Two(dhcp-config)# netbios-name-server 172.16.10.10
Router_Two(dhcp-config)# domain-name cisco.com
Router_Two(dhcp-config)# lease 0 24 0
Router_Two(dhcp-config)# exit
Router_Two(config)# ip dhcp pool sales
Router_Two(dhcp-config)# network 172.16.20.0 255.255.255.0
Router_Two(dhcp-config)# default-router 172.16.20.1
Router_Two(dhcp-config)# dns-server 172.16.20.10
Router_Two(dhcp-config)# netbios-name-server 172.16.20.10
Router_Two(dhcp-config)# domain-name cisco.com
Router_Two(dhcp-config)# lease 0 24 0
Router_Two(dhcp-config)# exit

Re: Cisco DHCP Multiple Subnets

I have found a problem in what I wrote. I did not include multiple
statements for the dhcp exclude.... do I need three statements or is
there another way to do it?
Router_Two(config)# ip dhcp excluded-address 172.10.0.0 172.16.0.10
Router_Two(config)# ip dhcp excluded-address 172.16.10.0 172.16.10.10
Router_Two(config)# ip dhcp excluded-address 172.16.20.0 172.16.20.10
Thanks

Re: Cisco DHCP Multiple Subnets
You use all three statements.
-----
Scott Perry
Indianapolis, IN
-----
I have found a problem in what I wrote. I did not include multiple
statements for the dhcp exclude.... do I need three statements or is
there another way to do it?
Router_Two(config)# ip dhcp excluded-address 172.10.0.0 172.16.0.10
Router_Two(config)# ip dhcp excluded-address 172.16.10.0 172.16.10.10
Router_Two(config)# ip dhcp excluded-address 172.16.20.0 172.16.20.10
Thanks
Site Timeline
- » Making The Pirate Bay obsolete
- — Next thread in » Cisco Certification
-
- » Cisco academy assessment (test) question
- — Previous thread in » Cisco Certification
-
- » iPhone SUPER 80% discounts
- — Newest thread in » Cisco Certification
-
- » Helper Woes
- — The site's Newest Thread. Posted in » CCTV, Alarms and other Physical Security
-