4MB image with GRE

I am struggling to create an 4MB flash image that has GRE. I have two TP LINK WA801ND spare and want to put them to use by using them as a Point-to-Point bridge carrying VLANs over a wireless connection. A couple nice things about these devices is they are PoE capable and they have detachable antennas which I intend to replace with directional antennas.

Under make menuconfig I deselect everything I don't want such as the firewall, odhcp, dnsmasq, etc but I still can't get it to create the <4MB flash image. The file just doesn't exist at the end of the compile.

Just wondering how I can compile the <4MB image file. I would like basic Luci installed if possible and don't need anything else except the basics and GRE.

Thanks for the advice.

Cramming Luci into just 4MB is going to be tough: https://openwrt.org/docs/guide-user/additional-software/saving_space

1 Like

Devices with only 4 MB flash are below minimum system requirements and aren't supported anymore, https://openwrt.org/supported_devices/432_warning.

I'm using 18.06.9

Using the stock image I tried to install GRE using opkg but it complained not enough space remaining. I thought I would try to compile my own image by selecting stock tl-wa801nd-v3 image and then using menuconfig to deselect everything I don't need such as dhcp, dns, fw etc and add in GRE. Apparently still won't fit. I can't believe GRE takes up more room than the modules I had disabled.

18.06.x and 19.07.x are EOL and insecure (especially so for 18.06.x, which has been EOL for quite a while), neither of these should be used, at all.

If it's just for internal use as a p-p link then, yes, it isn't strictly secure but if it's behind a firewall then I'd be comfortable using an older version of openwrt.
I have a few wr701 with 19.07 on them with luci, gre and vxlan. They are cut down builds as per the wiki with no firewall, ipv6, ppp or opkg code. ymmv

this is my intention. They are only acting as wireless bridges. But I think support for older versions is not forthcoming. I'll try and work it out on my own. I suspect lots of trial and error.

fwiw I use image builder and this is my build script for wr703 4m, I think the wr801 is similar
I use vxlan but my previous build was using gre, just delete the vxlan reference and add luci-app-gre to the include list.

wget https://downloads.openwrt.org/releases/19.07.9/targets/ath79/tiny/openwrt-imagebuilder-19.07.9-ath79-tiny.Linux-x86_64.tar.xz

rm -R openwrt-imagebuilder-19.07.9-ath79-tiny.Linux-x86_64

tar -Jxvf openwrt-imagebuilder-19.07.9-ath79-tiny.Linux-x86_64.tar.xz

rm openwrt-imagebuilder-19.07.9-ath79-tiny.Linux-x86_64.tar.xz 

cd openwrt-imagebuilder-19.07.9-ath79-tiny.Linux-x86_64

make CONFIG_IPV6=n image PROFILE="tplink_tl-wr703n" PACKAGES=" -opkg -dnsmasq -firewall -ip6tables -iptables -kmod-ip6tables -kmod-ipt-conntrack -kmod-ipt-nat -kmod-ipt-core -kmod-ipv6 -kmod-ipt-offload -kmod-nf-conntrack -kmod-nf-conntrack6 -kmod-nf-ipt -kmod-nf-ipt6 -kmod-nf-nat -kmod-nf-nathelper -kmod-ppp -kmod-pppoe -libip6tc0 -odhcp6c -odhcpd -odhcpd-ipv6only -ppp -ppp-mod-pppoe uhttpd uhttpd-mod-ubus libiwinfo-lua luci-base luci-mod-admin-full luci-theme-bootstrap vxlan ip-full"


1 Like

is VXLAN similar to GRE i.e. can I use it as a VLAN trunk over wireless ?

yes.
Note you have to do a cli config for the 19.07.9 image to configure vxlan.
gre works as well. There is a thread regarding setup using gre for trunking over wifi and i've posted another regarding vxlan setup.
the gre package is slightly smaller than the vxlan packages but nothing major. I used vxlan mainly to try it out and see, no real reason why I didn't use gre.

Your script worked and I was able to build for 18.9.06 but not 19.07.9 the router refusing to flash the 19.x firmware. No biggie. 18.x is exactly what anyway and there was even enough room to have vxlan and GRE both installed so I can play around with both tunneling protocols.

It's a while since I flashed the router but I see to remember that I had to do it from the cli, run some commands to flush some buffers then download the firmware via scp or wget. It is pushing the device limits.
https://openwrt.org/docs/guide-user/installation/sysupgrade.cli

can I confirm with you that I need to setup the tunnel between the 2 wireless bridging devices or between the remote wireless bridging device on the gateway router ?

Pretty much follow this thread but substitute the vxlan for gre
https://forum.openwrt.org/t/trunking-over-wireless/27517/13

1 Like

had a chance to try to config VLANs over WIFI. Everything works well. Other posters tips on keeping interface names to 4 characters or less and boosting MTU settings helped with overcoming early issues. Below is my config for future reference and if anyone else might be interested in doing the same. Both devices are TP Link WR801nd running 18.06 and have detachable antennas which allows me to replace them with directional antennas. WDS is configured and runs flawlessly on these devices and connects 2 otherwise disparate networks e.g:

ISP - Router - CPE1 ... CPE2 - AP6 - AP7
' - wired '
' ... WiFi '

CPE1 /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/qca953x_wmac'
	option channel 'auto'
	option htmode 'HT40'
	option txpower '0'
	option country '00'
	option legacy_rates '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option wds '1'
	option ssid 'CPE_WDS'
	option encryption 'psk2+ccmp'
	option key '6t$rw#V*xdchk'
	option mode 'ap'
	option wpa_disable_eapol_key_retries '1'

