Question

Configuring 2 DHCP scopes, each for a different VLAN

Asked by: touellette83

I have a WAN site which uses a Cisco 2811 Router, with several Cisco 3750 switches for LAN access.

At the site I have 2 VLANs configured..

VLAN 100 = Data  (172.21.10.0 /24)
VLAN 300 - Voice  (192.168.53.0 /24)

I want to configure 2 different DHCP scopes, one to assign the 172.21.10.0 subnet to the devices in the Data VLAN, and another to assign the 192.168.53.0 /24 subnet to devices on the Voice VLAN.

I can configure DHCP on either one of the switches or Router, I don't care either way. I am not sure how to do this properly, any config help would be appreciated..

Thanks,
Tim

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-10-14 at 13:06:12ID23814325
Tags

Cisco

,

Router / Switch

,

2811 / 3750

,

LAN Configuration

,

Cisco, DHCP

Topics

Dynamic Host Configuration Protocol (DHCP)

,

Network Routers

,

Network Switches & Hubs

Participating Experts
3
Points
500
Comments
16

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. dhcp for vlans
    Hi, I have cisco 4503 and I'm planning to setup about 25 vlans. Should this switch be able to forward dhcp packets or will I need a dhcp server for each vlan? Thanks, Donnie
  2. DHCP and VLAN's
    Hi, I was just wondering how different VLANS acquire different IP addresses. I have a network with three different VLANS. Let’s call them vlan 1, 2 and 3. My DHCP server has three corresponding scopes. 10.1.x.x 10.2.x.x 10.3.x.x. How does the DHCP server know to give com...
  3. DHCP and VLAN
    I have a question regarding VLANs and DHCP One switch with tthree VALN. Let say VLAN 10, VLAN 20 and VALN30 IP address 10.10.10.x, 20.20.20.x and 30.30.30.x respectively One Windows 2003 server with one NIC with three logical interface configured with above network scheme att...
  4. DHCP and VLAN
    Dear all, I have DHCP installed on windows 2003. We make VLAN in our network. Network engineers ask me to make different scopes (15 Scopes) in the DHCP. I made those scopes. But now how does the DHCP will understand the request comes from which VLAN and it should take an IP ...
  5. DHCP over VLAN
    We are moving router based DHCP to server based DHCP, where E0/0 ethernet port has two data subnet. E0/1 has different voice network. We want to move second data network to E0/1 so that each data network has ip-helpers, the voice network on E0/1 can go secondary. (This is bei...
  6. VLAN with DHCP
    Hi, Is it possible for one DHCP server to serve multiple VLANS with different IP subnets for each VLAN? VLAN1: 192.168.0.0/16 VLAN101: 10.101.2.1/24 VLAN102: 10.101.3.1/24 How does it work?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: btassurePosted on 2008-10-14 at 14:49:09ID: 22716355

If you configure on the router you can do the following assuming that the router has interfaces or subinterfaces directly connected to the vlans in question. The router will detect the interface on which the dhcp request was received and respond with the corresponding pool.
If the router is at least one hop away from the vlan and can't receive the broadcast then on the router to which the vlan IS connected you would need to put in an ip helper:
ip helper-address [ip of the dhcp server] and it will again use the source address to determine the pool to use.

 

by: btassurePosted on 2008-10-14 at 14:50:36ID: 22716364

Sorry, forgot to attach the code!

ip dhcp pool data
   network 172.21.10.0 255.255.255.0
   default-router [router ip]
   dns-server [dns ip]
!
ip dhcp pool voice
   network 192.168.53.0 255.255.255.0
   default-router [router ip]
   dns-server [dns ip]

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:

Select allOpen in new window

 

by: donjohnstonPosted on 2008-10-14 at 14:55:56ID: 22716407

You're also going to need to exclude the addresses for the default-router in each pool. And any other addresses you don't want allocated.

ip dhcp excluded-address <start> <end>

                                              
1:

Select allOpen in new window

 

by: btassurePosted on 2008-10-14 at 15:25:39ID: 22716614

Doesn't the router automatically exclude itself? It must know it is using that address?
Please correct me if I'm wrong as I use this setup at home and it might actually explain a problem or two I have been having... :o)

 

by: donjohnstonPosted on 2008-10-14 at 15:57:38ID: 22716778

No, the router doesn't "know" anything that you don't tell it. ;-)

I've never tried it without excluding itself. All the documentation I've read always show an exclude of it's own address.

 

by: touellette83Posted on 2008-10-14 at 16:05:49ID: 22716815

Thanks,

I will give it a shot tomorrow, I was not aware that the Router would be able to make a decision based on which interface/vlan the request comes from. That makes my life easy...

In my past experience you do need to exclude the Gateway IP, generally I leave 1-99 for Static IP's anyway, things like printers, WAPs etc...

Anyway, I will let you know how it goes, thanks again.

-Tim

 

by: btassurePosted on 2008-10-15 at 03:33:40ID: 22719402

Cool. I'll take a look at my config as well then. DHCP is pretty clever with the source addressing. Took me hours of reading and testing to prove to myself that was how it worked as I couldn't get my ehad around how it knew which scope to use. :o)

 

by: touellette83Posted on 2008-10-16 at 12:12:52ID: 22734690

So far it works like a charm. I have subinterfaces on the router for each vlan with 2 different DHCP pools. The router recognizes which VLAN the request is comming from and assigns the correct subnet.

Now to make things more complex....

Consider this scenario...

I have my switch configured with the same 2 vlan's mentioned above, but now I have 1 (or multiple ports) of the switch configured to access both the VOIP and Data VLAN.

