What's new

Adding 192.168.2.x address to WAN port?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

PULCK

Occasional Visitor
I'm trying to access the web interface of my Draytek Vigor 130 (in bridge mode) but my Asus RT-AC86U is not letting me.

I asked on the Draytek forums and I've been told that I need to add a 192.168.2.x address to the WAN port of my router, if it will allow me.

I'm running Asuswrt-Merlin. Is the WAN thing possible?

Apparently, all traffic is being directed to my ISP and not reaching the modem web interface. (The alternative method is setting up VLAN tags on the router, but I'm assuming that's either not possible or too technical for my expertise.)
 
I'm trying to access the web interface of my Draytek Vigor 130 (in bridge mode) but my Asus RT-AC86U is not letting me.

I asked on the Draytek forums and I've been told that I need to add a 192.168.2.x address to the WAN port of my router, if it will allow me.

I'm running Asuswrt-Merlin. Is the WAN thing possible?

Apparently, all traffic is being directed to my ISP and not reaching the modem web interface. (The alternative method is setting up VLAN tags on the router, but I'm assuming that's either not possible or too technical for my expertise.)

Can you post router routing table, hide public ip when you do. On computer connected to asus router just click on link, this link is specific to each device and will not work on non asus router or only your home router and device connected to home wifi will have access to it.

This link directly allow you to login in your asus router and directly take you routing table found under system log.

 
Last edited:
I'm trying to access the web interface of my Draytek Vigor 130 (in bridge mode) but my Asus RT-AC86U is not letting me.

I've done similar with a bridged DSL modem by assigning a static IP to my PC network adapter and wiring directly to the DSL modem. This was a one-time solution.

OE
 
Can you post router routing table, hide public ip when you do. On computer connected to asus router just click on link, this link is specific to each device and will not work on non asus router or only your home router and device connected to home wifi will have access to it.

This link directly allow you to login in your asus router and directly take you routing table found under system log.

Sure - here it is:

routing table.JPG
 
I've done similar with a bridged DSL modem by assigning a static IP to my PC network adapter and wiring directly to the DSL modem. This was a one-time solution.

OE
Thanks, but I'm looking for a way to regularly check in on my modem's status. I've been getting internet disconnects and trying to identify the problem is tricky without access to that interface.
 
I see what is going on and looking at this screenshot, it seems you local lan is using 192.168.2.0 subnet and you are adding modem in this case and it is using same ip range 192.168.2.x as well, your router simple ignore modem and doesn't add to routing table when network is same. To solve this assign you asus router different subnet, it could be 192.168.1.x or 192.168.3.x after doing that you will need to reboot both devices modem first wait few minute, then reboot router. If done correctly you will see 192.168.2.0 listed as man instead of lan as shown in screenshot.

Asus router lan section

Under lan-ip you need to change address here, when asked to update dhcp pool say yes.(you may need to turn off router and on again to able access from new ip)
 
Last edited:
I see what is going on and looking at this screenshot, it seems you local lan is using 192.168.2.0 subnet and you are adding modem in this case and it is using same ip range 192.168.2.x as well, your router simple ignore modem and doesn't add to routing table when network is same. To solve this assign you asus router different subnet, it could be 192.168.1.x or 192.168.3.x after doing that you will need to reboot both devices modem first wait few minute, then reboot router. If done correctly you will see 192.168.2.0 listed as man instead of lan as shown in screenshot.

Asus router lan section

