문제

I have a web application running on a remote server. People working with the web app can send SMTP commands from within the application to remote electronic boards at another location to switch lights on and off.

However at the location where the electronic boards are placed, we have 2 internet connections: 1 Telenet (Belgium, cable) as primary WAN and 1 Belgacom (Belgium, VDLS) as backup WAN. Our router switches automatically between the 2 WANS whenever one goes down.

In the web application I need to check on which WAN I can connect to the boards. So I need to check from withing the web application via which WAN connection the boards are connected to internet?

도움이 되었습니까?

해결책

I found a solution. My primary WAN gives me a static IP, which I know. So I let the web application lookup the IP address associated with the hostname of my remote location (where the electronic boards are located). If this is equal to the static IP of the primary WAN, I know which provider is giving me access on the remote location.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top