lime-proto-wan add support for VLAN on WAN#1236
Conversation
|
Amazing, thanks! I just tested it and seems ok. I'm approving it. Feel free to merge it yourself when you consider it complete. Tested on:
Details of tests: A. on the Cudy (connected to the internet via 80211s):
B. on the OpenWrt One:
Then I connected via cable the Cudy lan1 port to the OpenWrt One's wan port and the latter reach the internet successfully. I'd maybe repeat in lime-docs the section to disable the autogeneration of lime-hwd-openwrt-wan, because I tend to forget it Near the section |
|
I changed the section name and added the configuration option there, it works for me, so I merge. Thanks for the testing!!! |
I am using a LibreMesh router directly connected to an Optical Network Terminal.
My ONT communicates exclusively on VLAN 20 (type 802.1q), so the
wanproto needs to support thewan:20syntax, as already happens with the routing protocols (e.g.list protocols babeld:17).With the routing protocols, the VLAN type defaults to 802.1ad, but here I think that the scenario I described is the predominant use case, and works with 802.1q. So I decided that the type defaults to 802.1q for lime-proto-wan.
In order to create a VLAN device without creating also the OpenWrt interface, I made a function
network.createDevicecopying the code fromnetwork.createMacvlanIface.The main problem of having also the OpenWrt interface, is that OpenWrt's firewall would add wan_20 (wan with VLAN ID 20) to the LAN set of interfaces, allowing traffic to all ports.