Relationship between interface "vethxxxxx" and container?

This can be found out by matching a container interface’s iflink value with a host veth interface’s ifindex value.

On the container, run :
cat /sys/class/net/eth0/iflink

And on the host, find a veth with an ifindex value matching the iflink value of your container’s interface :
cat /sys/class/net/vethXXXXXXX/ifindex

2 Likes