Solved

DHCP with multiple subnets

Posted on 2013-11-13
8
412 Views
Last Modified: 2013-11-15
Is it possible to set up a DHCP server in a network and have it be able to differentiate between different subnets?  These subnets will not be separated by router or anything, they are all on the same switch.  When I plug in a new device how will the DHCP server know which subnet I want it on?
0
Comment
Question by:fallriverelectric
  • 3
  • 3
  • 2
8 Comments
 
LVL 12

Expert Comment

by:piattnd
ID: 39645360
You would need something like an IP-Helper as described here:

http://cisconet.com/tcpip/dhcp/107-how-to-use-ip-helper-address-to-connect-remote-dhcp-server.html

This allows computers on a different subnet than the DHCP server to receive an address.

You have to have a layer 3 device somewhere to route data in between the subnets though.
0
 
LVL 16

Expert Comment

by:vivigatt
ID: 39648632
There is no possibility to differentiate between subnets if the subnets are not routed... an IP-Helper will not help, since this is used to forward DHCPDISCOVER packets (sent to local broadcast) to a DHCP server on another subnet, and it involves routing: a DHCP relay can only be set on a router (or layer-3 switch)
You have to understand that, before a DHCP client gets a full IP config via DHCP, it has no IP address. So it sends a request to "broadcast" address to get one IP address. The DHCP server assigns an IP address in the range that it is configured to use and, without DHCP-Relay; this range must be in the subnet of the IP address used by the DHCP server network card.
A DHCP server would NOT know which subnet to use when it receive a "DHCP Request" packet from a client.

One thing you may explore would be to use DHCP reservations (assign a unique IP address based on the client's MAC address), but this would require one entry per client node (and I am not sure it will work with different subnets/scopes, but I can very easily validate that on a Windows DHCP server if you want me to explore this lead)
0
 

Author Comment

by:fallriverelectric
ID: 39648659
The subnets are separated physically, and are connected via a direct fibre channel.  The switch port that connects the remote office (192.168.113.x) to the headquarters office (192.168.0.x) is specifically allowing the 113 vlan.  Would that make a difference?  Give the DHCP server some indication of where it's being requested from?
0
 
LVL 12

Expert Comment

by:piattnd
ID: 39648705
As vivigatt said (that I did not elaborate), you likely have a layer 3 device (layer 3 switch or router) in place somewhere, or the subnets couldn't talk to anyone outside of themselves, including a single DHCP server.

If you don't have a layer 3 device, you cannot accomplish what you're talking about.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:fallriverelectric
ID: 39648765
The switch I mentioned is layer 3, and the subnets are currently talking to each other.  I just don't know how to introduce DHCP to my current scenario.
0
 
LVL 16

Accepted Solution

by:
vivigatt earned 500 total points
ID: 39649139
OK, then you have:
- 2 subnets
- a routing device (your layer 3 switch)
- a working route between your two subnets.

So what you need is, on the routing device, to add a DHCP relay (ip-helper in Cisco wording, that HP ProCurve uses too). This has to be added for the subnet that does NOT have a DHCP server so that DHCP packets sent to broadcast address on that subnet are detected and forwarded to the DHCP server on the other subnet.
When you have set your DHCP relay agent, create a scope on the DHCP server within the "remote" subnet, and voilà !
This works because when forwarding the broadcast packets from remote subnet, the DHCP relay agent fills the "relay ip address" (GIADDRR, aka Gateway IP Address) with its own IP address (on the remote subnet side).  The DHCP server then know it has to assign an IP address in the scope corresponding to GIADDR.

Configuring the dhcp relay on the routing device depends on the routing device. Tell us what switch you have, we should be able to find the commands for enabling the dhcp relay on it.

You will find some details in these links:
http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#DHCP_relaying
http://technet.microsoft.com/en-us/library/cc758865%28v=ws.10%29.aspx
http://technet.microsoft.com/en-us/library/cc771390.aspx
0
 

Author Comment

by:fallriverelectric
ID: 39649161
Thanks, I will give that a try.  It's a stack of Cisco 3750-E switches.
0
 
LVL 16

Expert Comment

by:vivigatt
ID: 39649200
The commands should be something such as (when in config mode):
switchname#interface vlan 113
switchname#ip helper-address 192.168.0.10

(assuming your DHCP server IP addres is 192.168.0.10)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Server 2008 DHCP replication 12 65
Project Plan to change subnet mask 6 81
2012R2 DHCP cluster 2 37
small, multi network, problem 3 82
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
Messaging apps are amazing tools with the power to do a lot of good, but the truth is the process of collaborating with coworkers requires relationships established through meaningful communication - the kind of communication that only happens face-…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

912 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

17 Experts available now in Live!

Get 1:1 Help Now