CPE1 /etc/config/network

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

config globals 'globals'
	option ula_prefix 'fd13:41ea:6bfd::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.1.8'
	option gateway '192.168.1.2'
	option dns '192.168.1.2'
	option stp '1'

config interface 'tap'
	option proto 'gretap'
	option mtu '1558'
	option ipaddr '192.168.1.8'
	option peeraddr '192.168.1.9'
	option force_link '1'

config interface 'b2'
	option type 'bridge'
	option proto 'dhcp'
	option ifname '@tap.4 eth1.4'
	option ipv6 '0'

CPE2 /etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/qca953x_wmac'
	option channel 'auto'
	option htmode 'HT40'
	option country '00'
	option legacy_rates '0'
	option txpower '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option mode 'sta'
	option wds '1'
	option ssid 'CPE_WDS'
	option encryption 'psk2+ccmp'
	option key '6t$rw#V*xdchk'
	option network 'lan'

CPE2 /etc/config/network

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

config globals 'globals'
	option ula_prefix 'fdb5:6100:542d::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.1.9'
	option gateway '192.168.1.2'
	option dns '192.168.1.2'
	option stp '1'

config interface 'tap'
	option proto 'gretap'
	option mtu '1558'
	option ipaddr '192.168.1.9'
	option peeraddr '192.168.1.8'
	option force_link '1'

config interface 'b2'
	option type 'bridge'
	option proto 'dhcp'
	option ifname '@tap.4 eth1.4'
	option ipv6 '0'

Also tried VXLAN over WiFi successfully (notice the mtu on LAN to 2048).

CPE01

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

config globals 'globals'
        option ula_prefix 'fd13:41ea:6bfd::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.1.8'
        option gateway '192.168.1.2'
        option dns '192.168.1.2'
        option stp '1'
        option mtu '2048'

config interface 'vxlan0'
        option proto 'vxlan'
        option peeraddr '239.1.1.1'
        option vid '4'
        option tunlink 'lan'

config interface 'b2'
        option type 'bridge'
        option proto 'dhcp'
        option ifname '@vxlan0.4 eth1.4'


CPE02

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

config globals 'globals'
        option ula_prefix 'fdb5:6100:542d::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.1.9'
        option gateway '192.168.1.2'
        option dns '192.168.1.2'
        option stp '1'
        option mtu '2048'

config interface 'vxlan0'
        option proto 'vxlan'
        option peeraddr '239.1.1.1'
        option vid '4'
        option tunlink 'lan'

config interface 'b2'
        option type 'bridge'
        option proto 'dhcp'
        option ifname '@vxlan0.4 eth1.4'

some performance comparison using VXLAN over wireless

-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.4.116, port 57884
[  5] local 192.168.4.3 port 5201 connected to 192.168.4.116 port 57886
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  4.99 MBytes  41.8 Mbits/sec
[  5]   1.00-2.00   sec  5.63 MBytes  47.2 Mbits/sec
[  5]   2.00-3.00   sec  5.56 MBytes  46.6 Mbits/sec
[  5]   3.00-4.00   sec  6.04 MBytes  50.6 Mbits/sec
[  5]   4.00-5.00   sec  5.48 MBytes  46.0 Mbits/sec
[  5]   5.00-6.00   sec  5.59 MBytes  46.9 Mbits/sec
[  5]   6.00-7.00   sec  5.90 MBytes  49.5 Mbits/sec
[  5]   7.00-8.00   sec  5.69 MBytes  47.7 Mbits/sec
[  5]   8.00-9.00   sec  5.59 MBytes  46.9 Mbits/sec
[  5]   9.00-10.00  sec  5.79 MBytes  48.6 Mbits/sec
[  5]  10.00-10.08  sec   431 KBytes  43.2 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.08  sec  56.7 MBytes  47.2 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.1.9, port 49432
[  5] local 192.168.1.3 port 5201 connected to 192.168.1.9 port 49434
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  6.27 MBytes  52.6 Mbits/sec
[  5]   1.00-2.00   sec  7.48 MBytes  62.8 Mbits/sec
[  5]   2.00-3.00   sec  7.66 MBytes  64.3 Mbits/sec
[  5]   3.00-4.00   sec  7.35 MBytes  61.7 Mbits/sec
[  5]   4.00-5.00   sec  7.41 MBytes  62.1 Mbits/sec
[  5]   5.00-6.00   sec  7.50 MBytes  62.9 Mbits/sec
[  5]   6.00-7.00   sec  7.70 MBytes  64.5 Mbits/sec
[  5]   7.00-8.00   sec  7.75 MBytes  65.1 Mbits/sec
[  5]   8.00-9.00   sec  7.54 MBytes  63.2 Mbits/sec
[  5]   9.00-10.00  sec  7.57 MBytes  63.5 Mbits/sec
[  5]  10.00-10.05  sec   361 KBytes  64.2 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-10.05  sec  74.6 MBytes  62.3 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

What is this a test/comparison of?

the first set shows packets going over wifi through the tunnel. the second packets going over the same wifi connection outside the tunnel as they would normally do if there was no tunnel setup. It shows that going through the tunnel there is an overhead cost of about 20% i.e. 47.2 Mb/s going through the tunnel compared to 62.3 Mb/s outside the tunnel