Removing all routes based on interface.
I admit defeat, my bing-fu has failed me. I'm trying to write some scripts to do some custom routes. I'm dealing with a test environment and need to switch the routes around often. Ideally I'd like to flush the table and start from scratch but I was having some issues with the routes related to the loopback interface. (after re-adding the routes pinging the loopback address results in ""General Failure" messages) So instead I'd like to remove the routes based on interface but I can't find any solutions in this regard. Can anyone point me in the right direction? I'd rather not just start removing routes that aren't there. On another note the help page for route.exe seems to contradict itself. Bizzare All symbolic names used for destination are looked up in the network database file NETWORKS. The symbolic names for gateway are looked up in the host name database file HOSTS. If the command is PRINT or DELETE . Destination or gateway can be a wildcard, (wildcard is specified as a star '*'), or the gateway argument may be omitted. If Dest contains a * or ?, it is treated as a shell pattern, and only matching destination routes are printed. The '*' matches any string, and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*. Pattern match is only allowed in PRINT command. Diagnostic Notes: Invalid MASK generates an error, that is when (DEST & MASK) != DEST. Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1 The route addition failed: The specified mask parameter is invalid. (Destination & Mask) != Destination. Thanks! T
February 18th, 2010 11:49pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics