Using a single ethernet port board as sqm

Hello, i have redmi ac2100 with openwrt on it, and an old x86 nettop connected to one of its lan ports. However, ac2100 can't handle SQM with my 500/500 connection, so i was wandering, can i somehow use the old x86 pc as sqm for my network? I figured it would be possible if got a usb-ethernet adapter and made the old pc main router, but is it possible with only one ethernet port?

I'm certain this is possible one way or another. Maybe @trendy can advise since it strikes me that this is something of a routing challenge.

Hi

in theory, you could split one ETH port to many using VLANs
it is standard technique
but 500/500 will saturate one single port quickly
and using USB dongle is ... maybe problematic
if this is an OLD pc, then its missing USB3 ports, and USB2 will be slow for 500 mbit

3 Likes

What are the specs for the old pc? I would use a 1L (dell optiplex, lenovo thinkcentre, hp prodesk) pc with 1Gbe port with at least 4th gen Intel i3 without a dedicated gpu. They have low idle power consumption - about 10W from the wall and can handle gigabit SQM fine.

500/500 can almost be handled with a single gigabit ethernet port. You will get the full speed unless you are simoultaneously uploading and downloading in which case it will be about 415/415Mbps.

@NPeca75 @zekica
Foxconn at7500
It does have gigabit ethernet and 4 usb 3.0 ports

And it looks like it's full-duplex

This PC with it's integrated ethernet should be enough. You just need to set up two vlans between the two devices.

How do you route from the router to the PC and back though? That's what I'd struggle with.

Thanks for answering, however i'm not very familiar with VLANS, neither do i have the network->switch menu on my openwrt device, which is the way i saw simillar thing done on google, so i'd be really grateful if i could get some advice on that

Yea, that is exactly what im struggling with

It's categorically possible and I suspect trivially so, once known. I'm hoping @trendy or someone else reading this thread can set out the requisite steps. I don't know if VLANs is strictly necessary.

PBR routing might help?

Thanks for answering, i'll try that

If you go with one ethernet port, you'll have a router on a stick and you'll need a managed switch capable of configuring VLANS. One vlan will be assigned to the wan interface and another on lan interface. Then on the switch you'll allocate the ports accordingly to which vlan the devices should be connected.
Otherwise you can buy a usb3 to gigabit ethernet adapter and add an extra port to the router.

You need to generally do the following:

On Redmi ac2100:

  • completely remove WAN and WAN6 interfaces, Apply
  • add the WAN port to the br-lan bridge, disconnect the ISP modem and Apply
  • enable vlan filtering on br-lan and create two VLANs, but don't apply yet:
    • vlan id 1: lan, set Untagged and PVID on ports "lan1", "lan2", "lan3"
    • vlan id 2: wan, set Tagged on ports "lan1" and Untagged/PVID on "wan"
  • in LAN interface select br-lan.1 as the device, Apply
  • change LAN IP from 192.168.1.1 to 192.168.1.2, disable DHCP and "Apply Unchecked", then try opening the router on http://192.168.1.2/
  • now you can reconnect the ISP modem

On the PC:

  • install OpenWRT:
  • connect that PC to "lan1" (port you set as vlan2 tagged)
  • on another PC you already used to access the Redmi router, open http://192.168.1.1
  • in Network / Interfaces / Devices, create a new "VLAN" interface and type "Vlan ID" 2
  • in Network / Interfaces / Interfaces, create a new interface, name it "wan" and choose the appropriate protocol (DHCP Client or PPPoE) that you were using in the "wan" interface on the Redmi router
  • if using IPv6, add "wan6" interface too.
  • after you get internet access, install luci-app-sqm and use "eth0.2" as the device to apply SQM to

Note: set up all firewall rules on the PC, while using the Redmi router as just an AP and VLAN switch.

2 Likes

Thanks a lot for helping out, however i seem to have missed some important steps. Which device should i use to create the wan interface, the newly created vlan 2 one? And also by default i only seem to have eth0, should i create a new vlan device which is eth0.1?

Yes, you need to create a new vlan device. I meant eth0.2 instead of eth0.1 on the pc, can you fix this?

Wan should be configured on the PC - it is going to be the router.

Thanks a lot man, for now i reverted back to my previous config, i'll try that tomorrow. And also about the default br-lan interface, should i change the device of it to the created eth0.2(on the pc) ?

No need to change anything. You use eth0 (untagged) as a part of br-lan, and separately use eth0.2 for wan.

I'm typing to you from my fresh 480/480 SQMed connection, it worked, thank you, you're a saviour

2 Likes

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