I'm trying to configure routing on my test machine to pass all traffic via the network errors simulator (WANem).
WANem runs in a virtual machine, in the same network with internet gateway. It has NAT enabled (nat add eth0
). The test machine (the client) is using Windows. On the test machine I'm executing this:
route /f
route add 0.0.0.0 mask 0.0.0.0 <WANem_IP> -p
Than I run tracert
to check that traffic goes via WANem, and everything seems ok. However, after making a few test on the test machine I see that tracert
doesn't show as the first hop. And route print
shows that route via real internet gateway (192.168.1.1 in my case) is added, which was not present before.
So, traffic bypasses my WANem gateway. Any ideas why this happens, and how to avoid this?
UPD my routes after I've finished my setup
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.82 192.168.1.61 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 192.168.1.61 192.168.1.61 10
192.168.1.61 255.255.255.255 127.0.0.1 127.0.0.1 10
192.168.1.255 255.255.255.255 192.168.1.61 192.168.1.61 10
224.0.0.0 240.0.0.0 192.168.1.61 192.168.1.61 10
255.255.255.255 255.255.255.255 192.168.1.61 192.168.1.61 1
Default Gateway: 192.168.1.82
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
0.0.0.0 0.0.0.0 192.168.1.68 1