Dummy Interface Configuration ?!

Hi,

I’m trying to configuring dummy interfaces, but not able to find any configuration examples..

Can anyone share a simple working example of the BGP configuration required for accessing the dummy interface over any interface as explained here..

Thanks..

I created a dummy interface, assigned it an IP address, and the VyOS has 2 physical interfaces, but the dummy interface was not reachable..

I might be understanding this incorrect..

Do I need to have IP address assigned to both the Physical and Dummy interfaces, and then have routing in between ?!

what you are searching for is loopback, which is reachable across all interfaces. or is there a reason to rely on dummy interfaces? usually you would use loopback interfaces…

correct me if im wrong.

You are right, I knew about loopback and I thought it was the same as dummy except the fact there can only be 1 loopback interface..

The plan was to have a dummy interface for management, and another 1 for bgp peering..

Does assigning multiple IP addresses to the lo interface help you out?

Didn’t occur to me that is possible, I’ll check that as well..

Dummy interfaces are analogous to loopback interfaces for VyOS. You use them the same as you would loopback addresses in something like Cisco.

Thanks for clarifying @L0crian

Dummy interface is the Linux lingo of loopback interface.

While something like VRF which exists both in Linux and regular NOS (like Cisco, Arista etc) doesnt work the same.

With regular NOS when doing VRF that will (with Linux lingo) also include NETNS (network namespace) in the background. So a headsup when you use VRF in VyOS which isnt the same level of separation as VRF in Cisco, Arista and the other NOSes.

Loopback and dummy interfaces are different.

For example if you set on loopback 192.0.2.1/24, you can ping the whole network

192.0.2.2, 192.0.2.3-192.0.2.254, etc.. It will bind it to loopback

vyos@r14# run ping 192.0.2.2
PING 192.0.2.2 (192.0.2.2) 56(84) bytes of data.
64 bytes from 192.0.2.2: icmp_seq=1 ttl=64 time=0.042 ms
^C
--- 192.0.2.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.042/0.042/0.042/0.000 ms
[edit]
vyos@r14# run ping 192.0.2.3
PING 192.0.2.3 (192.0.2.3) 56(84) bytes of data.
64 bytes from 192.0.2.3: icmp_seq=1 ttl=64 time=0.022 ms
^C
--- 192.0.2.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.022/0.022/0.022/0.000 ms

vyos@r14# run ping 192.0.2.254
PING 192.0.2.254 (192.0.2.254) 56(84) bytes of data.
64 bytes from 192.0.2.254: icmp_seq=1 ttl=64 time=0.020 ms
^C
--- 192.0.2.254 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.020/0.020/0.020/0.000 ms

With dummy interface the system will assign only one host.

Thanks @Viacheslav

I’m not clear with what you man by

According to this explanation it seems that what a regular NOS such as Arista, Cisco and the others calls a loopback interface is equal to a dummy interface in the Linux world (unless I misread the info).

Since the loopback interface in Linux world is host only in its routing scope. A more proper name in Linux would have been local interface rather than loopback interface.

We see similar when it comes to VRF in a NOS vs VRF in Linux.

VRF in a NOS includes what Linux calls NETNS (network namespace) to also isolate the interface which is placed in a VRF.

While VRF in LInux is ONLY about the routingtable - there is no isolation at all meaning the interface is still available for L2-attacks and spoofed packets etc from other VRFs.

The above can also be verified for example in Arista EOS when you create a VRF and then switch to bash-mode you will see that a NETNS with the same name have also been created.

Currently (as far as I know but I havent checked this in later rolling releases) VyOS doesnt do this (will hopefully be fixed in future).

I’d most likely never notice this difference, as I would only assign /32 addresses