[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: list all the devices connected to the router




On Apr 25, 2011 4:15 AM, "Klistvud" <quotations@aliceadsl.fr> wrote:
>
> Dne, 25. 04. 2011 01:47:01 je Kamaraju S Kusumanchi napisal(a):
>
>> Any other ideas?
>> thanks
>
>
> Well, here's the one-liner I use (a crontab entry actually):
>
> for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.1.$ip" || : ; done
>

As with what I posted, reset your arp cache first. Though, you might want to exclude any local addresses from netstat so that you don't mess anything up in the process. Also it would probably be fun to reset an arp cache while connected to an l2tp vpn.

... though if you can easily set the stale time to something short like a second and then put it back, that might have the same end result you want with less work.

Though, this is just something to do for fun or in special cases. DON'T DO THIS ON NORMAL X86 DEBIAN INSTALLS. There's just no reason. Do you use a tooth pick to spread butter on your toast? Why, it might be fun or something...?

Again, the right tool for the job - nmap, hping, scapy all come to mind. If you want to monitor your network, nagios, cacti, etc.

Than again, maybe you're the type that wants to win the guiness record for 'fastest man in a baby stroller'.... ok, actually that sounds fun. Maybe that's why I've done this before :)


Reply to: