Solved

Eliminate a default route received by a Dhcp server

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

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…
Note: This is the third blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   We’ve been talki…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

930 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now