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

Login with username, password and session length
Advanced search  

News:

Author Topic: Firebrick feature request? Testing whether internet access is up  (Read 1326 times)

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick

I had a thought. Some user says ‘my internet is down’ or ‘Facebook is dead’ and you have to diagnose what’s up. Of course it could be any number of things - the LAN is dead because ther switch is dead or off. If you have a wireless LAN that could be broken. A router could be off or broken. And so on and so forth. Assuming that your LAN is up, you would do a whole sequence of things after you find that pinging Facebook (or whatever the user said) fails.

It’s nice to have a single command that automates this and just does the whole lot for you, saves a huge amount of struggle and faffing about. If I remember correctly there once was something really nice like this in Windows v.xx - was it in the netsh  <xxx> networking shell commands of some old versions ?

I don’t have any such one-click network and internet access diagnostics thing in my iPad and I really need it. So I had a thought, it would be really nice if my Firebrick had it in the diagnostics sub section ‘test and diagnose internet access IPv4 and IPv6 and (ii) optionally traceroute to a given dest if any, ping it and (iii) optionally see if it responds to a tcp connect to port 443 or 80’ - all in a one-click command that does both IPv4 and IPv6 always and checks DNS in both. Hugely useful. The Firebrick has a number of tools already but this would be integrating them into one fast smart whole test. And then the icing on the cake would be if there were an easy cool http-api url by which you could invoke this command remotely. (Like the example of the super-slick url "https://my_firebrick/config/config" by which you can download the current config file.)

What do you think?
Logged

IanG

  • Member
  • **
  • Posts: 40
Re: Firebrick feature request? Testing whether internet access is up
« Reply #1 on: June 15, 2019, 07:31:04 PM »

Back in the days of dial-up modems, there was a Microsoft command to check connectivity. But it was never a guarantee that you could connect to the whole internet.

The sequence that I currently use, and that might meet your needs, is:
1. Check that the PC can find a valid Gateway Address.
2. Check that you can connect to that address.
3. Do a telnet or similar login to the address, and check (at least) that the modem status is Showtime.
4 Ping the closest server to the exchange.
5. Ping a site further away, of your choice.

I can't comment on the Firebrick angle, not having any experience of it.
 
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick feature request? Testing whether internet access is up
« Reply #2 on: June 15, 2019, 09:38:21 PM »

I had a thought. Some user says ‘my internet is down’ or ‘Facebook is dead’ and you have to diagnose what’s up. Of course it could be any number of things - the LAN is dead because ther switch is dead or off. If you have a wireless LAN that could be broken. A router could be off or broken. And so on and so forth. Assuming that your LAN is up, you would do a whole sequence of things after you find that pinging Facebook (or whatever the user said) fails.

It’s nice to have a single command that automates this and just does the whole lot for you, saves a huge amount of struggle and faffing about. If I remember correctly there once was something really nice like this in Windows v.xx - was it in the netsh  <xxx> networking shell commands of some old versions ?

I don’t have any such one-click network and internet access diagnostics thing in my iPad and I really need it. So I had a thought, it would be really nice if my Firebrick had it in the diagnostics sub section ‘test and diagnose internet access IPv4 and IPv6 and (ii) optionally traceroute to a given dest if any, ping it and (iii) optionally see if it responds to a tcp connect to port 443 or 80’ - all in a one-click command that does both IPv4 and IPv6 always and checks DNS in both. Hugely useful. The Firebrick has a number of individual tools in this category.

What would be really great would be a url that will execute this diagnostic command when invoked by the Brick’s http-api, so this could be automated and the results could be obtained by the iPad, for example. An example is the ‘http://my-firebrick/config/config’ which allows you to download the Firebrick’s config file.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick feature request? Testing whether internet access is up
« Reply #3 on: June 15, 2019, 09:55:55 PM »

The brick can do a lot more - it can look at the various devices that are tasked with providing internet access links, it can look at the config and see what that config is telling it to do.

I see the problem now splits into two: if we are allowed/supposed to assume that this config has been working, then diagnose the current situation, otherwise if the config is suspect we have to analyse the config and see if it is acceptable to provide internet access and also then we have the question of whether some config of any sort can provide internet access given the current state of affairs. So there needs to be a parameter I suppose, assume working config or new-unknown-suspect-config and in the case of the second option the diagnostics tool’s capabilities are limited because it doesn’t know how to achieve internet access without some guidance about what is available. The two are very different use-cases, so should probably split the whole thing in two, and make the second part into its own thing, a very worthwhile tool called ‘is this config any good’.

Actually I realise that it has to check that the firewalling is not insane. There already is a function that does exactly that for a given scenario so that code could just be reused several times, testing different significant destination points such as a node at the isp as close as you can get, if known (would need to either be supplied in a tool-config thing or obtained by traceroute) and then at some standard point out there on the internet example being 8.8.8.8 not that I would want to overload that so would want to have a wide range of such destinations from which one could be randomly selected.
Logged

IanG

  • Member
  • **
  • Posts: 40
Re: Firebrick feature request? Testing whether internet access is up
« Reply #4 on: June 16, 2019, 07:37:08 PM »

The function that I had in mind was Microsoft's InternetGetConnectedState(), a wonderful name that only partly lived up to its promise.

Quote
A return value of TRUE from InternetGetConnectedState indicates that at least one connection to the Internet is available. It does not guarantee that a connection to a specific host can be established. Applications should always check for errors returned from API calls that connect to a server. InternetCheckConnection can be called to determine if a connection to a specific destination can be established.

It may be that the general problem is intractable. I for example have a range extender that crashes somewhat more than once a month, and a HomePlug link that crashes somewhat less than once a month, with no apparent cause. A useful application would map and kept track of the internal LAN, check for internet connectivity, and report outages from https://www.downdetector.co.uk/ without being alarmist.
Logged

Weaver

  • Senior Kitizen
  • ******
  • Posts: 11459
  • Retd s/w dev; A&A; 4x7km ADSL2 lines; Firebrick
Re: Firebrick feature request? Testing whether internet access is up
« Reply #5 on: June 16, 2019, 08:45:10 PM »

Reasons for asking the Firebrick are firstly because it knows more: it is an ‘insider’, and secondly if I try and just do everything myself then the crappy library routines I have will simply hang all over the place semi-predictably when things are a bit or a lot broken.
Logged

aesmith

  • Kitizen
  • ****
  • Posts: 1216
Re: Firebrick feature request? Testing whether internet access is up
« Reply #6 on: June 18, 2019, 02:03:54 PM »

The function that I had in mind was Microsoft's InternetGetConnectedState(), a wonderful name that only partly lived up to its promise.
If that was the function introduced with Vista it was fantastically flakey, often for no apparent reason flagging an interface as "local only" and keeping it in that state even while from the command prompt you could happily ping Internet hosts by name.  I was never able to find an explanation of what test it carried out to reach it's conclusion, and the only solution that I found was to disable the Network Location Awareness service.
Logged
 

anything