How to set up VLAN in OPNsense

From Thomas-Krenn-Wiki
Jump to navigation Jump to search

Virtual Local Area Networks - VLANs - are an important tool for the network infrastructure, particularly in environments with firewall solutions such as OPNsense. They allow to divide a physical network into multiple logical networks, which improves security and organization. This article describes how to set up VLANs in OPNsense 25.1.

Assign VLAN

First, a VLAN-ID between 1 and 4094 is assigned to an interface. The ID 4095 is reserved, as in all VLAN networks.[1].

It is also possible to use an interface as Trunk by simply assigning a second VLAN with a different ID to the same interface.

Create interface

The following screenshots demonstrate the process of adding a network interface:

In Thomas-Krenn-Wiki, you will find information on how to add an OPNsense interface.

Assign IP address

Here, an IP address is assigned to the added interface. There are several options available, such as automatic address assignment using DHCP or manual configuration of a static IP address (Static IPv4). In this example, a static address assignment with the IP-address 192.168.10.1/24 is used.

Firewall rules

Note: By default, all incoming connections on this interface are blocked. To change this, you must create rules to control and secure data traffic for the VLAN you created.

References

  1. IEEE 802.1Q VLAN "Each 802.1Q VLAN is identified by a 12-bit integer called a VID (VLAN Identifier) in the range 1 to 4094 inclusive. The values 0 and 4095 are reserved and should not be used."

Template:Ederr

Translator: Alina Ranzinger

Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.


Related articles

OPNsense ice driver network card performance tuning with ice ddp module enabled on Intel E810 network cards
SSL routines tls process server certificate certificate verify failed - Authentication error
Timecounter HPET frequency 19200000 Hz quality 950