TP-Link Archer C7 With OpenWRT - PAPPP's Rambling
Maybe your like
I bought myself a TP-Link Archer C7 because the 2.4Ghz congestion in my apartment has become so terrible that my good old TP-Link WR1043ND (no 5Ghz radios) is no longer adequate, and the C7 was very well spoken of among reasonably-priced 802.11ac routers. It also has some nice perks like two on-board USB ports, so I can use it as a print server (with p910nd) and have USB storage for logs (vnstat & co.) and such attached without a separate hub. I wasn’t feeling quite motivated enough to buy and set up one of the NUC-like cheap SFF Intel boxes as a router like Ars Technica and Jeff Atwood have recently noted is an increasingly good plan, based largely on the dearth of ac WiFi cards that work reliably in host mode.
Some notes that may be of use to others, particularly about firmware replacement on recent models and throughput:
Flashing OpenWRT
As usual with routers, one of the first bits of business is replacing the untrustworthy vendor firmware with an reputable open-source offering like OpenWRT. The recent TP-Link firmwares refuse to load unsigned firmware as updates (Thanks FCC!), so you have to do the TFTP thing. Since I have to look up this ritual with the current Linux tools every goddamn time, a list of steps follows. I think I could do it right from memory on a vaguely-modern BSD, even though I don’t use them often, because they improve their core utils instead of periodically replacing them with uglier ones that implement a larger (but not proper super-) set of features.
The router expects a file named “ArcherC7v2_tp_recovery.bin” (Wiki says it may want other names depending on version details) via TFTP from 192.168.0.66 (NOT .1.66 as some sources say) attached to LAN port 1, and will make its request from 192.168.0.86. I know this in unnecessary detail because I had to go several rounds and break out Wireshark to make everything happy.
- Grab a worthwhile TFTP server, I used tftp-hpa, which installs as in.tftpd on ArchLinux to avoid conflict with the near-worthless iputils tftpd binary.
- Physically plug an Ethernet cable from your machine to LAN1 on the router.
- Attach your host at the appropriate address ip addr add 192.168.0.66/24 dev enp3s0f1
- Make sure the interface is alive: ip link set dev enp3s0f1 up
- Plop the file where your tftp server is looking, mv ~/Downloads/openwrt-15.05-ar71xx-generic-archer-c7-v2-squashfs-factory.bin /srv/tftp/ArcherC7v2_tp_recovery.bin or so.
- Start the TFTP server: in.tftpd -L --address 192.168.0.66:69 -s /srv/tftp/
- Reboot the router while holding the WPS/Reset button.
- Watch it do its thing for a while.
- Disconnect and reconnect to get a lease in the 192.168.1.x range, find LUCI at 192.168.1.1.
LAN/WAN Throughput
A note in the OpenWRT wiki and this thread suggest it will take a non-trivial LAN-WAN throughput hit when switching to OpenWRT, because the stock firmware has a customized 2.6.31 kernel that can do NAT/Fragment/Defragment/csum with hardware acceleration, and OpenWRT can not.
Because of this, I felt the need to make a rough test of throughput before and after rejecting their firmware and substituting my own. The test was performed using two laptops with gigabit NICs, one acting as the “WAN” by running dnsmasq leasing in the 10.1.254.0/24, and one on the LAN side, I forwarded the port 5001 to the client (leased 192.168.1.195), ran an iperf server there, then hit the router with iperf from the “WAN” to get a shitty quick estimate. This guarantees it had to actually manipulate the packets, but is only a single connection.
So, TP-Link Archer C7, LAN-WAN throughput, through forwarded port:
Stock firmware, as shipped 2016-01
[pappp@Talaiot ~ $]iperf -s -B 192.168.0.100 ------------------------------------------------------------ Server listening on TCP port 5001 Binding to local address 192.168.0.100 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.0.100 port 5001 connected with 10.1.254.1 port 50382 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 1.01 GBytes 869 Mbits/sec
OpenWrt Chaos Calmer 15.05 / LuCI (git-15.248.30277-3836b45)
[pappp@Talaiot ~ $]iperf -s -B 192.168.1.195 ------------------------------------------------------------ Server listening on TCP port 5001 Binding to local address 192.168.1.195 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.1.195 port 5001 connected with 10.1.254.1 port 52068 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 593 MBytes 497 Mbits/sec
So yes, the OpenWRT Wiki’s note about going from 800-900Mbits/sec to around 500Mbits/sec is still consistent with reality, and still largely irrelevant because ≥500Mbit uplinks are rare.
Conclusion
OpenWRT is still great, TP-Link still makes great hardware. While I was moving my configs (which in OpenWRT are just easily-parsed text files in /etc/config, not emulated NVRAM variables or other madness), I thought I found a deficiency in OpenWRT’s static lease handling, but then realized it was [silently] protecting me from my own stupidity – I forgot to open up the netmask to cover my static range. The important thing is I can now do 5Ghz ac and get 20-30Mbit/sec wireless throughput in my apartment, instead of around 2Mbit/sec like on the 2.4Ghz band.
Tag » Archer C7 Openwrt Tftp
-
[OpenWrt Wiki] TP-Link Archer C7 AC1750
-
Flashing A TP-Link Archer C7 V5.0 In Detail - OpenWrt Forum
-
Installing OpenWRT From Debian - TFTP - TP Link Archer C7 V2
-
[HOWTO] Install OpenWRT On TP-Link Archer A7 - YouTube
-
Archer C7 V5 Bricked And TFTP Is Going Nowhere : R/openwrt - Reddit
-
Flash Firmware OPENWRT Cho TP-LINK ARCHER C7 - Hs2T
-
Info About Tp-link_archer_c7_v5 | OpenWrt Devices - Aparcar
-
TP-Link Archer C7 AC1750 V2 TFTP Recovery - Mike Palmer
-
ARCHER C7 V2 OPENWRT - Knowledgebase
-
OpenWRT: Reconnect/Unbrick Archer A7 V5 (similar To C7)
-
Re: TP-Link Archer C7 AC1750 V2 TFTP Recovery
-
Archer C7 V5 Impossible To Revert To Stock Firmware - DD-WRT Forum
-
Archer C7 V2- Still Boobytrapped? - Home Network Community