Skip to main content

Posts

Showing posts with the label docker

How to map Docker container's eth0 interface to its host VethXXX interface

In order to troubleshoot a network issue, we will need to figure out the veth end points connecting a container to its host. There are multiple ways of going about this problem, I will show 2 simple ways and point out to a third. # Technique-1: Quick & Simple Get the interface details inside the container: / # ip addr show eth0 9 : eth0@ if 10 : mtu 1500 qdisc noqueue     link/ether 02:42:ac:11:00:03 brd ff:ff:ff:ff:ff:ff     inet 172.17.0.3/16 brd 172.17.255.255 scope global eth0        valid_lft forever preferred_lft forever The output is telling us that, the veth has two end points. One end point is called eth0@if10 which is assigned to the container and on the host the other end point will be named as vethxxx@if9. Lets check the host to confirm this. root@botserver1:~# ip a | grep  veth 10 : vetha708f89@ if9 : mtu 1500 qdisc noqueue master docker0 state UP group default Cool. The host has a vet...