X86 VLANs overloaded CPU

Such a possibly stupid question. I have an x86 router on which I plan to make a VLAN, but I want to make sure that the CPU is not overloaded because of it. So I still have a smart Mikrotik switch that can do VLAN. The question is, will the main router continue to be burdened, or will the Switch take care of it?

Unless your router is already on the verge of being overloaded it should be fine with a VLAN.

2 Likes

Hi

in this case, your general question is irrelevant (almost)
using PC as router will always use CPU because there is no dedicated switch for L2/L3 offloading between PC (multiple) ports

so for your general question, answer will be: there is no difference if you using vlans or not on PC router
CPU is strong enough to deal with routing/masquerading

2 Likes

x86 platform is usually much more powerful than MISP and ARM counterparts. Old Chinese x86 routers usually use an Atom 2xxx or 3xxx, while modern ones usually use Intel mobile Core i CPU. Even an ancient Atom D525 should not have any issue.

If you want to make it complicated like me, you can try running OpenWrt as a QEMU virtual machine. It has emulation overhead, but it is more portable because you can easily move the virtual machine around.

1 Like

The Switch will be there anyway, I was just wondering how it works. So, if I understand it correctly, the Switch will not take the load off the router at all. I thought that perhaps thanks to the Switch, copying files would be faster than if it had to go through the CPU of the router.

You need to study the basics of computer networking first. The Ethernet switch works at Layer-2, which creates a broadcast domain (because any host can send a broadcast packet to the MAC address ff:ff:ff:ff:ff:ff). You can run multiple Layer-3 networks on top of the underlying Layer-2 network: let's assume that you have an IPv4 and an IPv6 networks. When you copy files from one host to another, the operating system always prefers using IPv6 over IPv4, but no matter which Layer-3 network is used, the data goes to the Layer-2 network and the switch moves the data from one host to another. No router is involved.

The router is involved only when you copy files from one Layer-3 network (e.g: 192.168.1.0/24) to another (e.g: 192.168.2.0/24). The source computer does not know where the destination computer is, so it has to use the router as a middle man.

I have a problem when I create a VLAN on my x86 (CPU - N5105) router and configure ex. switch I start losing internet connection. It always works for a while and it doesn't for a while. What is causing this problem?


config interface 'loopback'
	option device 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option packet_steering '1'
	option ula_prefix 'fd65:6388:7a93::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth1'
	list ports 'eth1.10'
	option vlan_filtering '1'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.88.1'

config device
	option name 'br-guest'
	option type 'bridge'
	list ports 'eth1.20'
	list ports 'eth2.20'
	list ports 'eth3.20'
	option vlan_filtering '1'

config interface 'guest'
	option device 'br-guest'
	option proto 'static'
	option ipaddr '192.168.2.1'
	option netmask '255.255.255.0'

config device
	option name 'eth1.10'
	option type '8021q'
	option ifname 'eth1'
	option vid '10'

config device
	option name 'eth1.20'
	option type '8021q'
	option ifname 'eth1'
	option vid '20'

config interface 'wan'
	option device 'eth0'
	option proto 'pppoe'
	option username 'jdoaodkald@.t-mobile'
	option password 'kljdflsdd45fs6'
	option ipv6 'auto'
	option peerdns '0'
	list dns '8.8.8.8'

config interface 'wan6'
	option proto 'dhcpv6'
	option device 'eth0'
	option reqaddress 'try'
	option reqprefix 'auto'



I had the same VLANs on a Mikrotik (RouterOS) router before and it worked fine
Switch settings


Take that line out. When running a trunk port with VLANs, don't refer to the base port without a VLAN number anywhere in your configuration.

No, I'll lose all access

Port eth1 goes to switch port 1. To switches on ports 2,3,4 etc... No internet.

Set the switch to "Only Tagged" on port 1. Packets coming from the router should be tagged 10 then have the tag removed by the switch as they pass to an "access" port like port 2. Configuring a Mikrotik switch is beyond the scope of this forum though.

It works kind of weird. It must be some kind of OpenWrt bug. I don't have a problem with the Router OS the Switch should not be interfered with at all when the VLANs are still the same, yet it fails to work properly...

According to this, it shouldn't be as you wrote either.

https://wiki.mikrotik.com/wiki/SWOS/CSS326-VLAN-Example

Ok, it seems that it was really necessary to completely reconfigure the Switch. Now it seems to work as expected. I will test for a few days. Thanks for the help.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.