VLAN sub-interfaces (802.1Q)

Created by Yuriy Andamasov, Modified on Wed, 17 Jan at 4:37 PM by Srividya Anantapatnaikuni

Article review date
2024-01-17
Validated for VyOS versions
1.2.5, 1.3.5, 1.4.0, 1.5.x

802.1Q VLAN interfaces are represented as virtual sub-interfaces in VyOS. The term used for this is vif. Configuration of a tagged sub-interface is accomplished using the configuration command set interfaces ethernet vif .

vyos@vyos-rtr# set interfaces ethernet eth1 vif 100 description 'VLAN 100'
vyos@vyos-rtr# set interfaces ethernet eth1 vif 100 address '192.168.100.1/24'

Resulting:

ethernet eth1 {
address 192.168.0.1/24
description INSIDE
duplex auto
hw-id 00:0c:29:44:3b:19
smp_affinity auto
speed auto
vif 100 {
address 192.168.100.1/24
description "VLAN 100"
}
}

VLAN interfaces are shown as ., e.g. eth1.100:

vyos@vyos-rtr:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description
----------- ------------- --- -----------
eth0 172.16.51.129/24 u/u OUTSIDE
eth1 192.168.0.1/24 u/u INSIDE
eth1.100 192.168.100.1/24 u/u VLAN 100
lo 127.0.0.1/8 u/u
::1/128
vyos@vyos-rtr:~$

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article