I am connected via Ethernet (10.1.1.1, interface 11) as well as via Wireless LAN (172.22.12.1, interface 12). I trying to route just a certain host (140.239.191.10 - which is whatismyipaddress.com for testing purposes) via the wlan instead of the Ethernet card (which has the higher metric).
Let me give you my routing details:
Network Destination | Netmask | Gateway | Interface | Metric
0.0.0.0 | 0.0.0.0 | 10.1.1.1 | 10.1.10.149 | 10
0.0.0.0 | 0.0.0.0 | 172.22.12.1 | 172.22.12.110 | 20
Now I tried the following:
route add 140.239.191.10 mask 255.255.255.255 172.22.12.1 metric 1 if 12
and I get this addition to the route table
140.239.191.10 | 255.255.255.255 | 172.22.12.1 | 172.22.12.110 | 31
And here lies the problem I think: The route is automatically assigned a metric of 31 and hence the traffic is not routed via my wlan interface, but via the ethernet (because of the lower metric). When surfing to the IP I still see the public IP address of my ethernet adapter and not the public IP address of the WLAN adapter (which are entire different networks - local DSL and UMTS).
I do not want to give the wlan the lower metric because I generally want to use the ethernet interface for all network traffic (it is faster and I can access my internal network shares) - I only want to route a single IP via the WLAN adapter.
Any suggestions appreciated!
Dennis
Well I am doing exactly the same and Windows 8 insists in using the "LAN" gateway... instead of the "WLAN" gateway.
So, not sure is Windows is "capricious" :) or not; but I guess this command should be straight forward to use.
Tried several combinations, like not using the specific IF for WLAN or setting a lower METRIC or using a MASK for ...108.142.0. Always the same result; it apparently gets ignored.
route ADD 93.108.142.151 10.30.94.1 IF 13
(where 10.30.94.1 if the WLAN gateway)After the command is given a route print and a
tracert
returnshmm - it seems to be working now without me changing anything (I actually went to get a coffee). Maybe windows takes some time to use the new settings?
Would I have to do a ipconfig /renew or something so the settings are used immediately?
Try to turn off the Automatic Metrics of the Ethernet and WLAN connection. the automatic metrix will override the priority here.