I’ve never been a fan of using DHCP reservations to reserve an IP address for a device. However, there are a few situations where a static reservation is the best route to take.
Try your hand with Home Automation via devices like the Wink Hub,IPcameras, smart plugs, satellite receivers, or even the Raspberry Pi and you will know full well the right time to use a static IP reservation.
In this post, I am going to walk you through that process on the Asus RT-AC66u.
First, log into your Routers webUI, select “LAN” in the left-hand menu. Then select the “DHCP Server” tab. Scroll midway down the page. Locate “Enable Manual Assignment” and select the “Yes” radio button.
Just below the section above, you will see a drop down box that you can use to select your device using the MAC or currently assigned IP. Enter the “Hostname” for the device. Select “Add/Delete“. This will add your device to the list.
Scroll down and find your device in the list. Select the icon to the left. Change the “Name” of the device if you so desire. The only really important information here is the “IP” and the “MAC”.
Here you also can change the default icon for the device, or add your own custom icons. Here, I am using a camera icon that I downloaded.
Below you can see some of the custom icons and names that I have set to help me keep track of my devices.
Note: The RT-AC66U and the RT-AC66R are identical other than their product number. The RT-AC66R is the product sold through Best Buy and RT-AC66U is the product sold directly from ASUS.
IPKG is a cli utility used for package management. It is required to have ipkg installed if you want to configure your router for SNMP, install BIND, or view I/O to a usb disk as you will need to install software packages that are not included in the stock firmware.
Note: I am running the ASUSWRT-Merlin firmware, you can find it here. The stock firmware may be a bit different, so you might not see the exact screens as shown below.
Prerequisite : USB Drive
To install ipkg you will need to install Download Master. To Install Download Master you will need to have a USB drive plugged into the router and mounted. In the image below you can see my USB disk, labeled as “SMI USB DISK”
Troubleshooting USB Drives
I had a bit of an issue here as I was trying to mount a drive that was formatted as EXT4. Apparently this was not supported. See error below.
EXT3-fs: sda1: couldn’t mount because of unsupported optional features (240).
EXT2-fs: sda1: couldn’t mount because of unsupported optional features (240).
I pulled the drive, reformatted as EXT3 and was off and running.
usb 1-1.1: USB disconnect, address 4
usb 1-1.2: new high speed USB device using ehci_hcd and address 5
usb 1-1.2: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
scsi 2:0:0:0: Direct-Access SMI USB DISK 1100 PQ: 0 ANSI: 4
sd 2:0:0:0: [sda] 8196096 512-byte hardware sectors (4196 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 43 00 00 00
sd 2:0:0:0: [sda] Assuming drive cache: write through
sd 2:0:0:0: [sda] Assuming drive cache: write through
sd 2:0:0:0: [sda] Attached SCSI removable disk
sd 2:0:0:0: Attached scsi generic sg0 type 0
You can find the list of supported formats and partition sizes here. I would suggest EXT3. NTFS and FAT32 are supported, but I have heard that you might run into issues.
Installing Download Master
Now that you have your USB disk mounted you can install Download Master.
Select USB Applications on the left pane. Then click on Download Master. In the example below, you can see that I have already performed the install.
You should see the screen below once Download Master is installed.
Accessing the Router via the CLI
Now you can either telnet or SSH to your router using its LAN IP address. Note that telnet is the default protocol, however you can enable SSH by clicking on “Administration” in the lower left pane, and then clicking the “System” tab. Under “SSH Daemon” select “Enable SSH”.
Ok first off let me start by saying that this is probably the coolest piece of home computing hardware that I have ever laid my hands on. Yes the setup was easy, and yes the thing is rock solid, and yes wireless range is awesome. But for approx $200 USD you really should not expect anything less. I’m not going to go into its specs or features, as I’ll leave that to the professionals. Read up on it here.
Anyway out of the box it supported telnet, but I wanted ssh, so I dropped the default firmware and went with Asuswrt-Merlin. It was at this point I started to explore the Busybox OS and decided I wanted to monitor the device via my HomeLab Zenoss install.
However, much to my chagrin net-snmp was not installed out of the box.
So how do you install it you ask? Would you believe via a package manager?
First, you need to find the package name
#ipkg list | grep snmp
Then install the snmp package
#ipkg install net-snmp
Then configure it to start at boot time.
#app_set_enabled.sh net-snmp yes
In order to configure it, you are going to have to search for the snmp.conf
#find / -name snmpd.conf
I found two files and one of them clearly states that you should not edit it directly. The other one does not so this is the one that I modified to include my custom rocommunity. See below.
Now I just need to figure out how to allow port 161 udp/tcp on my local LAN segment and I am in business. However, I will probably tackle that tomorrow.
Additional Info (2016)
Note, you can restart snmp as shown below.
admin@RT-AC66U:/tmp/home/root# app_stop.sh net-snmp
killall: dm2_transmission-daemon: no process killed
killall: asus_lighttpd: no process killed
killall: dm2_snarfmaster: no process killed
killall: dm2_nzbget: no process killed
killall: dm2_amuled: no process killed
iptables: No chain/target/match by that name
iptables: Bad rule (does a matching rule exist in that chain?)
admin@RT-AC66U:/tmp/home/root# app_set_enabled.sh net-snmp yes
The field(Enabled) was set “yes” already.
Restarting the package…
2016 Update – Configuring SNMP via the WebUI
Figured that I would add an update to this post as it seems that there are plenty of folks who are looking to setup SNMP on their Asus routers. Note that SNMP can now be configured directly from the WebUI.
In the left pane, click on “Advanced Setting”. Then click on the “SNMP” tab. See example below. Note that the webui does not seem to pick up your configuration if you have configured it via the cli. I have not tested to see if the WebUI overwrites the CLI configuration or if it creates another configuration file.