0

I installed Docker on CentOS, and find that two network links are added automatically. But I found that I've missed one vEth.

The links are:

root@cent7-1908:/root> ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:0e:39:27 brd ff:ff:ff:ff:ff:ff
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 08:00:27:0b:76:69 brd ff:ff:ff:ff:ff:ff
4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
    link/ether 02:42:34:f8:fc:93 brd ff:ff:ff:ff:ff:ff
6: vetheb585ba@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default
    link/ether aa:0a:9f:bd:7e:20 brd ff:ff:ff:ff:ff:ff link-netnsid 0

Link #3 & 4 are my physical Ethernet interfaces (actualy the VM's eth).

Link "docker0" is a bridge:

root@cent7-1908:/root> brctl show
bridge name     bridge id               STP enabled     interfaces
docker0         8000.024234f8fc93       no              vetheb585ba

While link "vetheb585ba@if5" is a vEth link:

root@cent7-1908:/root> ip -details link show
...
6: vetheb585ba@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default
    link/ether aa:0a:9f:bd:7e:20 brd ff:ff:ff:ff:ff:ff link-netnsid 0 promiscuity 1
    veth
    bridge_slave state forwarding priority 32 cost 2 hairpin off guard off root_block off fastleave off learning on flood on port_id 0x8001 port_no 0x1 designated_port 32769 designated_cost 0 designated_bridge 8000.2:42:34:f8:fc:93 designated_root 8000.2:42:34:f8:fc:93 hold_timer    0.00 message_age_timer    0.00 forward_delay_timer    0.00 topology_change_ack 0 config_pending 0 proxy_arp off proxy_arp_wifi off mcast_router 1 mcast_fast_leave off mcast_flood on addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535

As far as I know, veth links must exist in pair. The fact that interface #5 is missed also indicates that there is a missed veth link.

I suspected that it was because Network Namespace, so I checked:

root@cent7-1908:/root> ip netns show
root@cent7-1908:/root>

But nothing lised. So how can I find out the missed vEth link?

1
  • ip netns is a specialized tool that won't care about network namespaces not created/kept by its method: a mount in /var/run/netns/foo. See my answer in this Q/A to discover network namespaces: unix.stackexchange.com/questions/505112/… – A.B Oct 7 '20 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.