Connecting to BACNET Server on Host Machine Using Client Container

989 Views Asked by At

I am trying to connect my BACNET client which has been containerized and the BACNET server which is running on the host machine. I am using Docker for Windows on Windows 10 (host machine) with Linux containers. I have tried the following:

a. Publishing the ports 47808 for the client container with the run command.

b. Running the container with network=host, to access services of localhost.

c. Tried specifying the gateway IP as the server's IP address with run command.

d. Running the container in the same subnet as my server

e. Running the container with the host IP specified and the ports published. My bacnet server, taken from https://sourceforge.net/projects/bacnet/ always connects to the DockerNAT, 10.0.75.1? Any idea why does this happens? The server application is not a container but an executable file.

Server IP:10.0.75.1 (dockerNAT) Client container running on host machine.

1

There are 1 best solutions below

3
On

From a quick google:

For Windows containers this component is not used and containers and their ports are only accessible via the NATed IP address.

With respect to BACnet, this is going to put you in a world of hurt. You will have to use BACnet BBMD with NAT support in your container to achieve this, and your BACnet Client will have to register as a BACnet Foreign Device. The BACnet Stack at SourceForge does seem to have some NAT support (the code seems to be there but I have never tested it in its original form).

So what you are seeing is 'expected', but your solution is going to require that you become much more familiar with BACnet BBMDs than you ever want to be. Read the BACnet specification carefully. Good luck.