← Back to blog
bpdubuntu

Creating Virtual Network Interfaces and VLANs in Ubuntu

26 January 2026bpd · ubuntu

Segment Your Network for Better Security and Organization

Even if your server has only one physical network card, you can create multiple virtual interfaces on it to segment your network. The ‘Ubuntu System Administration Guide’ explains how to do this using `netplan`, Ubuntu’s modern network configuration tool.

What are VLANs?

VLANs (Virtual Local Area Networks) allow you to create separate, isolated broadcast domains on a single physical network. Devices on one VLAN cannot communicate with devices on another unless a router is configured to pass traffic between them. This is a powerful way to improve security, for example, by isolating guest Wi-Fi traffic from your main network.

Configuring a VLAN with Netplan

The book shows an example `netplan` YAML file where a VLAN is created on a physical interface. You simply define the VLAN ID (a number between 1 and 4094), link it to a physical network card, and assign it an IP address. This creates a new virtual network interface (e.g., `vlan.10`) that acts as a completely separate network, all running over a single cable.


This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13