cancel
Showing results for 
Search instead for 
Did you mean: 

Netgear CLI

Be3G
Grafter
Posts: 6,111
Thanks: 1
Registered: ‎05-04-2007

Netgear CLI

Hi all,
I've recently purchased a Netgear DM111P ethernet modem, and whilst I'm generally pleased with it, I'm disappointed that there appear to be no logs available for viewing in the web-based GUI. I do know however that the modem has a CLI, so I'm wondering if anyone knows of any logs that're accessible from that - and if so, what the commands are to do so? I realise that few if any people here will have a DM111P, however, I expect the CLI will be much the same as other Netgear hardware, albeit with a different set of available commands - so if anyone who has experience with any Netgear hardware has any ideas, I'd appreciate hearing them. Thanks!
18 REPLIES 18
Oldjim
Resting Legend
Posts: 38,460
Thanks: 787
Fixes: 63
Registered: ‎15-06-2007

Re: Netgear CLI

RouterStats may help to get you the information you want http://www.vwlowen.co.uk/internet/files.htm
Quote
The Help file provides details of the following additional routers (thanks to feedback from other users):
    * Belkin F5D7630-4A (UK)
    * D-Link DSL-502T, DSL-504T (Check the "Use source B" checkbox - see FAQ - Q4)
      Telnet also works by selecting the AR7 chipset and checking the Experimental checkbox.
    * Draytek Vigor 2600G
    * Linksys WAG54G
    * Linksys HG200
    * Linksys WAG160N
    * Linksys WAG200G
    * Netgear DM111P (Check the "Use source A" checkbox - see FAQ - Q4)
    * Orange Livebox (Inventel)
    * Speedtouch 510 v4 (Firmware 4.3.2.6) (Works partly. Rx Noise and Rx Sync OK)
    * Speedtouch 585 v6 & v7
    * Voyager 2100 (+ probably 2110 and possibly 2019)
    * Voyager 220V (Check the "Use source A" checkbox - see FAQ - Q4)
    * Zoom X5v
Be3G
Grafter
Posts: 6,111
Thanks: 1
Registered: ‎05-04-2007

Re: Netgear CLI

Hmm, I don't think so, but thanks anyway... all that seems to do is scrape data from routers' HTML pages, whereas what I want is a means to access data that's not already shown in the GUI, if you see what I mean.
Oldjim
Resting Legend
Posts: 38,460
Thanks: 787
Fixes: 63
Registered: ‎15-06-2007

Re: Netgear CLI

Judging by the results on my Netgear DG834G it gives a lot more than that including the ability to log noise margins and speeds.
This is the screen I use most - what information are you trying to extract
paulh
Rising Star
Posts: 1,283
Thanks: 10
Registered: ‎30-07-2007

Re: Netgear CLI

sounds like you want snmp (which would allow you  -- with appropriate client software -- to query the router for more compelx stats) --  and it doesn't look like that router supports snmp
paul
Be3G
Grafter
Posts: 6,111
Thanks: 1
Registered: ‎05-04-2007

Re: Netgear CLI

Indeed I had considered SNMP, and it seems it's available by installing third-party firmware on it but I don't want to do that. To be clear though it's not stats that I'm interested in, it's logs - logs of when it connects, what happens when it connects, that sort of thing.
paulh
Rising Star
Posts: 1,283
Thanks: 10
Registered: ‎30-07-2007

Re: Netgear CLI

snmp should also allow you to retrieve that sort of info ... i was using "stats" as shorthand really
Be3G
Grafter
Posts: 6,111
Thanks: 1
Registered: ‎05-04-2007

Re: Netgear CLI

Yeah don't worry I got what you meant - was just generally clarifying for any/all readers of this thread. Smiley
alanb
Grafter
Posts: 459
Registered: ‎24-05-2007

Re: Netgear CLI

If you're sure it has a CLI, you could try telneting into it's console and try to see if typing 'help', 'h', 'man', 'info', '?', etc, gets you anywhere.
MisterW
Superuser
Superuser
Posts: 14,680
Thanks: 5,480
Fixes: 392
Registered: ‎30-07-2007

