in vyos 1.2 there are two interface types named loopback and dummy this Task is a suggestion to unite the two types into ine loopback type.
also look at this vyos blog entry for reference: https://blog.vyos.io/loopback-and-the-dummies
A bit of background on why:
One of the main audiences for vyos are network engineers familiar with networking equipment and their configuration. Configuring routing protocols eg. ospf and bgp on almost Any vendor discusses the use of Loopback interfaces and all that i can find use the term loopback or lo to describe these interfaces .. cisco/huawei/hp: eg. Lo0 or Loopback0 . junos: eg. lo.0 and so on.
Then looking to vyos, the names are dummy dum0 ? the reason for this name is the driver that is loaded to create them (dummy). as a network engineer this naming scheme fails on every point in the book. Also, looking into the blog the blog states that: Dummy interfaces are functionally identical to loopbacks so the difference is mostly aesthetic. (i know that this is not 100% correct, but from a users point of view its good enough) .
With these things in mind my question is: From a users point of view what is the difference of the loopback and the dummy interface? i would say.. there are no difference between them, and when there are no difference, why should we bother the user with having a difference between them?
I now would propose a new naming scheeme for these interfaces:
[email protected]# set interfaces loopback ? Possible completions: > lo Main Loopback interface > loN Dummy Loopback interface > dumN Dummy Loopback interface
Here i've extended the loopback type to also include dummy interfaces, the lo interface is still the Main linux lo interface, but creating eg. lo0 or dum0 will create a dummy interface instead, but still inside the loopback type. The dumN naming scheme is still allowed because interfaces today uses that naming scheme and it might(?) be hard to create interface name change migration scripts.
The following naming scheme is quite easy to make possible by a small change in interfaces/loopback/node.def eg. like this:
tag: priority: 300 type: txt help: Loopback interface name syntax:expression: pattern $VAR(@) "^(lo|lo[0-9]+|dum[0-9]+)$" ; "name must be lo, lo0-lo9999 or dum0-9999" val_help: lo; Main Loopback interface val_help: loN; Dummy Loopback interface val_help: dumN; Dummy Loopback interface create: if [ "$VAR(@)" != "lo" ] then # Check if the dummy module is loaded [ -d /sys/module/dummy ] || sudo modprobe dummy sudo ip link add name $VAR(@) type dummy fi sudo ip link set $VAR(@) up delete: if [ "$VAR(@)" != "lo" ] then sudo ip link set dev $VAR(@) down sudo ip link delete dev $VAR(@) if
the only thing necessary to implement after this is a way to disable the interface like its possible on dummy interfaces today, and i don't think that will be a big problem as long as it don't allows disabling of the linux lo interface, but only the dummy interfaces.
I'm now asking to the community and maintainers of vyos. What is your standpoint in this? if i don't get a lot of negative feedback on this i will prepare an PR for this.