On Jul 24, 2006, at 8:57 AM, Stroller wrote: > > Ummm... it would be. You need to grep it. > Yes, I understand, I've been curling/grepping the modem's signal data page to get the levels. curl -s http://192.168.100.1/signaldata.html | grep dB | tr -d \<TD\> | tr -d / returns: 37 dB -5 dBmV 55 dBmV where 37 is the s/n ratio, -5 is the downstream power level, and 55 is the upstream power level. > > For my router: > $ curl -u admin:password http://pornpipe/doc/online.sht 2> /dev/ > null | grep -o '[[:digit:]]\{1,3\}[\.][[:digit:]]\{1,3\}[\.] > [[:digit:]]\{1,3\}[\.][[:digit:]]\{1,3\}' > 192.168.1.43 > 212.104.130.9 > 192.168.1.1 > 82.153.1.4 > 213.152.39.89 > That works for my router. The ISP gateway ip is the 3rd line of 6. [charles at larry:~]$ curl -u admin:pw http://192.168.100.254/ Status_Router.htm 2> /dev/null | grep -o '[[:digit:]]\{1,3\}[\.] [[:digit:]]\{1,3\}[\.][[:digit:]]\{1,3\}[\.][[:digit:]]\{1,3\}' | head -3 | tail -1 24.159.76.1 [charles at larry:~]$ > I might extract only the IP I'm interested in by heading & tailing > the output (for some reason that sounds so much nicer to me than > "by use of `head` and `tail`") but there are probably more elegant > ways of doing it - what happens if you're offline and the router's > webpage only shows the first 3 of those IPs? A good Bash script > will probably contain an "if $variable is NULL then" statement - I > can't remember off the top of my head how to do that but I know > it's described in the Advanced Bash Scripting Guide which is a free > download and always close at hand when I'm writing Bash scripts here. > On my router, I've only seen an ip of 0.0.0.0, the correct ip, and the old ip if the lease has expired. So maybe I won't run into a null, but I'll script it anyway. Good idea. Got me a local copy of The ABSG! > > >> I use static addresses on all the lan computers. The dhcp server >> on the router is turned off. >> One issue might be that the modem's lan address is 192.168.100.1, >> and the default address for the router is 192.168.1.1. I have >> changed that to 192.168.254.254, and set the computers to >> 192.168.254.*/255.255.255.0. >> Do you think it would help anything to set the router to >> 192.168.100.254, and the computers to 192.168.100.*/255.255.255.0? >> Then everything would be on the same subnet. >> > > Ummm... *rubs eyes* > It's kinda early in the morning here, so please excuse me if I'm > reading that incorrectly... but the point of a router is that it > routes between two different subnets. Ummmm... if the modem has a > 192.168.x.y IP address then that suggests it's already doing some > NATting (certainly if the modem's external address is different). > If you put both interfaces of the router in the same subnet I don't > think it would work any more. > I've removed my original comments after receiving the bounce msg from the list server. I must humbly correct myself. When I set the routers address to 192.168.100.254 and the computers to 192.168.100.*/255.255.255.0, everything worked, but I couldn't ping the modem nor see it's internal web page. I've set everything back to the way I had it, and all is well. > I haven't seen the source from the webpage that you use to reboot > the router, yet. Perhaps you could repost it, please? Since that'll > be plain-text html then an attachment would probably be quite > acceptable to the list. Use your web-browser to navigate to that > page and use "View > Source", but make sure you're not viewing just > the source to a frameset. > It's too big for the 5k limit. It bounced. I've posted it here: http://bubbabbq.homeunix.net/router_status.html > The "--form" parameter to `curl` may allow for button presses on a > webpage. > Hmmm...I'll have to play with that. Thanks for all the info! :-) -- How I make Great Barbecue - http://bubbabbq.homeunix.net/bbq.html