VLAN: Tag-Based RUTOS
Summary
A virtual LAN (VLAN) is any broadcast domain that is partitioned and isolated in a computer network at the data link layer (OSI layer 2). LAN is the abbreviation for local area network and in this context virtual refers to a physical object recreated and altered by additional logic. VLANs work by applying tags to network packets and handling these tags in networking systems - creating the appearance and functionality of network traffic that is physically on a single network but acts as if it is split between separate networks. In this way, VLANs can keep network applications separate despite being connected to the same physical network, and without requiring multiple sets of cabling and networking devices to be deployed.
VLANs allow network administrators to group hosts together even if the hosts are not on the same network switch. This can greatly simplify network design and deployment, because VLAN membership can be configured through software. Without VLANs, grouping hosts according to their resource needs necessitates the labor of relocating nodes or rewiring data links. It also has benefits in allowing networks and devices that must be kept separate to share the same physical cabling without interacting, for reasons of simplicity, security, traffic management, or economy. For example, a VLAN could be used to separate traffic within a business due to users, and due to network administrators, or between types of traffic, so that users or low priority traffic cannot directly affect the rest of the network's functioning. Many Internet hosting services use VLANs to separate their customers' private zones from each other, allowing each customer's servers to be grouped together in a single network segment while being located anywhere in their datacenter. Some precautions are needed to prevent traffic "escaping" from a given VLAN, an exploit known as VLAN hopping.
This chapter is an overview of the VLAN function of RUT devices.
WebUI Configuration
Creating new VLANs
Go to Network → VLAN → Port-Based and click button to create two new VLANs.
Once the additional VLANs are created they can be assigned to the specific LAN port of the device. In this configuration, we have selected the following:
- LAN2 - VLAN ID 3
- LAN3 - VLAN ID 4
- LAN4 - VLAN ID 1/3/4
Note: You can Tag more than one VLAN for the Same Port with “Tagged”, meaning multiple Tagged VLANs can be used on the same Port. In this example I have turned on “Tagged” for VLAN 1 and VLAN 3 and VLAN 4 on LAN 4 for testing later.
Creating new LAN interfaces
Navigate to Network → LAN and click on button.
The configuration window will appear, where you will have to make following changes:
- Enable - On
- Name - LAN_2 (Enter your preferred name for the instance)
- Protocol - Static
- IPv4 address - 192.168.10.1 (Enter the your preferred subnet IP address)
- IPv4 netmask - 255.255.255.0 (Enter your preferred subnet netmask)
- Enable DHCPv4 - On
- Save & Apply
Once the you have done editing the General settings tab, click on Physical settings where you will need to select your recently created virtual LAN interface.
- Bridge interfaces - On (Optional, creates a bridge over specified interface(s).)
- Interface - eth0.3 (Virtual interface for VLAN ID 3)
- Save & Apply
Note: Enabling DHCPv4 creates a new DHCP server instance for defined subnet. DHCP settings can be changed by navigating to Network → DHCP → Server settings and clicking Edit on your created DHCP server.
Repeat LAN interface creation accordingly to your created VLAN count. After the configuration is done, your created LAN interfaces should appear "Running"
Testing VLAN Configuration
Navigate to System → Maintenance → CLI
Once connected to the CLI execute route-n command, which will output your devices routing table. Inside the routing table you will be able to see your created VLAN subnets.
To confirm whether the changes were effective, download and run the Realtek Ethernet Diagnostic Utility.
Realtek Ethernet Diagnostic Tool
Change your wired connection from your PC to Ethernet Port 4 on the Router.
Open the Realtek Ethernet Diagnostic Utility application on your PC.
Click on "Realtek PCIe Gbe Family Controller"
Select VLAN tab
Right and click "Add" button and type VLAN ID 3 to the box on the If done correctly this will cause you to lose network service since VLAN 3 is not added to LAN Port 4
Delete VLAN ID 3 from the Utility and add VLAN ID 4. Your network should be back online after a few moments.
Open Command Prompt on your pc and enter the command ipconfig /all. You will see that you now have an IP address from the LAN_3 network.
Delete VLAN ID 3 and add VLAN ID 1 and enter the ipconfig /all command in Command Prompt again and you should receive an IP address from the LAN network.