I have a camera connected to interface enp0s31f6 to ethernet port on the host (Linux 22.04.4 LTS). The ethernet NIC ip is static. The camera is detected on the host, but not from within the docker container.
I ran the container as docker run -it --rm --privileged --network host --name basler_container basler
What should I look at next to try to figure out the cause?
If you look at the output of ifconfig from container below you can see that the enp0s31f6 is not listed there though there is eth0 that was added on the same network but with different ip
IFCONFIG on host
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:cff:fe29:3048 prefixlen 64 scopeid 0x20<link>
ether 02:42:0c:29:30:48 txqueuelen 0 (Ethernet)
RX packets 602988 bytes 31801390 (31.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 701650 bytes 5591761213 (5.5 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s31f6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.65.10 netmask 255.255.255.0 broadcast 192.168.65.255
inet6 fe80::ada5:60b0:e461:3007 prefixlen 64 scopeid 0x20<link>
ether 9c:6b:00:07:61:79 txqueuelen 1000 (Ethernet)
RX packets 10900485 bytes 16430308848 (16.4 GB)
RX errors 9 dropped 0 overruns 0 frame 9
TX packets 69319 bytes 4760249 (4.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 19 memory 0x72500000-72520000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1943021 bytes 177222608 (177.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1943021 bytes 177222608 (177.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.19 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::40ef:b0b9:5215:18e7 prefixlen 64 scopeid 0x20<link>
ether f0:b6:1e:a2:b6:92 txqueuelen 1000 (Ethernet)
RX packets 7011727 bytes 8808609077 (8.8 GB)
RX errors 0 dropped 6672 overruns 0 frame 0
TX packets 1771881 bytes 678988219 (678.9 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
IFCONFIG from docker container
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:0c:50:05:1e txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.65.9 netmask 255.255.255.0 broadcast 192.168.65.255
inet6 fe80::5054:ff:fe12:3456 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:12:34:56 txqueuelen 1000 (Ethernet)
RX packets 4044 bytes 792780 (792.7 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3462 bytes 1230732 (1.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 70 bytes 7544 (7.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 70 bytes 7544 (7.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
services1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.65.6 netmask 255.255.255.255 broadcast 0.0.0.0
inet6 fe80::843a:a8ff:fe1c:3381 prefixlen 64 scopeid 0x20<link>
ether 86:3a:a8:1c:33:81 txqueuelen 0 (Ethernet)
RX packets 39 bytes 3078 (3.0 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 52 bytes 6138 (6.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0