What's new

wan-event question

  • 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!

archiel

Very Senior Member
I am about to replace my AC87U with an AX58U. In order to be able to login to my DSL modem from the LAN I have a simple wan-start script

My LAN uses at 10.x.x.x network and connects to my modem using Automatic IP, where the modem has DHCP disabled and an internal address of 192.168.1.1

#!/bin/sh
ifconfig eth0:1 192.168.1.2

Assuming I still need this with the AX58U, how do I rewrite this in wan-event
 
You can try something like this to see if it works properly:
Code:
#!/bin/sh

if [ "$2" = "connected" ]; then
  ifconfig $(nvram get wan"$1"_ifname):1 192.168.1.2
fi
 
Thank you , I will give it try once the new router arrives and let you know if it works.
-------
Arrived and setup - script works perfectly.

Thanks
 
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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