In this article the reader will learn the steps needed to configure an EdgeRouter X, X-SFP, or EdgePoint R6 as a Layer 2 switch with the option for the switch ports to be VLAN aware.
NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on the following EdgeRouter models:
Table of Contents
Switch Wizard Configuration (Recommended)
The latest EdgeOS firmware includes a built-in wizard to easily configure the EdgeRouter as a Layer 2 switch and includes a VLAN Aware option.
GUI: Access the Graphical User Interface (GUI).
1. Navigate to the Wizards tab and run the switch wizard.
Wizards > Switch
2. Define the management access settings. The available options are:
Management VLANOptionally set the VLAN ID which is used for the management traffic.
DHCPBy default the router will obtained an IP address using DHCP.
StaticConfigure this option if you want to set a static IP address.
UsernameSet to ubnt by default. We strongly recommend that you configure your own user account with a strong password.
3. Configure the EdgeRouter as a VLAN Aware switch. The available options are:
pvidUntags a certain VLAN on a switch port. Supports only a single value per interface.
vidTags a VLAN or multiple VLANs on a switch port. Supports multiple values per interface.
NOTE: If you set the pvid value on a switch port that is also tagging other VLANs with vid, the VLAN set with pvid will become the native VLAN.
4. Apply the changes and reboot the router when prompted.
The example below enables the VLAN Aware feature and defines the following VLAN switch port settings:
eth4Tagged VLAN20,30,40 with untagged (native) VLAN10.
eth5Tagged VLAN20,30,40 with untagged (native) VLAN10.
ATTENTION: It is recommended to use the wizard above instead of manually configuring the L2 switch functionality.
1. With the device in the factory default state, connect an Ethernet cable from a computer to the eth0 interface on the EdgeRouter.
2. Configure a static IP address of your computer in the 192.168.1.0/24 range.
3. Open a Web Browser and enter https://192.168.1.1 in the address bar.
4. Log into the router using the default credentials.
5. Configure the switch0 interface and provide it with an IP address.
Dashboard > switch0 > Actions > Config
Address: Manually define IP address
6. Associate the switch0 interface with the relevant switch ports, excluding the eth0 interface.
Dashboard > switch0 > Actions > VLAN
VLAN Aware: Unchecked
7. Replug the computer from the eth0 interface one of the ohter interfaces and change the static IP to an address in the 10.0.0.0/24 range.
8. Open a Web Browser and enter https://10.0.0.1 in the address bar.
9. Remove the IP address from the eth0 interface.
Dashboard > eth0 > Actions > Config
Address: No address
10. Associate the switch0 interface with the eth0 interface.
Dashboard > eth0 > Actions > VLAN