Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: multi nic: 4G and wi-fi - loss of connectivity  (Read 780 times)

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 5432
  • Retd sw dev; A&A; 3 × 7km ADSL2; IPv6; Firebrick
multi nic: 4G and wi-fi - loss of connectivity
« on: April 15, 2018, 02:07:57 AM »

Say my ipad is on a wireless lan connected to a dsl router and the dsl goes down. The ipad also has a 4g nic too as it happens. But the ipad doesn't know the router's wan links have gone down, and in any case it always prefers the wireless lan i/f over the 4g i/f, so it never switches over to using 4g if the dsl goes out to lunch.

It only switches to 4g if the wireless lan medium itself goes down.

This is a damn nuisance. If only routers could broadcast routing information, using whatever, BGP or RIP or something and if ios could listen out for that.

The only other thing I could think of would be for an os to regularly ping some target machine on the real internet via the preferred nic, but no one would want to pay for all that traffic and there would be a timing delay before it realises a link is bad. Apart from the cost and the battery drain it would actually be a good thing as it would test for real connectivity so it would cover the case where dsl was up but the internet connection was still in fact useless, eg where there was no working path beyond the first hop because of connectivity problems between wholesale sp (eg btw or tt) and your real isp, or routing problems within the isp itself. You could say that any incoming traffic counts as confirmation that the link was good, so that would reduce the pinging a bit of course. It's only what AA do anyway via PPP echo requests and there are ping boxes which do ICMP pings regularly for service monitoring. You could consider having a really limited hop count (low ttl), or traceroute one time and then ping a particular chosen node only m < n hops upstream. But choosing a well-known test target provided by eg apple using anycast routing would be a better option as it would test the whole of ‘real internet connectivity’ rather than being fooled by broken isps where just the dsl works but nothing much further upstream.

My old netgear DG834 router could speak RIP. My firebrick router cannot but it speaks BGP and OSPF. I don't know if it could be set up to do what I need here and export routing status info to the LAN side. If only there were something like a RIP listener in ios.

I suppose a less good alternative would be for a router to send ICMP error packets to tell an ipad that the internet connection has gone down. But ideally you want the notifications to be unsolicited and standalone, ie not having to be in response to anything outbound so that there would be a timely notification that an internet connection has gone down which is picked up straight away, before an ipad tries to send to it. I wonder if an existing icmp type would do the job or whether something new would have to be standardised. Whatever it was, it would have to be something that was selectively blocked, filtered out appropriately so that it could not be misused as a dos technique by internet malefactors, or perhaps checking in the recipient ios that it has the src ip address of the router itself or might be enough.

Musing; I would love to design a server protocol for a local info-server, which would give out info about the lan, local site, router and internet connection’s properties, plus offering facilities to subscribe to dynamic status info updates ideally using multicast udp but probably also offering other protocol types for lame client apps so as to encourage wide takeuchi. The question is how best to deploy it, and whether or not to try and get it tightly integrated into routers or have some other cheap box or existing box run the server code. In the latter case it might be too hard to get all the required info out of the router. DHCP does a lot of stuff already, but it doesn't give you info about say the name of the site, performance characteristics, any general servers that you need to know about, network loading, costs of traffic, protocols supported or blocked, services that are available, isp characteristics, geographic info, and stuff that is completely extensible including user-defined stuff that uses proper type id  URNs and well-behaved namespaces so that info-type clashes and global namespace pollution do not become a bad bad thing. My worry about such a project is scope creep; it could grow into a nightmare huge monster.
Logged

j0hn

  • Kitizen
  • ****
  • Posts: 1586
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #1 on: April 15, 2018, 03:46:51 AM »

I'd be surprised if ios doesn't have this.
My Samsung running Android has an option in the WiFi settings called "Smart Network Switch".
It detects when there's no internet connectivity and switches to 3g/4g automatically.

