Sample Header Ad - 728x90

strange Docker veth interface (peer) names

1 vote
1 answer
90 views
On a Docker host (which I have not set up; I am not very familiar wich Docker anyway) I noticed that I do not understand the interface names:
1: lo:  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: ens18:  mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000

    link/ether 5e:44:5a:26:82:e7 brd ff:ff:ff:ff:ff:ff

8: docker0:  mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default

    link/ether ae:b3:52:68:1d:5b brd ff:ff:ff:ff:ff:ff

12: br-7fef86ec14bd:  mtu 1500 qdisc noqueue state UP mode DEFAULT group default

    link/ether 76:d3:a0:d7:73:0a brd ff:ff:ff:ff:ff:ff

33: vethc35030f@if2:  mtu 1500 qdisc noqueue master br-7fef86ec14bd state UP mode DEFAULT group default

    link/ether 6e:b1:3e:85:88:c4 brd ff:ff:ff:ff:ff:ff link-netnsid 0
ip -d link show dev vethc35030f

33: vethc35030f@if2:  mtu 1500 qdisc noqueue master br-7fef86ec14bd state UP mode DEFAULT group default
    link/ether 6e:b1:3e:85:88:c4 brd ff:ff:ff:ff:ff:ff link-netnsid 0 promiscuity 1 minmtu 68 maxmtu 65535
    veth
    bridge_slave [...]
So vethc35030f does not only sound like veth, it actually is a veth. How can it be @if2? The documentation says that veth interfaces are always created in pairs, the paired interface name or (if in a different namespace) number is the part after the @. I am not aware of any possibility to change the veth peer later, especially not to an interface of a different type. somename@if2 is something I would expect for a macvlan (or similar) interface but this is not the case here.
Asked by Hauke Laging (93688 rep)
Mar 22, 2025, 11:15 PM
Last activity: Mar 23, 2025, 01:50 AM