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

x
?
Solved

Eliminate a default route received by a Dhcp server

Posted on 2004-04-21
4
Medium Priority
?
258 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
[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
  • 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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…
In this article, I’ll show how research, determination, and use of modern technology helped me solve a DNA mystery.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

730 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