DG843GT List dhcpd Clients
I wanted a way of listing connected devices that have been served an IP Address using the command line on my DG843GT ADSL2+ router with DGTeam Firmware. This firmware allows ssh login and the ability to change the noise margin amongst other things.
I began by looking at the link for attached devices on the admin webpage of the router. This URL http://192.168.1.1/setup.cgi?todo=nbtscan&next_file=devices.htm was examined and the command nbtscan was noticed.
This was tried on the command-line but it didn't seem to do anything , nbtscan --help didn't help either.
I thought it must be something to do with arguments so I tried nbtscan 192.168.1.1 (my routers IP Address) this listed the attached devices so it's a result.
I haven't written a script using expect to get and extract this info automatically yet but it's on my todo list.
Example of the command and its output xx added to anonymise my MAC addresses
# nbtscan 192.168.1.1