0

when started the docker,i found the veth name contains '@'. as i konw, the veth pair name is veth0@veth1 and veth1@veth0 in gerenal. But i found the docker veth is vethb00e848@if7.

So what the '@' means? or could i change the veth0@xxx to veth0@yyy?

➜  ~ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 68:f7:28:67:b3:94 brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether 5c:c5:d4:df:e9:13 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:78:12:f6:12 brd ff:ff:ff:ff:ff:ff
5: br-02c830829a97: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:32:81:fd:21 brd ff:ff:ff:ff:ff:ff
6: br-3000ca4de5c1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:52:5c:c6:88 brd ff:ff:ff:ff:ff:ff
8: vethb00e848@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default 
    link/ether 02:34:e8:9f:b9:50 brd ff:ff:ff:ff:ff:ff link-netnsid 0
2
  • 2
    this page might have some answers, it suggests that the @if# part has the number of the entry of the other end of the veth pair, in your case vethb00e848@if7 is one end, and the interface with index 7 is the other side (not shown in your output). I don't know if anything requires that so I don't know if you could get away with changing it if you wanted to Jul 30 '17 at 11:34
  • The @xxx part changes to @if# with the kernel-internal number of the interface if the part on the other end is in a different network namespace, and therefore its name is not visible (which is one of the main usage cases for veth-pairs).
    – dirkt
    Aug 8 '17 at 13:02

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.