1

I am running code talking to GigE Vision / gen<i>cam cameras inside a docker container. The real deployment will run on Windows host (unfortunately). The cameras respond to broadcasted UDP discovery packets to port 3965 (wireshark dissects those as GVCP protocol, DISCOVER_CMD):

wireshark screenshot

Obviously, UDP packets can't cross network bridges, though --network=host helped on Linux: the camera was discovered.

On Windows host, the --network=host had no effect and the discover packet (sent from within the container) never makes it to the LAN. The Windows Defender firewall is off and there is no other firewall/antivirus/whatever active.

I can also run camera discovery program in Windows (not in the hosted container) and it works.

Any idea what could be wrong? I was googling for things like "docker egress UDP windows" with no useful result.

eudoxos
  • 18,545
  • 10
  • 61
  • 110
  • Using ```--network=host``` on Windows is probably going to map to the MobyLinuxVM not the actual windows host thus the failure you describe. There are open issues with Docker port mapping UDP on Windows. Nevertheless, did you try mapping using the UDP mapping for your container port, ```3965:3965/udp``` ? – Steve Boyd Feb 21 '19 at 02:46
  • @SteveBoyd I tried the mapping now, no change (as I supposed: it is sending the discovery packet *to* 3956/udp). You're right, with `--network=host`, the iface inside the container is not on the same subnet as the host. This post https://forums.docker.com/t/resolved-windows-10-way-to-assign-container-to-the-same-lan-as-host/51663 reports the same issue (they are running nmap scans from within the container, thus need to be on the same subnet) and it is marked as resolved. I will check it and write here what the result is. – eudoxos Feb 21 '19 at 07:40
  • I finally found a way to avoid the UDP broadcast (providing the IP address to the software) and then the unicast UDP communication works. For me okay for now. – eudoxos Feb 21 '19 at 13:50
  • @eudoxos could you please elaborate on how u fixed this issue in more detail? – hamaney Apr 12 '20 at 05:56
  • @hamaney I did not fix it, I used a workaround in the code so that it would not rely on the broadcast. I was using Aravis to communicate with the camera, providing its IP did not make the broadcast necessary. Anyway, I later abandoned Windows and persuaded the customer to install Linux host for Docker. No more issues after that. Let me know if you need more details abaout Aravis specifically, I will find it in code's git history. – eudoxos Apr 12 '20 at 14:45

1 Answers1

2

Probably already to late but in case someone else comes along.

Docker --network=host wont work in windows and therefore has no effect as stated here:

This can be found in the Docker Documentation

The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.