EdgeRouter - Create Virtual Interfaces with VLAN IDs
Overview
Readers will learn how to add VLAN Virtual Interfaces (VIFs) to either Ethernet or switch ports on different EdgeRouter models.
NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on all EdgeRouter models. Please see the Related Articles below for more information.
Devices used in this article:
Adding a VIF to an Ethernet Interface
Follow the steps below to create a virtual interface with a VLAN ID of 10 and address 10.0.10.1/24 on the eth1 interface:
GUI: Access the EdgeRouter Web UI.
Dashboard > Add Interface > Add VLAN
VLAN ID: 10
Interface: eth1
Address: Manually define IP address > 10.0.10.1/24
The above configuration can also be set using the CLI:
CLI: Access the Command Line Interface.You can do this using the CLI button in the GUI or by using a program such as PuTTY.
configure set interfaces ethernet eth1 vif 10 address 10.0.10.1/24 commit ; save ; exit
You can verify the configuration with the show interfaces command.
show interfaces Interface IP Address S/L Description --------- ---------- --- ----------- eth1 - u/u eth1.10 10.0.10.1/24 u/u
Adding a VIF to the Switch0 Interface
ATTENTION: This configuration only applies to models with a built-in switch (ER-12 / ER-10X / ER-X / ER-X-SFP / ERPoE-5 / EP-R6).
Follow the steps below to create a virtual interface with a VLAN ID of 10 and address 10.0.10.1/24 on the switch0 interface:
GUI: Access the EdgeRouter Web UI.
Dashboard > Add Interface > Add VLAN
VLAN ID: 10
Interface: switch0
Address: Manually define IP address > 10.0.10.1/24
The above configuration can also be set using the CLI:
CLI: Access the Command Line Interface.You can do this using the CLI button in the GUI or by using a program such as PuTTY.
configure set interfaces switch switch0 vif 10 address 10.0.10.1/24 commit ; save
You can verify the configuration with the show interfaces command.
show interfaces Interface IP Address S/L Description --------- ---------- --- ----------- switch0 - u/u switch0.10 10.0.10.1/24 u/u
Related Articles
Intro to Networking - How to Establish a Connection Using SSH