DHCP and default gateway

Posted on 1997-07-14
Last Modified: 2013-12-23
I am marking this question as easy because I suspect that this must happen to almost everyone who has ever tried to set up DHCP on an NT network. I installed DHCP server on my NT 4.0 (SP 1) Server and my workstations can get an IP address just fine. However, they lose their default gateway setting! So with DHCP, I can't get off of the segment I'm on until I remove DHCP and set the ip address manually. Then the default gateway setting comes back and I am fine.

How do I get to keep a default gateway with DHCP?
Question by:johnsm
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
  • 4
  • 3

Expert Comment

ID: 1561979
Is your default gateway the same for all computers? If so, you can define it in DHCP.

Author Comment

ID: 1561980
Well, I will be using DHCP for multiple subnets across routers eventually. But right now I'm just trying to get it working on
then one subnet I am on now.

How do I define it in DHCP?

Accepted Solution

cer earned 50 total points
ID: 1561981
IP adress, subnet mask and gateway are submitted by the dhcp server. The default-gateway you enter in the TCP/IP options of the dhcp server is used. The DHCP server must have fixed entrys. Therefore the default gateway computer must have a fixed or reserved IP-adress.
This works if client and server reside in one subnet. If client is in another subnet it can not reach the dhcp server. In every subnet without a dhcp server you need a dhcp or bootp relay agent (this is a service which has to be installed). This is a server or workstation computer which passes the data on to the dhcp server. normaly you would install it on the router or gateway. This is not necessary if your router is RFC1542 compatible.
I belive the relay agent supplies the default gateway.
You can not have more than one gateway, so WS1 in Subnet1 goes to gate1 and WS2 in Subnet1 goes to gate2 is not possible if they both use the same dhcp server.

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 1561982
Maybe I am wrong and you must/can configure the gateway in the DHCP manager by setting the "Options". Option #3 is IP-adress of the router. In the manager you can define groups of computer belonging to one subnet and give every group different options.

Author Comment

ID: 1561983
cer, thanks for the try.

You are not exactly right on a couple of points so I am going to clarify that here so that others who see this question (and answer) in the future will not be confused. However, you did cause me to look in the right direction so I am giving you the points anyway.

You said 'the default gateway settings you set in the TCPIP options of the DHCP server are used.' This is not true. This setting is not passed to the client.

You said 'i believe the relay agent supplies the default gateway' for WANS. This is not true either. Usually routers are used as relay agents and none that I know of can handle this assignment.

You said 'you can not have more than one gateway'. This is not true either. You can have many gateways.

The comment you added to the end, however, is correct. Unfortunatly the comment will not be included with this answer when it gets posted, so I will state it again here.

In the DHCP manager there is a menu choice called options. Once you have set up a scope, you can highlight the scope, go into options, chose scope, and select the options you want to set for that particular scope. Option #003 is router. This is what gets passed as the default gateway to the client on that particular scope. It can be different for each scope, allowing you to have multiple gateways for multiple scopes.


Expert Comment

ID: 1561984
Yes you are right. I gave the wrong answer at first, then (after looking in the server resourcekit) I corrected it with the following comment. However I forget to correct the statement about the number of gateways possible.
Out of my answere, my comment and your comment we could form a new answere. But this is not possible and not necessary since other people can read the answer and ALL comments.


Author Comment

ID: 1561985
When this question moves to the 'previously answered questions' section, the comments will go away.

Expert Comment

ID: 1561986
No, it's already there. The very first line of this page reads:

Here's the Previously Asked Question you requested...

I have all comments. If you don't see all comments, try reloading . If this not help write to to tell them about a bug.

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…

751 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