Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Eliminate a default route received by a Dhcp server

Posted on 2004-04-21
4
Medium Priority
?
267 Views
Last Modified: 2010-04-13
Hi,

I have a Pc running Win2k advance server sp4 with 2 Ip interfaces connected to 2 different networks (Net1 and Net2) and the Pc acts as Dhcp client.
There are Dhcp servers in both networks, each of them releasing the Ip address, netmask and default router.
After connecting both cables both Dhcp server "inject" a default route, so in the Pc the routing table is as follows:

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      10.210.13.1   10.210.13.150       1           (Net1 side)
          0.0.0.0          0.0.0.0      192.168.1.1   192.168.1.56       1           (Net2 side)

My need is to delete the second default route after the Dhcp server release it and without touching the Dhcp server configuration (becasue in use by other users and administered by another department). I will add some specific routes with "route -p" to reach the desired portions of the network on Net2 side instead, so that the final desired routing table will appear as follows:

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      10.210.13.1   10.210.13.150       1           (Net1 side)
          10.1.1.0          255.255.255.0      192.168.1.1   192.168.1.56       1           (Net2 side)
          10.1.2.0          255.255.255.0      192.168.1.1   192.168.1.56       1           (Net2 side)

Note that this configuration has to survive a reboot, of course.

To summarize: The Dhcp server on Net2 side injects a default route that I don't want, my need is either do not receive it or eliminate it, working on the Dhcp client only.
Any idea?

Thank you in advance!
Best regards.
Diego.
0
Comment
Question by:Diego Balgera
  • 2
  • 2
4 Comments
 
LVL 25

Accepted Solution

by:
mikeleebrla earned 750 total points
ID: 10878028
just do a route delete 1.2.3.4 ,,,, you can add this to a login script so it will survive a reeboot or new lease
0
 

Author Comment

by:Diego Balgera
ID: 10878712
Hi Mikeleebrla,
thank you for your answer.

The problem now is: if I add the "route delete" command to a login script, this will be executed when the corresponding user logs in. This means that, until no user logs in, the undesired default route won't disappear.
How could be possible to execute such command when the machine boots, of course after the interface is configured, but with no user login?

Thank you.
Diego.
0
 
LVL 25

Expert Comment

by:mikeleebrla
ID: 10878726
then make it a startup script
0
 

Author Comment

by:Diego Balgera
ID: 10986919
Hi Mike,

this solution works and it is quite close to what I need to reach.
The only surviving problem is: the route is deleted every time the Pc is rebooted, but in case the lease is renewed for whatever reason (i.e., cable detached and reattached), the Pc still has 2 default routes in the routing table.
Any idea to solve this last part of the problem? Any possibility to execute a batch file to delete the route every time the Dhcp lease occurs?

Thank you again!
Diego.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
If you have come across a situation where you need to find some EDB mailbox recovery techniques, then here you will find the same. In this article, we will take you through three techniques using which you will be able to perform EDB recovery. You …
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

885 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