ypereirareis.github.io
ypereirareis.github.io copied to clipboard
Link/relation between container interfaces, MAC addresses and IP addresses
In complex configurations we sometimes need to use docker containers interfaces to allow cluster wide communication (ES for instance). In that case , it's important to understand the relation between network interfaces in containers, MAC addresses and container IP addresses.
Dans le container :
cat /sys/class/net/eth0/address
cat /sys/class/net/eth1/address
cat /sys/class/net/eth2/address
...
Sur l'hôte
docker inspect CONTAINER_ID
et
docker network inspect NETWORK_ID