Solved

Eliminate a default route received by a Dhcp server

Posted on 2004-04-21
4
234 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 250 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

If you thought ransomware was bad, think again! Doxware has the potential to be even more damaging.
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
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 https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

810 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