Say I have 3 different interfaces:
- LAN with static IP 192.168.1.1
- And DUMMY with IP 192.168.100.1
Normally, when a device in the LAN network tries to connect to the internet the packet is routed through the WAN interface, like so:
However, would it be possible to route the packet in the following way:
This may look weird at first, but I would like to apply hw flow offloading on the WAN interface and then apply SQM on the dummy interface, because they cannot be used at the same time on the same interface. This way, PPPoE is fully offloaded, while I can still benefit from SQM.
@dlakelan has made an excellent blog post on how to do this with a veth interface, however, I'd like to stick as much as possible to UCI's configuration if possible. Thank you very much in advance for the help
I'm not really sure but I don't think dummy interfaces do anything, in particular I don't think they have a xmit queue you can use.
For your application I think you could bridge one end of a veth with wan, and then route outbound stuff to the other veth but I suspect it will have so much overhead that the hardware flow offload will no longer make much difference. Still you could try it. Backup your config first.
I don't think UCI has a way to make veth interfaces, someone more familiar with UCI will have to help you there.
Dummy interface might not be the correct word. I simply created a separate VLAN tagged on the CPU port, and setup an interface on top of that VLAN with a static IP. Such an interface should be able to process packets, right?
Well, not really, I mean if it transmits a packet... It goes nowhere. If you patch cable it to a second port... Then that's a physical version of a veth.
I did try once to use a veth pair for routing, but it only worked for ipv6 because veth pairs do something strange with ARP packets. Probably some static ARP entries would work to get around this, or namespace magic. But I just think sending all your packets through routing and iptables twice is probably going to squash whatever savings hardware offload gives.
Do you happen to know why I am getting the following error?
root@LEDE:~# ip link set veth0 master pppoe-wan
RTNETLINK answers: Not supported
install kmod-veth perhaps?
Already did that. The creation of the veth interface was successful as far as I can tell. It's just the bridging that's running into issues. I can bridge it with my lan bridge just fine. Is it impossible to bridge a veth interface with a pppoe interface by any chance?
You need to create a bridge (br-wan) and add the veth and the pppoe-wan both into the bridge... then you're going to tell your wan that the br-wan is your wan interface (or maybe that the veth is your wan interface?) this is in uncharted territories
tell it the br-wan is the wan interface, but then use custom routing to send things to the veth