On Thu, 25 Aug 2011, in the Usenet newsgroup comp.os.linux.networking, in
article <4e55e374$0$13785$(E-Mail Removed)>, Paulo da Silva wrote:
>Is it possible to know the IP addresses of all clients using the
>modem/router where I am on? How?
Ambiguous question. What is it you are trying to ask?
>NNTP-Posting-Host: a95-92-69-2.cpe.netcabo.pt
Using a DNS query tool (dig, dnsquery, host or nslookup), that hostname
translates to 95.92.69.2.
Asking the RIPE whois server, I am told:
0.0.0.0 - 255.255.255.255 IANA-BLK The whole IPv4 address space
77.0.0.0 - 95.255.255.255 EU-ZZ-80-93 Administered by RIPE
95.92.0.0 - 95.95.255.255 PT-TVCABO-20081215 TVCABO Portugal, S.A.
95.92.0.0 - 95.93.255.255 TVCABO-Portugal Cable Modem Network
95.92.64.0 - 95.92.127.255 TVCABO-Portugal
and they don't _publish_ any data on smaller segments. Depending on
your router, you may be able to find a web page on it that gives the
equivalent of the output of the UNIX command /sbin/route and that
will give a clue about what might be a smaller sized allocation. It
will also identify the TVCabo router from your segment to "the world"
(identified as the default route). The last range listed above is
about 16380 hosts - a bit larger than I'd expect. Learning more than
that about the TVCabo side of your router depends on how that router
is configured and whether or not you have "root" (or "administrator")
access to the router - probably not.
On the other hand, if you are trying to learn all of the clients on
your side of the router, that may likewise depend on the router and
what access you have to it. Look on your system, and see what
'/sbin/ifconfig -a' tells you about the address range in use. Look
also at output of '/sbin/route -n'. A simple check there is to look
at 'ARP' packets (which would be broadcast from a hosts to all hosts
on the local wire) and see who is there. Run a packet sniffer such as
ethereal, tcpdump or wireshark. For tcpdump, the command would be
/usr/sbin/tcpdump -ni eth0 arp
Which would produce output like
12:25:18.62 arp who-has 192.168.1.25 tell 192.168.1.1
12:25:30.27 arp who-has 192.168.1.9 tell 192.168.1.1
12:25:30.27 arp reply 192.168.1.9 is-at 00:26:18:06:8a:dc
12:25:31.27 arp who-has 192.168.1.1 tell 192.168.1.9
12:25:31.27 arp reply 192.168.1.1 is-at 00:c0:d1:57:00:f0
12:25:54.68 arp who-has 192.168.1.2 tell 192.168.1.1
12:25:54.68 arp reply 192.168.1.2 is-at 08:00:20:cd:1b:22
It may take several minutes to see all of the ARP packets. You may
not see the "arp reply" packets unless you are on the calling or
called host.
Old guy
|