My Windows 10 Laptop can also detect this. When the internet is unavailable it shows as "Connected, No Internet".
Logged
BT FTTC 55/10 ECI now Huawei cab
Zyxel VMG1312-B10A bridge mode with 1508 MTU + Asus RT-AC68U running Asuswrt-Merlin

andyfitter

  • Reg Member
  • ***
  • Posts: 138
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #2 on: April 15, 2018, 09:33:40 AM »

Is WiFi assist the solution?

https://support.apple.com/en-gb/HT205296

Logged

sevenlayermuddle

  • Helpful
  • Kitizen
  • *
  • Posts: 3597
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #3 on: April 15, 2018, 12:36:08 PM »

I'd be surprised if ios doesn't have this.
My Samsung running Android has an option in the WiFi settings called "Smart Network Switch".
It detects when there's no internet connectivity and switches to 3g/4g automatically.

My Windows 10 Laptop can also detect this. When the internet is unavailable it shows as "Connected, No Internet".

Are you sure Android picks up on loss of internet, as opposed to simply detecting unstable WiFi?   This following Samsung page suggests the latter.   Trouble is, WiFi can be stable, yet no Internet access.

http://www.samsung.com/au/support/mobile-devices/what-is-smart-network-switching/

I didn’t think it was possible to detect “no internet” other than by accessing some common server  and expecting a response.   I have always assumed OS’s like windows, when they report “no internet” are just doing something similar, ie pinging microsoft.com or something.   Trouble with that is, if said server is down it may say “No Internet”, even though the rest of the Internet is alive and well.

Is WiFi assist the solution?

https://support.apple.com/en-gb/HT205296

Same comments would apply, I suspect WiFi assist acts upon the quality of WiFi, rather than of the Internet connection behind it.

Happy to stand corrected on any of above.  Interesting discussion.

Logged

gt94sss2

  • Reg Member
  • ***
  • Posts: 776
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #4 on: April 15, 2018, 03:19:12 PM »

My Huawei has a feature called WiFi+ which automatically switches between Wi-Fi and mobile data for the best network data.

The phone also displays a pop-up when it finds the WiFi network it is connected to is not connected to the internet - and asks if you want to remain connected to that network or if you want the phone to change to a different connection.
« Last Edit: April 15, 2018, 03:38:34 PM by gt94sss2 »
Logged

j0hn

  • Kitizen
  • ****
  • Posts: 1586
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #5 on: April 15, 2018, 03:32:51 PM »

Quote
Are you sure Android picks up on loss of internet, as opposed to simply detecting unstable WiFi?   This following Samsung page suggests the latter.   Trouble is, WiFi can be stable, yet no Internet access.

Absolutely positive.
If I have full bars on the home WiFi but the WAN connection is down, my Samsung switches to mobile data automatically. It keeps the WiFi connected in the background and when internet connectivity is restored it reverts back to using the WiFi.

edit: to add, this works on Samsung S3, S4 mini, S5 and an S7
« Last Edit: April 15, 2018, 03:34:56 PM by j0hn »
Logged
BT FTTC 55/10 ECI now Huawei cab
Zyxel VMG1312-B10A bridge mode with 1508 MTU + Asus RT-AC68U running Asuswrt-Merlin

sevenlayermuddle

  • Helpful
  • Kitizen
  • *
  • Posts: 3597
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #6 on: April 15, 2018, 03:46:08 PM »

Then the question is, how do these devices “know” whether there is an internet connection behind the WiFi, and can their decisions be relied upon?   :-\

I simply don’t see how it can work, other than being a bit of an unreliable bodge.   Obviously, the modem knows it has lost the WAN connection, but how would WiFi (or even Lan) attached devices know?

Then again, this is one of many fields that I once considered myself knowledgable, but that was then, this is now.   These days, I am always aware of the possibility that I may simply be wrong. ::)
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 5432
  • Retd sw dev; A&A; 3 × 7km ADSL2; IPv6; Firebrick
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #7 on: April 15, 2018, 06:00:09 PM »