Under lan-ip you need to change address here, when asked to update dhcp pool say yes.(you may need to turn off router and on again to able access from new ip)
Thanks so much for your help. Would you mind explaining a few things for me? (And apologies if I'm asking some dumb questions.)

So I've left my Asus router's IP as 192.168.2.1. I have instead set my Draytek's IP address to 192.168.130.1. (Specifically, on the Draytek's interface, it now says "LAN IP Network Configuration" and then "1st IP Address", which I've set to 192.168.130.1.) I've also disabled the Draytek's DHCP Server since the Asus should be assigning IP addresses, right?

So if this were working correctly, I'd be able to access my Asus's interface on 192.168.2.1 and my Draytek on 192.168.130.1.

But unfortunately it doesn't work!

I think what they were suggesting on the Draytek forums was something slightly different. They're saying I need to add a second subnet on the WAN port. Is that possible on the Asus?

I must admit, this isn't helped by the fact that I'm pretty ignorant about all this stuff. So I'm very sorry if what I'm saying doesn't make sense.
 
Thanks so much for your help. Would you mind explaining a few things for me? (And apologies if I'm asking some dumb questions.)

So I've left my Asus router's IP as 192.168.2.1. I have instead set my Draytek's IP address to 192.168.130.1. (Specifically, on the Draytek's interface, it now says "LAN IP Network Configuration" and then "1st IP Address", which I've set to 192.168.130.1.) I've also disabled the Draytek's DHCP Server since the Asus should be assigning IP addresses, right?

So if this were working correctly, I'd be able to access my Asus's interface on 192.168.2.1 and my Draytek on 192.168.130.1.

But unfortunately it doesn't work!

I think what they were suggesting on the Draytek forums was something slightly different. They're saying I need to add a second subnet on the WAN port. Is that possible on the Asus?

I must admit, this isn't helped by the fact that I'm pretty ignorant about all this stuff. So I'm very sorry if what I'm saying doesn't make sense.

Draytek still need dhcp enabled, even though your clients connect to asus router. Draytek will assign address to asus router along with wan you get from isp, leave dhcp enabled on the device, since ip assigned to asus router will be used to communicate back to Draytek. Without ip address your asus router won't add Draytek in its routing table. Make sure to restart router after enable dhcp.
 
Last edited:
Draytek still need dhcp enabled, even though your clients connect to asus router. Draytek will assign address to asus router along with wan you get from isp, leave dhcp enabled on the device, since ip assigned to asus router will be used to communicate back to Draytek. Without ip address your asus router won't add Draytek in its routing table. Make sure to restart router after enable dhcp.
Sorry to reply so late.

I just tried switching on DHCP server on the Draytek as you suggested and the damn thing still won't let me in. I have a vague recollection that putting the Draytek in bridge mode means the DHCP server is switched off anyway.

Does what I said in my last message make any sense? i.e. I think what I'm trying to achieve is a second subnet on the WAN port. Or am I just talking gobbledygook?
 
Try this (assuming your Draytek is still configured as 192.168.130.1). Remove any changes you have made to the Asus then SSH into the router and issue this command:

Code:
ifconfig $(nvram get wan0_ifname):0 192.168.130.2 netmask 255.255.255.0
 
Last edited:
Try this (assuming your Draytek is still configured as 192.168.130.1). Remove any changes you have made to the Asus then SSH into the router and issue this command:

Code:
ifconfig $(nvram get wan0_ifname):0 192.168.130.2 netmask 255.255.255.0
That did it! Fantastic - thank you so much.

What does this command actually do?
 
What does this command actually do?
It creates a virtual interface associated with the WAN interface that has an IP address of 192.168.130.2. So any traffic destined for 192.168.130.1 will go through this interface and have 192.168.130.2 as its source address.

To make that change survive a reboot you will have to enable "custom scripts and configs" and create a wan-event user script like the one shown below.

Code:
#!/bin/sh
if [ "$1" = "0" ] && [ "$2" = "connected" ]; then
   ifconfig $(nvram get wan0_ifname):0 192.168.130.2 netmask 255.255.255.0
elif [ "$1" = "0" ] && [ "$2" = "stopping" ]; then
   ifconfig $(nvram get wan0_ifname):0 down
fi

EDIT: Changed the script above to be wan-event instead of services-start.
EDIT 2: Corrected typo in script!
EDIT 3: Added "stopping" test as without it the router can sometimes hang.
 
Last edited:
It creates a virtual interface associated with the WAN interface that has an IP address of 192.168.130.2. So any traffic destined for 192.168.130.1 will go through this interface and have 192.168.130.2 as its source address.

To make that change survive a reboot you will have to enable "custom scripts and configs" and create a wan-event user script like the one shown below.

Code:
#!/bin/sh
if [ "$1" = "0" ] && [ "$2" = "connected" ]; then
   ifconfig $(nvram get wan0_ifname):0 192.168.130.2 netmask 255.255.255.0
if

EDIT: Changed the script above to be wan-event instead of services-start.
Thanks. I've never added a script before.

Is it as simple as SSHing into my Asus, creating a text file called "wan-event" in the /jffs/scripts/ directory and copying and pasting your code?
 
Thanks. I've never added a script before.

Is it as simple as SSHing into my Asus, creating a text file called "wan-event" in the /jffs/scripts/ directory and copying and pasting your code?
Yep. Use an editor like nano. Make sure the script is executable.
Code:
chmod 755 /jffs/scripts/wan-event
 
@PULCK Please see my updated script in post #12. There was a typo in it that stopped it from working. The last line should have been "fi" not "if". :oops:
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top