I know by default docker creates a virtual bridge docker0
, and all container network are linked to docker0
.
You can detect the relation by network interface iflink
from a container and ifindex
on the host machine.
Get iflink
from a container:
$ docker exec ID cat /sys/class/net/eth0/iflink
17253
Then find this ifindex
among interfaces on the host machine:
$ grep -l 17253 /sys/class/net/veth*/ifindex
/sys/class/net/veth02455a1/ifindex