Sorry, forgot to attach the code!
Main Topics
Browse All TopicsI 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.
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.
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.
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.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
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.
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
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?
>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.
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.
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
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
!
!
!
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
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
Business Accounts
Answer for Membership
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.