Um Schnittstelle
In meinem Fall lokalisieren Wert aus dem Behälter immer war wie (check eth0
bis):
$ docker exec -it my-container cat /sys/class/net/eth1/iflink
123
Und dann:
$ ip ad | grep 123
123: [email protected]: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker_gwbridge state UP group default
prüfen mit tcpdump -i vethd3234u4
Referenz über mysteriou s iflink
von http://lxr.free-electrons.com/source/Documentation/ABI/testing/sysfs-class-net:
150 What: /sys/class/net/<iface>/iflink
151 Date: April 2005
152 KernelVersion: 2.6.12
153 Contact: [email protected]
154 Description:
155 Indicates the system-wide interface unique index identifier a
156 the interface is linked to. Format is decimal. This attribute is
157 used to resolve interfaces chaining, linking and stacking.
158 Physical interfaces have the same 'ifindex' and 'iflink' values.
Es scheint, wie es eine offene Frage ist hier https://github.com/docker/docker/issues/14666 und es gibt einige Workarounds. Ich bin nicht gut im Networking und ich verstehe diese Workarounds nicht wirklich, also habe ich beschlossen, nur nach Host zu filtern, wenn ich tcpdump benutze. Funktioniert bei mir. Vielleicht wird es für Sie funktionieren, wenn Sie auch tcpdump verwenden oder wenn Ihr Tool ähnliche Filter hat. –