How to set configuration in a range of interfaces?

With for example Cisco, Arista and others one can configure multiple interfaces at once by doing:

interface ethernet 1/1-48

How do I do similar with VyOS?

As far as I know, VyOS is not support it. But you can set a bridge with multiple interfaces. then you can setup and configuration on the bridge.
VyOS is a router, not a switch OS.

Yeah and both Cisco and Arista and the others does routers aswell and do support using a range when one want to configure multiple interfaces at once.

Either “int 1/1-48” or in a list “int eth1,eth4-7,eth9”.

Ill file this as a feature request then.

1 Like

Don’t compare VyOS CLI to Cisco CLI, they are two different worlds.
If you want to compare, compare it to PAN-OS, Juniper etc.

In VyOS (1.4) you can do for example:

admin@vyos-rtr# for i in eth0 eth1; do show interface ethernet $i; done

Or set

admin@vyos-rtr# for i in eth0 eth1; do set interface ethernet $i description test; done
1 Like

Thats just awful and not intuitive but sure works as a workaround.

I prefer to compare to Arista which also have a linux backend and there it works to set a interface range or selected interfaces when in config mode.

Maybe you can try Ansible to set vyos interface with jinja2 template

I know there are probably a gazillion of overcomplicated workarounds to this problem.

I would still prefer be able to do this in config mode without some 3rd party extension.

The method @pepe described will work as a workaround until this shows up on its own in the config mode like set interface ethernet 1-4,7,9,12-24

Will file this as a feature request :slight_smile:

Is there really any useful use case?
I’m against this implementation.

The usecase is when one want to add or remove a specific configuration from multiple interfaces at once.