What's new

Getting Modem Stats

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

So I copied and pasted your code shonk into terminal.then rebooted the routed sites still unreachable...... then same again with paul0363...WAN Start
#!/bin/sh
ifconfig `nvram get wan0_ifname`:0 192.168.2.2 netmask 255.255.255.0

NAT Start
#!/bin/sh
iptables -t nat -I POSTROUTING -o `nvram get wan0_ifname` -j MASQUERAD

So I'm sure I'm overlooking something....when I open terminal and login Mbp I get a directory temp/home/root it's here were I pasted..should I be navigating to somewhere else..if so how???? Then when it's pasted should I save....just don't seem to see an option to save just to close terminal
 
So I copied and pasted your code shonk into terminal.then rebooted the routed sites still unreachable...... then same again with paul0363...WAN Start
#!/bin/sh
ifconfig `nvram get wan0_ifname`:0 192.168.2.2 netmask 255.255.255.0

NAT Start
#!/bin/sh
iptables -t nat -I POSTROUTING -o `nvram get wan0_ifname` -j MASQUERAD

So I'm sure I'm overlooking something....when I open terminal and login Mbp I get a directory temp/home/root it's here were I pasted..should I be navigating to somewhere else..if so how???? Then when it's pasted should I save....just don't seem to see an option to save just to close terminal


ok so now i realise im being a complete idiot....trying to copy and past,,, opened terminal in mac logged in to router with no problems cant seem to get past temps/home /root,,have no idea how to create and save the file,,so if someone would be kind enough to walk me through this after they recover rolling about the floor laughing..lol ide be most gratefull:D;)
 
Last edited:
Anyways - someone is doing cut-paste without understanding, and this is a bit dangerous, and I think many would agree -

we, as a collective, probably should explain better what those suggestions do.. not everyone is at the same skill level, and even there, differences between platforms...

I'll try to do better - I can only ask that others also take the time.
 
since you seem to be having a hard time at the command prompt..

telnet into the router
and paste below
it will work until you reboot the asus router

Code:
ifconfig eth0:1 192.168.2.2
 
telnet into the router

Code:
vi /jffs/scripts/services-start

#!/bin/sh

ifconfig eth0:1 192.168.2.2

reboot the asus router

this works fine its what i use with the vigor 130

just getting back to this now,, thanks for your patience shonk, had a look in telnet,, so should i cd to jffs/scripts/services-start, then launch vi,,enter ifconfig eth0:1 192.168.2.2 then :wq,, and what does the (#!/bin/sh) mean....i can cd to jffs/scripts but not services start, so im still not quite understanding......
 
Last edited:
OK so iv exhausted.. all attemps created your file Shonk in jffs/scripts,, also tried creating Wan Start & Nat Start as also suggested,,none of which worked for me,, is there anything im missing like a firewall setting,,my modem draytek 130 is in bridge mode, router is set with automatic ip on sky fibre,,connects to internet fine just cant access the line stats on router so before i admit defeat any suggestions anyone.....
 
Last edited:
Can you create anything on the jffs partition at all? Have you enabled it and formatted it?

I have this working with a vigor 130 modem.
 
Hi yes.i can CD to jffs/ scripts then vi press I for input copy and past
#!/bin/sh

ifconfig eth0:1 192.168.2.2
ESC :wq name services-start ..when i ls command it's in scripts i reboot the router ..but still can't access the 130 in browser..should I be putting an ext like .txt...

Yes I've formated jffs
 
Last edited:
Hi yes.i can CD to jffs/ scripts then vi press I for input copy and past
#!/bin/sh

ifconfig eth0:1 192.168.2.2
ESC :wq name services-start ..when i ls command it's in scripts i reboot the router ..but still can't access the 130 in browser..should I be putting an ext like .txt...

Yes I've formated jffs

I do not understand why you are doing any of this. With the Vigor 130 and your router you can see the modem stats without any fiddling or coding required.

Simply type 192.168.2.1 into a browser and log in to the modem GUI. The web console gives you everything you need.
 
I had to add the sub-interface to access the modem web pages, possibly because it's running in bridged mode.

Does running the ifconfig command allow access to the vigor webpage on 192.168.2.1?
 
I do not understand why you are doing any of this. With the Vigor 130 and your router you can see the modem stats without any fiddling or coding required.

Simply type 192.168.2.1 into a browser and log in to the modem GUI. The web console gives you everything you need.

I was also thinking the same,

Surely it's as easy as setting the modem IP to 192.168.2.1 DHCP disabled, and setting the router IP to 192.168.2.2 in the lan setting, with DHCP enabled and a IP pool starting address of 192.168.2.3 ending at 192.168.2.254
Subnet on both device 255.255.255.0

This is how I set up my open reach modem in bridge mode to read line stats, (well originally, use different IP's now)
just simply type 192.168.2.1 into a browser and look at stats via the modem GUI, never had to bother with telnet or scripts.

But also forgive me if I have missed something, or just being dumb, is there a reason why trying to do all this through telnet and playing about with scripts? Is it a common thing with the Vigor to do this?






Sent from my iPhone using Tapatalk
 
You are also missing netmask 255.255.255.0 from you're ifconfig command, add this and hopefully it will work for you.
 
I was also thinking the same,

Surely it's as easy as setting the modem IP to 192.168.2.1 DHCP disabled, and setting the router IP to 192.168.2.2 in the lan setting, with DHCP enabled and a IP pool starting address of 192.168.2.3 ending at 192.168.2.254
Subnet on both device 255.255.255.0

This is how I set up my open reach modem in bridge mode to read line stats, (well originally, use different IP's now)
just simply type 192.168.2.1 into a browser and look at stats via the modem GUI, never had to bother with telnet or scripts.

But also forgive me if I have missed something, or just being dumb, is there a reason why trying to do all this through telnet and playing about with scripts? Is it a common thing with the Vigor to do this?






Sent from my iPhone using Tapatalk

I left both modem and router with default settings. DHCP is on for the Vigor130. Basically I changed nothing, just set up and both units work, stats I get from calling the IP of the modem and using the GUI.

I know quite a few people that do exactly the same.
 
I may be wrong but the requirement for a sub interface may be required for bridged connections (e.g. Sky VDSL) and it may work without for adsl or similar connections.
 
I may be wrong but the requirement for a sub interface may be required for bridged connections (e.g. Sky VDSL) and it may work without for adsl or similar connections.

My connection is BT based VDSL2 fibre to cabinet (PPPoE)
 
Sky fibre VDSL uses a bridged connection with mac encapsulated routing and not PPPoE. This means the modem is completely passive in the connection hence requiring a sub interface to connect to the modem interface.
 

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