0

I have a Windows client which has two NICs. One of these has an IP 172...* and the other has 192...* When my ethernet which has 192...* IP address goes down, all the traffic related to this ethernet (destined 192...) trying to goes through the other ethernet which has 172... IP and these traffic consumes bandwidth of this ethernet. I want to disallow the traffic to go through over the other ethernet. How can i achieve that?

1 Answers1

0

You can remove 172.x.x.x network from default route

route delete 0.0.0.0 172.x.x.x

If you want your route tables will survive on reboot add -p option to route command

more on routing you can find on official Microsoft site:

P.S. According to your needs you described in comment: If you want to prevent traffic to 192. net over 172. when 192. local interface down, then you need to monitor routing table (there is event in task scheduler you can catch when 192. is down) or via WMI requests that you can run over scheduler too, let say run check interface status every 5 minutes. If 192. went down assign route to 192. network via 172. over null route or non existent gateway (in a range of 172. IPs )and remove it when 192 come up again. Here and there you can get some clue how to script it.

Alex
  • 6,375