Asus Router with Merlin Firmware External Network Interface Alias How To

By | May 13, 2018

Asus Router with Merlin Firmware External Network Interface Alias for Cable Modem Management

The external network interface alias is used for obtaining direct access to the cable modem’s management interface when the modem is in bridge modem. A reason for this would be if the cable providers network has some sort of issue that causes externally facing ip on the router to be lost. So the best thing that can be done so a user can view the modem status is to add a dedicated external network interface alias for this subnet that the modem uses. On Ubiquiti/Ubnt routers this feature is known as pseudo ethernet interfaces as noted in my last article.

Example on how to perform this on Asus Merlin Firmware

Enable JFFS if it isn’t already if its enabled create the following script:

/jffs/scripts/services-start

ifconfig `nvram get wan0_ifname`:0 10.0.0.2 netmask 255.255.255.0

iptables -t nat -I POSTROUTING -o `nvram get wan0_ifname` -d 10.0.0.0/24 -j MASQUERADE

 

The resulting output on the router ifconfig/route information

admin@router:/tmp/home/root# route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

24.1.1.0        0.0.0.0         255.255.252.0   UH    0      0        0 eth0

10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0

10.54.54.0      0.0.0.0         255.255.255.0   U     0      0        0 br0

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

0.0.0.0         24.1.1.1        0.0.0.0         UG    0      0        0 eth0

admin@router:~$ ifconfig -a

eth0     Link encap:Ethernet  HWaddr 32:cc:7c:d7:cf:92 

          inet addr:24.1.1.184  Bcast:255.255.255.255  Mask:255.255.252.0

          inet6 addr: fe80::feec:daff:fe03:6ce3/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:155522388 errors:0 dropped:0 overruns:0 frame:0

          TX packets:65604423 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:203358201742 (189.3 GiB)  TX bytes:17010849276 (15.8 GiB)

eth0:0     Link encap:Ethernet  HWaddr 32:cc:7c:d7:cf:92 

          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0

          inet6 addr: fe80::30a8:74ff:fdd7:ef92/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:299916 errors:0 dropped:0 overruns:0 frame:0

          TX packets:90592 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:52554088 (50.1 MiB)  TX bytes:9104214 (8.6 MiB)