Cannot configure vrf for loopback interfaces

As long as IP-address is not set ( it doesnt matter but if IP-address is set and vrfs are being used it would be nice to be able to define in which vrf the loopback should exist in.

Using version VyOS 1.4-rolling-202306290317


You can use dummy interface instead. It’s just like a loopback interface.

1 Like

Got an example for that?

I still think loopback should be able to do vrfs because “thats how others do it” :slight_smile:

I think the confusion here might be that in linux loopback interfaces (lo) are always as in “speak to myself where only myself is allowed”.

While in the router/switch world the loopback interfaces are just a virtual interface thats always on and make it possible for others to speak to the device. The loopback interfaces in the router/switch world are also almost always /32 in IPv4 or /128 in IPv6.

For example not uncommon to use loopback interfaces as a source for BGP process when peering with others and in that case when the box is doing vrf’s this loopback interface will not be available in the other vrfs (both as a security feature but also which routing table to be used).

Use dummy interface as @j.landicho wrote.

I think its wrong to call them “dummy” instead of “loopback” which is the de facto standard when it comes to networking.

I would suggest to rename todays “loopback” into “kernel_loopback” or “local” or similar and rename “dummy” into “loopback” to better match how the rest of the routing/switching world defines what a “loopback interface” really is.

1 Like

Thank for you inputs. This was also suggested before.

You can read it here.