Re: scan for machines in the subnet
- From: Chris Cox <notccox@xxxxxxxxxxxxxx>
- Date: Sun, 04 Mar 2007 15:02:16 -0600
Moe Trin wrote:
On Sun, 04 Mar 2007, in the Usenet newsgroup comp.os.linux.networking, in
article <12uli9bo4mqcbaf@xxxxxxxxxxxxxxxxxx>, Chris Cox wrote:
peter pilsl wrote:
I wonder what is the easiest and fastest way to detect all machines in
the current subnet from one of the machines and get their MAC-adresses.
My first approach would be to ping each possible adress and then read
the arp-table for valid mac's.
Trying to do this from a client on the network is an error prone way.
You will never be guaranteed to find all of the hosts.
The only hosts that won't be found are those that have disabled ARP on
their network setup, OR are using off-network IP addresses that you did
not try to talk to. ARP is lower in the stack than firewall code, and
even if a host is dropping all TCP, UDP, or ICMP (etc.) packets, it will
still respond to an ARP packet addressed to it's IP address.
A switch on a meshed network can reply to ARP with it's own MAC.
.
A "better" way is to query the switch itself. Many switches
will have the ability to get this information from the MIB via
SNMP. That's the "better" way.
No disagreement - and if your switch won't provide that information, then
querying your router's ARP cache is probably second best - indeed any
host that the remote is likely to talk to. We were sweeping the ARP cache
of the routers and the servers on each segment at regular intervals 24/7
before we got our first Etherswitch in 1995, looking for rogue addresses.
Old guy
- Follow-Ups:
- Re: scan for machines in the subnet
- From: David Brown
- Re: scan for machines in the subnet
- References:
- scan for machines in the subnet
- From: peter pilsl
- Re: scan for machines in the subnet
- From: Chris Cox
- Re: scan for machines in the subnet
- From: Moe Trin
- scan for machines in the subnet
- Prev by Date: tcpdump show requested web addresses
- Next by Date: Re: Problem connecting RH9 to Linksys WRT54GR router.
- Previous by thread: Re: scan for machines in the subnet
- Next by thread: Re: scan for machines in the subnet
- Index(es):
Relevant Pages
|