Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One DHCP server but two networks to serve.

Status
Not open for further replies.

outonalimb

Technical User
Oct 7, 2003
454
GB
We have two building sites on two separate networks that are connected via a Layer 3 switch. On one site (192.168.1.x) we have a DHCP server (Windows 2003) that gives out address to clients. On the other site (192.168.2.x) we have manually given all the PC's static IP addresses as we don't have a DHCP server.

Is is it possible to use our existing DHCP server to give out addresses on both sites without having to invest in another server?

Any help or advice on how to do this would be really appreciated.
 
Are they two separate domains? If yes, do you have a trust setup between them? If they're all the same domain, then the one DHCP server can handle requests for both buildings.

I'm Certifiable, not cert-ified.
It just means my answers are from experience, not a book.

There are no more PDC's! There are DC's with FSMO roles!
 
piggybacking on Dave's reply, as long as they are in the same domain on your layer-3 switch you'll want to configure the SVI that building 2 is in with a DHCP Relay (aka helper) address. For Cisco devices the command is entered in interface configuration mode:
Code:
Router(config)# int vlan <vlan_number_for_building_2>
Router(config-if)# ip helper-address <dhcp_server_ip>
Of course you'll need to adapt the above to your switch platform if you're not using Cisco. Also, be sure to have the DHCP scope configured for building 2


I hate all Uppercase... I don't want my groups to seem angry at me all the time! =)
- ColdFlame (vbscript forum)
 
Thanks for the replies so far. Just so I know, how does the DHCP server on know how to give 192.168.1.x to one network and 192.168.2.x to the other. I can imagine a scenario of PC's randomly getting an IP address in the wrong subnet and not being able to connect to the network.

Sorry if I sound dumb regarding this.
 
Are they two separate domains? If yes, do you have a trust setup between them? If they're all the same domain, then the one DHCP server can handle requests for both buildings.

Perhaps if you could answer our questions first we could then answer your questions.

I'm Certifiable, not cert-ified.
It just means my answers are from experience, not a book.

There are no more PDC's! There are DC's with FSMO roles!
 
DHCP is free and doesn't require a "server" per se. Most routers support DHCP services, so you can just configure it to give out DHCP at the other site.
 
outonalimb, there is an attribute called GiAddr (Gateway IP Address) that is set by the relay agent as part of the DHCP Discover phase of DHCP negoation. When the DHCP server receives this it knows which scope to offer IP's from. Here's a textbook explanation from Microsoft:
A relay agent that conforms to RFC 1542 relays DHCP packets to the remote side even though they are broadcast packets. Before relaying a DHCP message from a DHCP client, the agent examines the GIADDR (gateway IP address) field. If the field has an IP address of 0.0.0.0, the agent fills it with the router's IP address. When the DHCP server receives the message, it examines the Relay IP Address field to see if it has a DHCP scope (a pool of IP addresses) that can be used to supply an IP address lease. If the DHCP server has multiple DHCP scopes, the address in the Relay IP Address field identifies the DHCP scope from which to offer an IP address lease. This process allows one DHCP server to manage different scopes for subnets.

I hate all Uppercase... I don't want my groups to seem angry at me all the time! =)
- ColdFlame (vbscript forum)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top