Solved

DHCP with multiple subnets

Posted on 2013-11-13
8
425 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 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
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.

 
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 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Ever wondered why you had to use DHCP options (dhcp opt 60, 66 or 67) in order to use PXE? Well, you don't!
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

623 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