Asus RT-N16

Install

If router use OEM firmware than you should flash DD-WRT or Tomaro using by router web interface, because OpenWRT cannot be installed by the ASUS web interface.

I had installed DD-WRT on my router and my steps to install OpenWRT was: Determine the shift in Flash memory to write OpenWRT image

cat /proc/mtd

ASUS had 4 partitions

0x 0000 0000-0x 0004 0000 : "boot"
0x 0004 0000-0x 01fe 0000 : "linux"
0x 001d ff88-0x 01fe 0000 : "rootfs"
0x 01fe 0000-0x 0200 0000 : "nvram"

Download and install OpenWRT image

cd /tmp
wget https://downloads.lede-project.org/releases/17.01.4/targets/brcm47xx/mips74k/lede-17.01.4-brcm47xx-mips74k-asus-rt-n16-squashfs.trx
mtd -r write lede-17.01.4-brcm47xx-mips74k-asus-rt-n16-squashfs.trx linux

Router have IP 192.168.1.1 by default, you is able to login using ssh. Reset settings to default

firstboot

Configure WiFi to support n standard

OpenWTR uses open source driver for WiFi than support only b/g standards. To support standard 802.11n, proprietary Broadcom module broadcom-wl should be used.

opkg remove kmod-b43 kmod-b43legacy kmod-mac80211 kmod-cfg80211 kmod-brcmsmac

opkg update
opkg install kmod-brcm-wl nas wlc wl

rm /etc/config/wireless; reboot

Configure hardware switch

Hardware switch configuration for ASUS RT-N16 | Port | Switch port | |—————:|————:| |CPU (Internal) |8 | |Internet (WAN) |0 | |LAN 1 |4 | |LAN 2 |3 | |LAN 3 |2 | |LAN 4 |1 |

Network config with two VLANs (WAN and LAN) was created by edit file /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 'fd6c:c6de:ef32::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.0.1'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'
	option hostname 'HomeNetwork'
	option macaddr 'A7:08:A1:6F:68:FD'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '1 2 3 4 8t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '0 8t'