Re: Netgear CLI

Looks like it might just have snmp...
From this http://mybroadband.co.za/vb/archive/index.php/t-34194.html
Quote
snmp can be activated from the hidden snmp menu (http://192.168.0.1/snmp.htm

Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.

Be3G
Grafter
Posts: 6,111
Thanks: 1
Registered: ‎05-04-2007

Re: Netgear CLI

alanb - had already tried that, and get a long list of commands, some of which are fairly self-explanatory (e.g. reboot, sysinfo) but some of which aren't (e.g. cat, df), and no help seems to be available for individual commands. Admittedly, there's nothing that screams 'router logs available here', but I figured it was worth asking anyway...
MisterW - thanks, but that doesn't work on my model. Sad That's for a DG834, whereas I've got a DM111P.
alanb
Grafter
Posts: 459
Registered: ‎24-05-2007

Re: Netgear CLI

Hmmm ... sounds like a Linux shell, probably something like a Busybox shell. The cat command displays the contents of a file, df reports disc usage.
I think it's unlikely that the Linux syslogger will be included in an embedded system, but you could try looking for a folder containing log files that might hold useful data. In full-fat Linux, the logs usually live in a folder with a name like /var/log. (I'm presuming that Netgear's apps might have been designed to write to the logger, which is not necessarily a valid assumption unfortunately.)
I have an old Netgear FR328 firewall/router, which has a menu for setting up logging, it's called 'log.htm'. Thinking along the same lines as Mister W, you could try looking for a hidden menu called 'log.htm'. If that fails, you could try looking for a folder containing the html pages for the device's internal web server.
Be3G
Grafter
Posts: 6,111
Thanks: 1
Registered: ‎05-04-2007

Re: Netgear CLI

Some good ideas there, but annoyingly I can't seem to actually browse the file system - commands such as ls and cd just give me a 'not found' message. Intriguingly however, there does appear to be a /var/log directory present, because if I run 'cat /var/log' (obviously not expecting to actually get any results seeing as that's a directory), I get 'read error: is a directory' rather than 'no such file or directory'. But without being able to browse the file system, I can't see what's actually inside that log directory, if anything. Sad So near yet so far... I did also try the hidden htm page thing but it didn't work unfortunately.
MrC
Grafter
Posts: 525
Thanks: 4
Registered: ‎17-07-2008

Re: Netgear CLI

Another thing to try is to print the kernel ring buffer by using the dmesg command. Unfortunately these messages aren't timestamped and will only show issues related to the kernel itself. It will show netfilter (firewall) alerts however.
Mike
alanb
Grafter
Posts: 459
Registered: ‎24-05-2007

Re: Netgear CLI

I'm unsure whats happening there. It might be a permissions problem. In full-fat Linux you'd normally see some sort of 'permission denied' message if it were, but it may be different for embedded Linux as all sorts of things get removed or changed to optimise its memory footprint. You'd normally see a 'not found' error when you try to execute a command or program that does not exist. Try typing 'cd' and 'ls' in upper case as well as lower case. Try 'ls' without any parameters too if you haven't already.
With some embedded shells some of the commands are entry points into a single program file. In Busybox, for example, the 'cd x' command would acually be something like 'busybox cd x', and this is sometimes wrapped in a shell-script named after the normal command. As 'cat' appears to be working, try doing 'cat ls' and 'cat LS' to see if either display one or more lines of commands that look like a script. This might give a clue as to why the 'not found' error is popping up.
If it's a permissions problem, then it may be that the console user account does not have enough permissions and you may need to 'su' to root, or use a 'sudo' prefix on the commands. Which then raises the problem of what password to use. If you know enough about Linux to try this, then I assume you'll have some idea of default passwords commonly used by manufacturers. If Netgear have followed good security practices it will probably be a password that can't be guessed though, and you won't be able to get into the root account. (It might be worth doing some googling on this if you want to pursue it.) Unfortunately it is also possible that Netgear have deliberately broken the console user account, perhaps by deleting or moving key files, before installing the software into the modem, to prevent people doing just what you are trying to do.