strong host/multihome/routing confusion

hi,

I have an app that makes multiple tcp connections to a server out on the internet. I am binding the client sockets to addresses of interfaces because I want to be able to specify which interface gets used for which connection. The app is working correctly I believe.

However, I have a windows vista machine, that when it is connected to wireless, and I plug in a 3G stick, the wireless gets knocked out - ie the socket bound to the wireless interface can no longer connect and times out. The 3G works fine, and as soon as I pull the 3G out, the wireless can then connect.

I assume the routing table is getting changed in some way by the 3G stick, but I thought the strong host model of Vista would mean it would work fine.

The wireless is on 192.168.1.73 with gateway to net at 192.168.1.254. Below are the routing tables from "route print" before and after I put the 3g usb stick in.

Please can somebody help me understand what is wrong in the second routing table that stops 192.168.1.73 connecting, even though I have bound to that address with the client socket?

Very many thanks in advance and sorry for the wonky tables.
IPv4 Route Table before 3g stick plugged in
===========================================================================
Active Routes:
Code:
 
Network Destination        Netmask          Gateway       Interface  Metric
0.0.0.0         	0.0.0.0    		192.168.1.254     192.168.1.73     25
127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
192.168.1.0    255.255.255.0         On-link      192.168.1.73    281
192.168.1.73  255.255.255.255         On-link      192.168.1.73    281
192.168.1.255  255.255.255.255         On-link      192.168.1.73    281
224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
224.0.0.0        240.0.0.0         On-link      192.168.1.73    284
255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
255.255.255.255  255.255.255.255         On-link      192.168.1.73    281
 
 
And this is after the 3G stick goes in:
 
IPv4 Route Table
===========================================================================
Active Routes:
Code:
 
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.1.254     192.168.1.73   4250
          0.0.0.0          0.0.0.0         On-link      10.47.27.129     31
          0.0.0.0  255.255.255.255         On-link      10.47.27.129     31
     10.47.27.129  255.255.255.255         On-link      10.47.27.129    286
        127.0.0.0        255.0.0.0         On-link         127.0.0.1   4531
        127.0.0.1  255.255.255.255         On-link         127.0.0.1   4531
  127.255.255.255  255.255.255.255         On-link         127.0.0.1   4531
      192.168.1.0    255.255.255.0         On-link      192.168.1.73   4506
     192.168.1.73  255.255.255.255         On-link      192.168.1.73   4506
    192.168.1.255  255.255.255.255         On-link      192.168.1.73   4506
        224.0.0.0        240.0.0.0         On-link         127.0.0.1   4531
        224.0.0.0        240.0.0.0         On-link      192.168.1.73   4510
        224.0.0.0        240.0.0.0         On-link      10.47.27.129     31
  255.255.255.255  255.255.255.255         On-link         127.0.0.1   4531
  255.255.255.255  255.255.255.255         On-link      192.168.1.73   4506
  255.255.255.255  255.255.255.255         On-link      10.47.27.129    286

Open in new window

fraccy2Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DatedmanCommented:
You're getting two routes to 0.0.0.0/0.0.0.0 which will confuse the machine. :)  That's the route to the Internet. Dunno what the 0.0.0.0/255.255.255.255 does really, I've never seen that but it may kind of screw the wireless connect completely?

Oh holy...I just scrolled it over notice that the 3G stick changes the metric on the other interface to 4250 from 25?  Yikes. Dirty pool.
0
fraccy2Author Commented:
But as I understood it, 192.168.1.73 (the wireless) does have a valid route to 0.0.0.0 with the gateway ( which is my router) 192.168.1.254. So I understand there has to be two routes to 0.0.0.0 but shouldn't it work regardless?

I thought, under normal circumstances, or the weak host model like on XP, that that metric would be used to select the interface, so sure the 3g stick would override the wireless. But I'm using vista, and I've bound to the wireless socket. What part does the metric play here?

I forgot to point out the same app works correctly using ethernet and wireless, and the latencies alone make it clear that the correct interfaces are being used in this case. Perhaps this is because ethernet and wireless are going through the same router..?

0
DatedmanCommented:
No, in my experience you can't have two default gateways and have it work (well?)  First of all your 3G is moving the priority of the other gateway off the chart (metric.)  Second, that 0.0.0.0/255.255.255.255 is weird... but in general no it doesn't work to have two default gateways.

What you *can* do is set a route to a specific address through the wireless.  Should work:
route add x.x.x.x 192.168.1.254
Can make it permanent with -p in the route statement.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

fraccy2Author Commented:
Thats interesting I could automate that I suppose and I do indeed always know the destination ip, I'll give it a quick go and come back with how I got on, thankyou...
0
DatedmanCommented:
I have two NICs in this machine works great setting static routes to certain destinations.

Also you probably have software installed for the 3G that may be configurable but hopefully the static route will work in any case.
0
pgolding00Commented:
its the low (lower) metric on the new default route thats killing the wireless interface when 3g is connected. its ok to have multiple routes to the same destination, but if the metrics are different then the lowest number will be used. if the metrics are the same, some os's will load balance, the ms ones mostly just get all confused.
0
DatedmanCommented:
Actually it seems the 3g is killing the metric on the OLD default route, bad behavior IMO. :)
0
pgolding00Commented:
agreed, very bad. and its not just increasing them by a little but, its a huge jump.
0
fraccy2Author Commented:
Thank you for your help, it has at least helped me understand what was wrong. My belief that a strong host model was the only thing I needed was clearly mistaken. My final solution will basically be to modify the routing table with custom entries, have had a fiddle and seen enough evidence that its going to work. I still dont fully understand why it *doesnt* work mind, why cant you bind to a source ip, and just have it go through the relevant default gateway?... Anyway, lifes too short :)
0
DatedmanCommented:
>relevant default gateway
pick one, relevant or default :)

0
fraccy2Author Commented:
haha ok well what I mean is if 192.168.1.72 has a route to 0.0.0.0, and I bind my client socket to 192.168.1.72 and try and open a connection to someplace out in the ether, why does it suddenly ignore that route just because there is another default route with better metric? I can understand that is what's happening, and you've shown me a way round it, but I still don't understand why..
0
pgolding00Commented:
fraccy2, its just the way routing works. some things have to be mandatory to provide a basis for higher level protocols. sounds like you are suggesting that the oldest default route should be the one to use? if that was how things worked, what happens if you need to make a valid change to the default route and, more relevantly, how can it be automated? example - hop from one wireless ap to another, which might give you a different ip and subnet, so the default route needs to change too.

in summary, the lowest "cost" or metric route to a destination is the one that a host will choose, for IP networking.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Routers

From novice to tech pro — start learning today.