Solved

DHCP Server on a Cisco 3640 Router

Posted on 2004-10-23
1,882 Views
Last Modified: 2009-12-16
Hi,

I have a Cisco 3640 router with multiple subnets configured, Dot1 Q Tagged VLans. I have setup a DHCP server for VLAN 3, and it is working fine. My question is, can you have multiple DHCP services running on the same router, one for each subnet? If so, will each subnet get the correct IP Address asigned to it. Partial config listed below.

!
ip dhcp excluded-address 192.168.3.1 192.168.3.19
ip dhcp excluded-address 192.168.3.250 192.168.3.254
!
ip dhcp pool tcs192
   network 192.168.3.0 255.255.255.0
   domain-name tcs192
   dns-server 216.x.x.x 216.xx.x
   default-router 66.x.86.x
   lease 3
!
!
!
!
interface FastEthernet2/0
 description Connected to Cat 0/5
 no ip address
 no ip redirects
 no ip unreachables
 no ip proxy-arp
 ip nat inside
 no ip mroute-cache
 duplex auto
 speed auto
 no mop enabled
!
interface FastEthernet2/0.1
 description 172.31.x.x/24
 encapsulation dot1Q 1 native
 ip address 172.31.x.x 255.255.255.0
 ip access-group fa11_in in
 ip nat inside
 no cdp enable
!
interface FastEthernet2/0.2
 description 10.10.x.x/24
 encapsulation dot1Q 2
 ip address 10.10.x.x 255.255.255.0
 ip access-group fa12_in in
 ip nat inside
 no cdp enable
!
interface FastEthernet2/0.3
 description 192.168.3.x/24
 encapsulation dot1Q 3
 ip address 192.168.3.x 255.255.255.0
 ip access-group fa13_in in
 ip nat inside
 no cdp enable
!
interface FastEthernet2/0.4
 description 172.16.x.x/24
 encapsulation dot1Q 4
 ip address 172.16.x.x 255.255.255.0
 ip access-group fa14_in in
 ip nat inside
 no cdp enable
!
0
Question by:orbix
    5 Comments
     
    LVL 79

    Accepted Solution

    by:
    >My question is, can you have multiple DHCP services running on the same router, one for each subnet? If so, will each subnet get the correct IP Address asigned to it.

    Yes, absolutely...

    ip dhcp pool VLAN4
       network 172.16.x.0 255.255.255.0
       domain-name <tcs192>
       dns-server 216.x.x.x 216.xx.x
       default-router 172.16.x.x  <== use this router's interface IP for that VLAN
       lease 3

    ip dhcp pool VLAN2
       network 10.10.x.0 255.255.255.0
       domain-name <tcs192>
       dns-server 216.x.x.x 216.xx.x
       default-router 10.10.x.x  <== use this router's interface IP for that VLAN
       lease 3
    0
     

    Author Comment

    by:orbix
    lrmoore, thanks for the information.  I see you have
    default-router 172.16.x.x  <== use this router's interface IP for that VLAN
    listing the IP for the routers int for the subnet.
    In the config I posted, I have the default-router as
    default-router 66.x.86.x <=== IP of default gateway/route to the outside/ISP.
    If I understand this correctly, I should change that to the routers IP for the VLAN INT,
    and the routers gateway of last resort will handle routeing to the outside world/ISP.
    I do have NAT configured for both the public, and private IP's.

    !
    ip dhcp pool tcs192
       network 192.168.3.0 255.255.255.0
       domain-name tcs192
       dns-server 216.x.x.x 216.xx.x
       default-router 66.x.86.x
       lease 3
    !
    0
     
    LVL 79

    Expert Comment

    by:lrmoore

    Absolutely, you should change the scope that you already have to reflect the vlan interface IP as the clients' gateway. The default gateway must be on the same subnet as the client.
    Having the default gateway of the router itself pointing to the public ip 66.xx.86.x is all you need

    0
     

    Author Comment

    by:orbix
    Again, thanks for all your help.
    One last question, with regard to excluded address, I take it you just add as many lines as needed for the differnet subnets?

    !
    ip dhcp excluded-address 192.168.3.1 192.168.3.19
    ip dhcp excluded-address 192.168.3.250 192.168.3.254
    !
    ip dhcp excluded-address 172.31.3.1 172.31.3.19
    ip dhcp excluded-address 172.31.3.250 172.31.3.254
    !

    etc...
    0
     
    LVL 79

    Expert Comment

    by:lrmoore
    You got it...

    -Cheers!
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Course: From Zero to Hero with Nodejs & MongoDB

    Interested in Node.js, but don't know where to start or how to learn it properly? Confused about how the MEAN stack pieces of MongoDB, Expressjs, Angularjs, and Nodejs fit together? Or how it's even possible to run JavaScript outside of the browser?

    We've been using the Cisco/Linksys RV042 for years as: - an internet Gateway - a site-to-site VPN device - a leased line site-to-site subnet-to-subnet interface (And, here I'm assuming that any RV0xx behaves the same way as an RV042.  So that's …
    Problem Description:   Couple of months ago we upgraded the ADSL line at our branch office from Home to Business line. The purpose of transforming the service to have static public IP’s. We were in need for public IP’s to publish our web resour…
    After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
    After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

    877 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now