With this scenario I have one cable running from the switch port into the VOIP phone, then from the VOIP phone another cable hitting a PC.

PC accesses the DATA VLAN, and the phone access the VOIP VLAN.

My understanding of how this works is that the Phone is configured to access vlan 300 and passes everything else (in this scenario vlan 100).

I guess my question is, will the same config work in this scenario and still assign the PC the Data subnet, and the Phone the VOIP Subnet?

Here is an example of how the switch ports would be configured in the above scenario...
 
interface FastEthernet1/0/1
 description UPLINK TO ROUTER
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 100,300
 switchport mode trunk
!
interface FastEthernet1/0/2
 description Avaya_G700_8300_Gateway
 switchport access vlan 300
 speed 100
 duplex full
 down-when-looped
 spanning-tree portfast
!
interface FastEthernet1/0/3
 description SET FOR IP PHONES WITH DATA VLAN PASSTHROUGH
 switchport access vlan 100
 switchport mode access
 switchport voice vlan 300
 spanning-tree portfast
!
interface FastEthernet1/0/4
 description SET FOR IP PHONES WITH DATA VLAN PASSTHROUGH
 switchport access vlan 100
 switchport mode access
 switchport voice vlan 300
 spanning-tree portfast

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:

Select allOpen in new window

 

by: donjohnstonPosted on 2008-10-16 at 13:05:59ID: 22735196

>I guess my question is, will the same config work in this scenario and still assign the PC the Data subnet, and the Phone the VOIP Subnet?

Yes. The phone is essentially a 3 port switch. One port goes to the phone, one goes to the PC and the third port is a trunk to the switch.

So any traffic received from the PC is coming from whatever VLAN is identified with the "... access VLAN..." command and any traffic coming from the phone is coming from whatever VLAN is identified with the "... voice VLAN ..." command.

 

by: touellette83Posted on 2008-10-16 at 13:18:29ID: 31506061

Thanks for the help guy's

This works out well, with this config I can cut my need for switch ports in half at my VOIP sites, saves a few $$$

 

by: rsharmatglnPosted on 2009-07-02 at 09:09:28ID: 24764868

Hi,

We have somewhat similar setup.

- 3 stacked switches: 2 access (Ports connected to VOIP phones and then chained to PC)  and 1 distribution switch with all servers including DHCP.
- 2 Vlans: for Voice and Data
- routing is enabled between vlans and each port on access switch is member of both vlans
- DHCP relay is turned on and on DHCP server we have created 2 scopes with different IP subnets

The issue is How do we configure DHCP to assign IP addresses to PC from one scope and Phones from another?

Thanks.

 

by: rsharmatglnPosted on 2009-07-02 at 09:12:15ID: 24764900

I forgot to mention.. When we turn on the phones they initially get IP from Voice subnet and then drops it and gets an IP from Data subnet and sticks with it. We need to configure it so Phones only get the IP offered from Voice scope and not data. Any suggestions will be helpful. Thanks.

 

by: touellette83Posted on 2009-07-02 at 09:52:42ID: 24765280

I had to use Option 176 in my DHCP scopes to make this work. This allows you to specify the VOIP VLAN and other optiosn the phone might need within with DHCP scope.

The code snipit attached works with Avya. Your VOIP vendor may have some documentation for you on this. (i got the option 176 code I used from Avya directly).

-Tim

p dhcp pool DATA
   network 172.21.6.0 255.255.255.0
   default-router 172.21.6.1
   dns-server 172.16.100.116 172.16.100.117
   domain-name domain.com
   option 176 ascii "L2Q=1,L2QVLAN=300,VLANTEST=0"
!
ip dhcp pool VOIP
   network 192.168.53.0 255.255.255.0
   default-router 192.168.53.1
   option 176 ascii "MCIPADD=192.168.50.22,192.168.50.23,L2QVLAN=300,TFTPSRVR=172.16.100.75"

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:

Select allOpen in new window

 

by: rsharmatglnPosted on 2009-07-05 at 13:26:04ID: 24781207

Thanks touellette83, How do we configure these options on Windows 2003 DHCP? On Cisco switch, all we did was enable DHCP relay. Windows 2003 DHCP does not give me option to configure 176 option.

 

by: rsharmatglnPosted on 2009-07-05 at 13:54:48ID: 24781293

This is the config on our Switch for Vlan1 (Data) and Vlan200 (voice)

interface Vlan1
 ip address 192.168.250.83 255.255.255.0
!
interface Vlan200
 ip address 192.168.100.1 255.255.255.0
 ip helper-address 192.168.250.41
!
!
router rip
 version 2
 network 192.168.100.0
 network 192.168.250.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 Vlan1 192.168.250.16
ip route 192.168.100.0 255.255.255.0 Vlan200
ip route 192.168.250.0 255.255.255.0 Vlan1
ip http server
!
!
!

 

by: touellette83Posted on 2009-07-05 at 18:53:52ID: 24782071

To Add Custom DHCP Options in Windows 2003....
Example would be for my above code on the Cisco...

After Opening DHCP on your server...
1. Right-click on the DHCP server.
2. Choose Predefined Options.
3. Select Add.
  Name: voip_options
  Data type: String
  Code: 176
  Description: IP Phone settings
5. Click OK.
6. Under the "string" you would add...
"MCIPADD=192.168.50.22,192.168.50.23,L2QVLAN=300,TFTPSRVR=172.16.100.75"
7. Save it and make sure the new option is selected in your scope...

*Note:*  My Option 176 settings are specific to Avya Gear. You should check with your vendor for specifics....

-Tim

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...