Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DHCP with multiple subnets

Posted on 2013-11-13
8
Medium Priority
?
430 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 17

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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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
 

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 17

Accepted Solution

by:
vivigatt earned 2000 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 17

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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

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!
In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

661 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