General discussion

Locked

Permanently remove a standard route

By bowieb ·
I have an IP address on one of my network adapters, but I do not want a route to it.

I can manually remove the route, but whenever I reboot, NT adds it back in.

Is there any way that I can permanently remove this route? If not, can I put the command to delete it somewhere where it will run whenever the computer reboots (This would need to happen before login)?

This conversation is currently closed to new comments.

12 total posts (Page 1 of 2)   01 | 02   Next
Thread display: Collapse - | Expand +

All Comments

Collapse -

Permanently remove a standard route

by 4U21DER In reply to Permanently remove a stan ...

The commmand is:

' route DELETE '

( ie .. route delete 192* ) Removes all 192 network routes

Or you can specify the exact route.

( ie .. route delete 192.168.100.0 )


Hope this helps.


Good Luck!

Collapse -

Permanently remove a standard route

by bowieb In reply to Permanently remove a stan ...

This command works just fine...until I reboot and then the route reappears. I need a way to either make it permanent or to automatically run the command every time the system reboots.

Collapse -

Permanently remove a standard route

by 4U21DER In reply to Permanently remove a stan ...

OK,

Try to add a ' -p ' after the delete command. This is normally used to make a route persistent.

Hope this one helps.....

Collapse -

Permanently remove a standard route

by bowieb In reply to Permanently remove a stan ...

The '-p' flag is only for adding routes. All other commands are permanent by default. I tried it anyway and verified that the route still came back on reboot.

Collapse -

Permanently remove a standard route

by Some Guy in Seattle In reply to Permanently remove a stan ...

If I understand your statement correctly, you have an IP address that you want to keep, but you don't want a route *to* it?

If this is the case then there's nothing that can be done permanently since TCP/IP will assign all the related routes automatically. For example, if your address is 10.1.1.1/16 then when you do a "netstat -r" you will get a routing table that involves permutations of this subnet and IP. This is all internal to the machine's TCP/IP stack.

To have a semi-workaround, you might want to try adding a script or batch file with the route delete command and run that after boot, but this will have to be done every time it boots, or (if on DHCP) after it acquires an address.

Hope that helps,

Collapse -

Permanently remove a standard route

by bowieb In reply to Permanently remove a stan ...

Exactly. For 10.1.1.1/16, I get:
Network Address Netmask Gateway Address Interface Metric
10.1.0.0 255.255.0.0 10.1.1.1 10.1.1.1 1

(I hope that comes out readable)

Running a script to delete this route would be an acceptable solution, but I need to know how to make it run before login.

Collapse -

Permanently remove a standard route

by dlongan In reply to Permanently remove a stan ...

Use the following technet article Q270035 to show how to get a program to run during system startup. Create a batch file and have it execute during startup.

Collapse -

Permanently remove a standard route

by bowieb In reply to Permanently remove a stan ...

This causes the program to run at login. I need the program to run before login.

Collapse -

Permanently remove a standard route

by Ian Mclaws In reply to Permanently remove a stan ...

I have to ask......Why do you not want the system to be able to connect to itself? (Your local routing table has absolutely nothing to do with other users abilities to connect to you.)

Just curious,

Ian

Collapse -

Permanently remove a standard route

by bowieb In reply to Permanently remove a stan ...

I am using Linux Virtual Server to create a web farm. The virtual IP address for the web farm is installed on the loopback adapter of each server so that the system will accept packets for that address. But it obviously doesn't work if it tries to reply through the loopback adapter, so I need to kill the route that points to the loopback adapter.

My local routing table controls how the reply packets are routed back to the other users. If I can't get back to them, it doesn't matter if they can get to me.

Back to Windows Forum
12 total posts (Page 1 of 2)   01 | 02   Next

Related Discussions

Related Forums