Can't access virtual interface eth0:0

Hi guys, :face_with_raised_eyebrow:

I’m trying to setup a service that starts a TFTP server but it needs to run on a specific IP address let’s say:
For that I created a virtual interface eth0:0 like this:
ifconfig eth0:0 netmask

My pi3 is connected to a switch that allows me to bridge the 10.0.1.* network between devices yet I can’t download or upload files to this address, this address is simply not visible from outside the container.

Why would eth0 be fully reachable but not eth0:0 ? :thinking:

I’d expect that the issue here is that the docker environment doesn’t know to forward requests to eth0:0 on the container, but that eth0 is set up automatically. I think there are a few routes here. My personal preference is for reserved IPs. Using either of static or reserved you could then just publish the tftp server on eth0 and be done with it.

  1. Reserved IPs. The DHCP in most domestic switches can be configured such that particular mac addresses are always configured with particular IP addresses.
  2. Static IPs.
  3. Network binding. You could set the docker environment up to know to forward inbound tftp requests down to the eth0:0 interface on the container.
1 Like

I also want to point out that NetworkManager is the problem and that it sometimes, not always override any interface that was set using the ip command

NetworkManager will do those kind of things, e.g. through the DHCP client, etc. I think in general you have two options:

  1. Define all your configuration through the NetworkManager’s connection profiles without using any additional configuration from the lower level tools like ip. This is the first option I would go with.
  2. If the first option does not fit your use case, then make the device not be managed by NetworkManager and do all the configuration using the lower level tools. Currently we do not support editing the global NetworkManager.conf file that resides on the host OS (although this will be possible in the future). You may do that through the NetworkManager’s D-Bus API from inside your container though:

Please let me know how that goes for you.

1 Like