Author |
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: July 05 2009 at 18:50 | IP Logged
|
|
|
I am trying to develop a macro that checks for network connectivity amongst the different IP address's I feed to PowerHome. If network problems are found, I will toggle the Insteon Appliancelinc that power both my modem, switch and router (...I have found that 98% of the time this seems to clear up any network isues).
Presently I use the "ph_ping" command. If the ph_ping command returns a posative value, the computer is connected to the network, while if any negative number is returned is an indication of loss of connectivity.
QUESTION: Is the above interpretation appropriate for what I am trying to accomplish?
If it is a valid means for what I am trying to accomplish, that would lead to my next question. Why is it that when I use ph_ping command, that a fair percentatge of the time the ph_ping fails, when I know there is proper connectivity?
See the picture. Here I attempt to ping
ph_ping("{IP101-STEVES}",255)
the above line 10 times. I then TTS the number of times the ping saw connectivity.
Most of the time this is usually 2/10 or 3/10. Only when I ping the router directly do I see 10/10 like I would expect with all the others (assuming good connectivity).
Anyone have any better way to routinely monitor home network connectivity?
Edited by smarty - July 05 2009 at 18:53
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 05 2009 at 19:36 | IP Logged
|
|
|
Maybe I am missing something here but why are you pinging an established connection on a LAN and the dynamic ones on the Internet? When you toggle the router and modem you are reestablishing DHCP addresses. The ones that are defined in PH I hard code the tcpip addresses in so they don’t change and are not affected by a bounce of the hardware. I would think bouncing the hardware to fix a connectivity problem only circumvents an underling problem thus that most likely will reoccur. To answer your question I believe you are testing for connectivity correctly but lost pings can be the result of different problems. For the sake of connectivity anything out of 10 is connected 10 out of 10 failed is loss connectivity. To answer the 2nd question, what does a ping from the console to the failing IP show?
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: July 05 2009 at 20:53 | IP Logged
|
|
|
I have a macro that does this and I use 2 failed pings's to indicate a problem. I use Google and Yahoo.
Code:
jump | if( ph_ping( "google.com", 128) < 0, 1, 999)
jump | if( ph_ping( "yahoo.com", 128) < 0, 1, 999)
TTS | "Internet connection down! Resetting D S L modem."
Macro | DSL OFF
Create Timed Event | DSL ON | ph_relativedatetime( today(), 1) |
|
|
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: July 05 2009 at 21:48 | IP Logged
|
|
|
BeachBum wrote:
Maybe I am missing something here but why are you pinging an established connection on a LAN and the dynamic ones on the Internet? |
|
|
I am trying to test for connectivity to my fixed DCHP addresses (which is a router check of sorts) AND to the dynamic internet address yahoo, which is sort of a modem/internet connectivity check.
BeachBum wrote:
When you toggle the router and modem you are reestablishing DHCP addresses. |
|
|
My internal network addresses are static.
BeachBum wrote:
To answer your question I believe you are testing for connectivity correctly but lost pings can be the result of different problems. For the sake of connectivity anything out of 10 is connected 10 out of 10 failed is loss connectivity. |
|
|
OK, I need to change my success threshold to be "anything above 0 out of 10".
BeachBum wrote:
To answer the 2nd question, what does a ping from the console to the failing IP show? |
|
|
This is the weird part. Regular DOS based pings always return good; no packet loss, and very fast. The question is, why do the ph_pings seem to fail a lot (or at least most of the time), while the DOS pings ALWAYS show connectivity?
Edited by smarty - July 05 2009 at 21:49
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 05 2009 at 23:21 | IP Logged
|
|
|
I thought that was where you were going with the 2nd question. DOS pings work at command level. I would guess there is an inherent delay coming from PH. Only Dave may be able to answer that one. If you want to tighten your threshold a lot of folks adhere to 5/5 failure rate. Sooo back to the other scenario why does bouncing the router, modem fix your problem 98% of the time? My question; why do you have a switch and a router?
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
grif091 Super User
Joined: March 26 2008 Location: United States
Online Status: Offline Posts: 1357
|
Posted: July 06 2009 at 09:30 | IP Logged
|
|
|
Pete, unrelated to the connectivity question, I have a Switch and Router because I need more ports than the router supports. Router packaged as part of the DSL modem so expanding that was not an option, plus a Switch is less expensive and no setup needed.
__________________ Lee G
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 06 2009 at 09:42 | IP Logged
|
|
|
Also a switch is faster. I was just curious how Smarty was using it in his LAN environment since he gets into interesting stuff.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: July 06 2009 at 11:30 | IP Logged
|
|
|
You guys nailed it....The switch is needed just for the extra ports. My router only supports 4 hardwired ports (and that is not enough).
Let me explain a bit more.....
It seems that it never rains and we never have power outages/fluctuations unless I am away from home on business travel. The last time this happened the wife decided she didn't want to try to open the gate manaully (for safety reasons this is easy to do), so she was "trapped" at home, and "couldn't" make it in to her work.... boohoo (she really didn't want to go in anyway).
The point is that on a very rare occasion, I have found that power flickers/outages do cause my network activity to become "flakey", and a power cycle is needed to clear everything. If I am not there to do this, I am trying to make my setup robust enough to do this on its own.
As a side note, I do have a whole house surge protection (including telephone and cable lines) and a UPS that provides power for the computer, modem, router and switch. While this set-up is GOOD, it has needed a reset at least once while I was out of town.
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
BeachBum Super User
Joined: April 11 2007 Location: United States
Online Status: Offline Posts: 1880
|
Posted: July 06 2009 at 11:49 | IP Logged
|
|
|
I have a very similar setup without a switch. I get my extra ports wireless off my Buffalo router. I’m pretty seamless on recovery except when the PLM losses power and PH is up on batteries then the endless loop of PH recovery starts. But I very seldom bounce the ports stuff unless DSL is hung. Since my DSL is a dry loop system I don’t get much of an indication.
__________________ Pete - X10 Oldie
|
Back to Top |
|
|