EdgeRouter - Create Virtual Interfaces with VLAN IDs


Overview


Readers will learn how to add Virtual Interfaces (VIFs) to either ethernet or switch ports on different EdgeMAX router models.

NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on all EdgeRouter models. Knowledge of the Command Line Interface (CLI) and basic networking knowledge is required.
 
Please see the Related Articles below for more information.
 
Devices used in this article:

VIF on Ethernet Interface


The following CLI / GUI steps create a virtual interface with a VLAN id of 10 and address 10.0.10.1/24 on interface eth1.

CLI: Access the command line interface (CLI). 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                 
---------    ----------                        ---  -----------                 
eth0         -                                 u/u                              
eth0.10      10.0.10.1/24                      u/u  
GUI: Access the Graphical User Interface (GUI).

Dashboard > Add Interface > Add VLAN

VLAN ID: 10
Interface: eth1
Address: Manually define IP address
10.0.10.1/24


VIF on Switch0 Interface


ATTENTION: This configuration only works on models with a built-in switch port. Example models are the ER-X, ER-X-SFP, ERPoE-5 and the EP-R6.

The following CLI / GUI steps create a virtual interface with a VLAN id of 10 and address 10.0.10.1/24 on interface switch0.

CLI: Access the command line interface (CLI). 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    
GUI: Access the Graphical User Interface (GUI).

Dashboard > Add Interface > Add VLAN

VLAN ID: 10
Interface: switch0
Address: Manually define IP address
10.0.10.1/24


Related Articles


Back to Top