So we are definite that Android and Windows 10 can somehow detect a lack of a truly good internet connection via a wireless lan even though the wireless lan itself is still up and there is connectivity across the lan as far as the router/default gateway itself? Good for them then but how did they do it?

And null points for Apple. I don't see how Apple could update their routing table in ios without using one of the techniques I mentioned initially.

As for 'wi-fi assist' I imagine, I don't know, that that is a thing that kicks in if you lose wireless lan signal. But it isn't going to be much good in a way because when you switch interfaces like that then your source ip changes so existing tcp connections have to break.

[I notice Apple has implemented a new protocol, forget the name, which is used by Siri and not much else but it handles changing of src ip on the fly while keeping a transport connection live. (Like SCTP does.) It's a radical redesign of tcp or a bit like a layer underneath it, I forget which. It is published somewhere. Apple is clearly desperate to give Siri's transport connections to their servers enhanced long-term reliability across these kind of mobile vs lan switchovers.]

Another nuisance is that I don't have ipv6 on my Three/AQL/AAISP 3G/4G service, only ipv4. Everything prefers ipv6 all the time. (At least I do get one proper straight static routable ipv4 address for the mobile nic itself.) This means that I can't even properly fix the switching awareness issue for good by getting my Firebrick router itself to do failover to 3G, which it is specifically designed to do, without losing all the ipv6 connections. Even though the src ips then would not need to change as the isp AA simply reroutes everything on the fly and does the right thing there simply is no ipv6 service via Three/AQL. I could set it up to use a 6in4 / proto 41 tunnel for ipv6 which would sort [of fix] that problem but cause an MTU problem on 3G ipv6 because of the presence of the added 6in4 / proto 41 headers unless I were to live my entire life with a reduced MTU. (Just now I can do DSL with MTU 1500+8=1508 baby jumbo frames with my current DSL modems and PPPoEoE).
Logged

sevenlayermuddle

  • Helpful
  • Kitizen
  • *
  • Posts: 3597
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #8 on: April 15, 2018, 07:40:57 PM »

[I notice Apple has implemented a new protocol, forget the name, which is used by Siri and not much else but it handles changing of src ip on the fly while keeping a transport connection live. (Like SCTP does.) It's a radical redesign of tcp or a bit like a layer underneath it, I forget which. It is published somewhere. Apple is clearly desperate to give Siri's transport connections to their servers enhanced long-term reliability across these kind of mobile vs lan switchovers.]

I worked with SCTP in a distant past life.  So far as I recall, the heartbeat/keepalives simply prove that the connection to the remote peer is active.   They prove nothing about availability of the rest of the network.

Android might (?) assume that, if google.com is unreachable, the whole Internet is unreachable, and switch from WiFi to mobile data.   That would obviously be the wrong conclusion for people who just want to (say) stream BBC Iplayer, or browse Wikipedia, or even just browse kitz.co.uk, or loads of other things that will work just fine even if google.com is unreachable.

Apple could do the same, and assume that just because apple.com (or Icloud) is unreachable, there is “No internet”.   I actually hope they don’t, as it would be just as wrong imho.
Logged

andyfitter

  • Reg Member
  • ***
  • Posts: 138
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #9 on: April 15, 2018, 08:19:01 PM »

My suspicion is that is exactly how Apple do it. Not sure they repeatedly ‘ping’ all the time, maybe just when tcp connections start failing due to transport problems.
Logged

Weaver

  • Addicted Kitizen
  • *****
  • Posts: 5432
  • Retd sw dev; A&A; 3 × 7km ADSL2; IPv6; Firebrick
Re: multi nic: 4G and wi-fi - loss of connectivity
« Reply #10 on: April 17, 2018, 05:07:42 AM »

But anyway, Apple do not do the right thing. None of my ipad's are smart enough not to be fooled by a good wireless lan signal with no working dsl to the internet beyond it. Every one of them needs a tweak in settings to make it ignore ‘wi-fi’ and force it to go over to 3G. I think the iphone is the same but I need to carefully recheck that.
Logged