PDA

View Full Version : How to configure "route delete" and "route add"



albikrmldm
07-13-2015,
I would like to configure a route delete and route add.

from command prompt we type: route print

this gives us the gateway number

I think a route delete command should be "route delete" then 0.0.0.0 then the gateway number

advice on whether this is right and on how to do the "route add" configuration would be appreciated.

AldPokHads
07-14-2015,
I am a little shaky about the terminology, esp the word, static.

So what I would be doing is adding or deleting a "static" route.

If I am on a vpn and the vpn server goes down, if the native route is deleted the internet connection will not shift back to the native server. Instead there will be no internet connection.

Then I can add the native server again with the "route add" command.

Do I have this right?

A second confusion I have is which number to input. I was told previously that a route delete command should have 0.0.0.0 then the gateway number. But the article you have linked me to indicates it is the destination number.

Are these two different types of route deletes? Do they perform different functions?

Screenshot:

https://www.sendspace.com/file/uzl8u2

alcgzfdwji
07-14-2015,
There are 3 separate articles, I apologize I only linked to the Route add option.


View Ip Routing Table (https://technet.microsoft.com/en-us/library/cc783616(v=ws.10).aspx) (This one you know Already)
Add Static IP Route (https://technet.microsoft.com/en-us/library/cc757323(v=ws.10).aspx)
Remove Static IP Route (https://technet.microsoft.com/en-us/library/cc739598(v=ws.10).aspx)

In your example screen shot: To delete the network destination 0.0.0.0 you type route delete 0.0.0.0 the gateway number can be omitted. To add a type route add 0.0.0.0 mask 0.0.0.0 192.168.9.1 interface 192.168.9.115.

Edited by Sneakycyber, 20 April 2015 - 09:12 AM.

Chad Mockensturm
Systems Administrator, Windows Server 2008R2, Windows Server 2012
Certified CompTia Network +, A +

albinaCak
07-14-2015,
Sneakycyber, on 19 Apr 2015 - 10:09 PM, said:http://www.bleepingcomputer.com/forums/public/style_images/master/snapback.png (http://www.bleepingcomputer.com/forums/index.php?app=forums&module=forums&section=findpost&pid=3684936)

There are 3 separate articles, I apologize I only linked to the Route add option.


View Ip Routing Table (https://technet.microsoft.com/en-us/library/cc783616(v=ws.10).aspx) (This one you know Already)
Add Static IP Route (https://technet.microsoft.com/en-us/library/cc757323(v=ws.10).aspx)
Remove Static IP Route (https://technet.microsoft.com/en-us/library/cc739598(v=ws.10).aspx)

In your example screen shot: To delete the network destination 0.0.0.0 you type route delete 0.0.0.0 the gateway number can be omitted. To add a type route add 0.0.0.0 mask 0.0.0.0 192.168.9.1 interface 192.168.9.115. When adding the network destination 0.0.0.0


Am I correct that you must do the route delete every time you want to delete the native IP,

but that you only need to do the route add once and it automatically returns to the native IP route when you leave the alternative server?

P.S. is there something missing from your last sentence: "When adding the network destination 0.0.0.0 ...."?

Alejandrotage
07-15-2015,
http://www.bleepingcomputer.com/forums/public/style_emoticons/default/ohmy.png Sorry about the missing line I must have been mid sentence when I got distracted, I edited the post. I will post more Later when I Get back to my Home Office


Chad Mockensturm
Systems Administrator, Windows Server 2008R2, Windows Server 2012
Certified CompTia Network +, A +

alejandrale3
07-15-2015,
In this case you will need to remove defaut the route the vpn adds and then add your networks default route back Each time the problem happens.

Chad Mockensturm
Systems Administrator, Windows Server 2008R2, Windows Server 2012
Certified CompTia Network +, A +

admin
07-16-2015,
Sneakycyber, on 21 Apr 2015 - 04:50 AM, said:http://www.bleepingcomputer.com/forums/public/style_images/master/snapback.png (http://www.bleepingcomputer.com/forums/index.php?app=forums&module=forums&section=findpost&pid=3686115)

In this case you will need to remove defaut the route the vpn adds and then add your networks default route back Each time the problem happens.

so whenever I use vpn I must delete the native route.

then when I return to the native route, I add back the native route.