Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 19 total
Thread Laptops connecting in and out of LAN.
Fri, Apr 8 2016 2:21 PMPermanent Link

Terry Swiers

I'm curious as to how everyone else handles this situation.

Say you have a LAN with a EDB Server that has an internal IP address of 192.168.10.200.   The router for the LAN has port forwarding configured to route connections from the outside to the internal server IP.  For reference, the external IP address is 80.35.171.233.

For routers that provide NAT loopback functionality, you can just set the EDB session to point to the 80.35.171.233 address and it will work regardless if you are inside or outside the router when you make the connection.  But routers that don't provide NAT loopback functionality, you have to use the 192.168.10.200 when connecting from inside the router and 80.35.171.233 when outside the router.  This forces the user to have to change the configuration each time they move the laptop in and out of the LAN.  

I know that I can create two configurations and prompt the user each time the app starts, but I would rather have something in place that handles this without the user having to do something every time.  The other option would be for the app to attempt to connect to the first address and then try the second if it can't connect to the first, but I really don't want to add a significant delay to the startup while it waits for the timeout.

Any suggestions on how to handle this situation programatically that's both reliable and doesn't cause any significant delays?
Sat, Apr 9 2016 3:13 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Terry


If I understand correctly, in both scenarios the user will end up pointing at the same config file (otherwise you're in trouble) and its just the IP address that may be different., and they may move from one to the other.

Why not just hold both of the IP addresses, ping the internal one on start up (I use Synapse, but Indy would also work). If the ping is successful use that, if not ping the external address and if that doesn't respond tell the user to go buy a cream bun!

Roy Lambert
Sun, Apr 10 2016 2:09 AMPermanent Link

Terry Swiers

> Why not just hold both of the IP addresses, ping the internal one on start up (I use Synapse, but Indy would also work). If the ping is successful use that, if not ping the external address and if that doesn't respond tell the user to go buy a cream bun!

That's the general direction that I'm going with.  What's a reasonable timeout period that's long enough to be reliable without incurring a significant delay?   

Also, I've seen situations where the server isn't "pingable" internally yet will allow the EDB client to connect.  How do you handle this situation?

Oh, and what's a cream bun?  It sounds delicious.  Wink
Sun, Apr 10 2016 3:52 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Terry


Answering the last question first

http://christinascucina.com/2012/11/cream-buns-scottish-favourite.html


<<That's the general direction that I'm going with.  What's a reasonable timeout period that's long enough to be reliable without incurring a significant delay?  >>

It depends on on the speed of the connection Frownand how your pinging software works. If you drop to a command prompt and just type ping www.bbc.co.uk you'll see 3 results ie the built in to Windows ping has three goes before it gives up so you have to think about 3 times the expected response speed. I'm not sure what Indy or Synapse do. I do use Synapse pinging to see if companies websites are up and running but its done in a background thread so I don't really care about speed that much.

Internal LAN you'd expect < 5ms ONCE ITS WOKEN UP - just trying it here and the first of the three pings took 348 ms the next two 3ms each. Gave it a while to go back to sleep and the first one was 853ms

www,bbc.co.uk is much more consistent running c40ms. Use speedtest.net to check my broadband and it generally reports a ping between 45ms & 80ms

Overall I'd guess it should take <1sec

However, you shouldn't need to worry about how long to allow - in Synapse at least just wait for it to return true/false

<<Also, I've seen situations where the server isn't "pingable" internally yet will allow the EDB client to connect.  How do you handle this situation?>>

You have limited choices. In no particular order:

- burst into tears
- try and get the ops people to allow pinging
- try and connect to the server
- try and download a small file held on the server

Roy Lambert
Sun, Apr 10 2016 6:47 AMPermanent Link

Steve Gill

Avatar

<< Answering the last question first

http://christinascucina.com/2012/11/cream-buns-scottish-favourite.html  >>

We have similar cream buns in Australia but with a small amount of raspberry jam as well.

= Steve
Sun, Apr 10 2016 7:24 PMPermanent Link

Raul

Team Elevate Team Elevate

On 4/8/2016 2:21 PM, Terry Swiers wrote:
> I'm curious as to how everyone else handles this situation.
> Say you have a LAN with a EDB Server that has an internal IP address of 192.168.10.200.   The router for the LAN has port forwarding configured to route connections from the outside to the internal server IP.  For reference, the external IP address is 80.35.171.233.
> For routers that provide NAT loopback functionality, you can just set the EDB session to point to the 80.35.171.233 address and it will work regardless if you are inside or outside the router when you make the connection.  But routers that don't provide NAT loopback functionality, you have to use the 192.168.10.200 when connecting from inside the router and 80.35.171.233 when outside the router.  This forces the user to have to change the configuration each time they move the laptop in and out of the LAN.
> I know that I can create two configurations and prompt the user each time the app starts, but I would rather have something in place that handles this without the user having to do something every time.  The other option would be for the app to attempt to connect to the first address and then try the second if it can't connect to the first, but I really don't want to add a significant delay to the startup while it waits for the timeout.
> Any suggestions on how to handle this situation programatically that's both reliable and doesn't cause any significant delays?

In our case (not identical but conceptually similar) we don't use IP at
all and have a DNS name instead (i.e. <yourhostname>.<company
domain>.com or similar ) use splitbrain DNS (separate internal and
external DNS servers) so the DNS query will result in correct IP being
returned every time.  Still need to look at DNS cache age issues so need
to use short cache expiry

Raul
Mon, Apr 11 2016 5:06 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Terry,

<< The other option would be for the app to attempt to connect to the first address and then try the second if it can't connect to the first, but I really don't want to add a significant delay to the startup while it waits for the timeout. >>

EDB 2.21 and above has a RemoteConnectionTimeout property for this very purpose.  Set it to 3-6 seconds on the first attempt, and then switch over to the second if the first fails.

http://www.elevatesoft.com/manual?action=viewprop&id=edb2&product=rsdelphi&version=XE&comp=TEDBSession&prop=RemoteConnectionTimeout

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Apr 11 2016 12:03 PMPermanent Link

Terry Swiers

> EDB 2.21 and above has a RemoteConnectionTimeout property for this very purpose.  

This is what got me thinking about all of this.  Thanks.
Tue, Jul 26 2016 7:48 PMPermanent Link

Terry Swiers


> EDB 2.21 and above has a RemoteConnectionTimeout property for this very purpose.  Set it to 3-6 seconds on the first attempt, and then switch over to the second if the first fails.

The edbcomps.pas source indicates that the minimum value for this is 5 seconds.  I was really hoping for that 3 seconds option.  Any chance that MIN_CONNECT_TIMEOUT can get bumped down to 2 or 3 seconds for 2.24 B3?
Fri, Jul 29 2016 2:49 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Terry,

<< The edbcomps.pas source indicates that the minimum value for this is 5 seconds.  I was really hoping for that 3 seconds option.  Any chance that MIN_CONNECT_TIMEOUT can get bumped down to 2 or 3 seconds for 2.24 B3? >>

Yeah, I can do that.  I've bumped it down to 1 second as the minimum, which should work for what you want (2).

Tim Young
Elevate Software
www.elevatesoft.com
Page 1 of 2Next Page »
Jump to Page:  1 2
Image