查看 host/container veth pair 关系
参考链接:https://blog.csdn.net/u011563903/article/details/88593251
容器里执行,ip link show eth0 命令,然后可以看到 116: eth0@if117,其中116是eth0接口的index, 117是和他pair的veth的index
~ $ ip link show eth0 116: eth0@if117: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP link/ether 02:42:0a:00:04:08 brd ff:ff:ff:ff:ff:ff
在host执行下面命令可以看到对应117的vethinterface是哪一个,这样就得到了container和veth pair关系
# ip link show | grep 117 117: veth145042b@if116: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue master docker0 state UP