finding all the IP & MAC addresses of a network

Reply

Join Date: Jun 2009
Posts: 6
Reputation: mnoor is an unknown quantity at this point 
Solved Threads: 0
mnoor mnoor is offline Offline
Newbie Poster

finding all the IP & MAC addresses of a network

 
0
  #1
Jun 30th, 2009
Hi!

I want to write a program that can find all of the IP and Mac addresses and the processes nember connected to a network, fro example an ISP.
for writing this i must know the neccery APIs for finding IP and Mac address.

PLZ help me to start my work. did you know any thing about these APIs or what should i do?

i can program in c# or java.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,219
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 573
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: finding all the IP & MAC addresses of a network

 
0
  #2
Jun 30th, 2009
Unless you work for the ISP then you are out of luck. The mac address of connected computers can be easily hidden or altered if someone is running a home network:

http://en.wikipedia.org/wiki/Data_Link_Layer
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 6
Reputation: mnoor is an unknown quantity at this point 
Solved Threads: 0
mnoor mnoor is offline Offline
Newbie Poster

Re: finding all the IP & MAC addresses of a network

 
0
  #3
Jun 30th, 2009
is there a way to find these addresses if they were not altered?
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 14
Reputation: quibbie is an unknown quantity at this point 
Solved Threads: 0
quibbie quibbie is offline Offline
Newbie Poster

Re: finding all the IP & MAC addresses of a network

 
0
  #4
Jun 30th, 2009
If you are just looking to find IP and MAC address on a network that is easy, but you can't lookup all IP and MAC addresses from an ISP unless you have access to the server(s). There are tons of programs out there that will find all connections to a single IP. Almost all servers have network tools that will show all incoming connections.

If you want to query your DNS for all IP addresses that have names
try this

i=1
while [ i -lt 255 ]; do
nslookup XXX.XX.XX.$i | grep -i name
(( i = i + 1 ))
done

If you want to find all IP addresses currently active on your subnet

# ping XXX.XX.XX.XXX
Last edited by quibbie; Jun 30th, 2009 at 12:42 pm.
If you think something is impossible, don't bother the person trying to accomplish it. (Me) www.quibbie.com
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,219
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 573
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: finding all the IP & MAC addresses of a network

 
0
  #5
Jun 30th, 2009
Yes but what are you really trying to do because it doesn't make sense. You can send traffic at the broadcast address for your subnet then look at your ARP table.

  1. C:\>ping 10.2.5.255
  2.  
  3. Pinging 10.2.5.255 with 32 bytes of data:
  4.  
  5.  
  6. Ping statistics for 10.2.5.255:
  7. Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
  8. Approximate round trip times in milli-seconds:
  9. Minimum = 0ms, Maximum = 0ms, Average = 0ms
  10. Control-C
  11. ^C
  12. C:\>arp -a
  13.  
  14. Interface: 10.2.5.215 --- 0x2
  15. Internet Address Physical Address Type
  16. 10.2.5.2 00-xx-xx-d3-xx-13 dynamic
  17. 10.2.5.4 00-xx-xx-6f-xx-ac dynamic
  18. 10.2.5.5 00-xx-xx-ec-xx-10 dynamic
  19. 10.2.5.10 00-xx-xx-be-xx-17 dynamic
  20. 10.2.5.50 00-xx-xx-34-xx-5c dynamic
  21. 10.2.5.104 00-xx-xx-c5-xx-5f dynamic
  22. 10.2.5.212 00-xx-xx-00-xx-70 dynamic
  23. 10.2.5.253 00-xx-xx-06-xx-5d dynamic
  24.  
  25. C:\>

Note that 10.2.5.255 is the broadcast address.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 6
Reputation: mnoor is an unknown quantity at this point 
Solved Threads: 0
mnoor mnoor is offline Offline
Newbie Poster

Re: finding all the IP & MAC addresses of a network

 
0
  #6
Jun 30th, 2009
I want to write a program (pereferably in c# or java) that can find all IP and mac addresses connected to my subnet when i'm connected to that subnet.

with sending traffic to the network i just can learn some of the addresses not all of them.

thanks alot for your attention. I'm a newbie and already i'm enjoying my membership here!!!!
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,219
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 573
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: finding all the IP & MAC addresses of a network

 
0
  #7
Jul 1st, 2009
with sending traffic to the network i just can learn some of the addresses not all of them.
It is up to the individual device connected to the network to transmit its MAC address. Unless you have a managed switch where you can log in and look at the switch's ARP table then you will have to send out traffic to the network and see what responds. You're probably best off to use existing utilities for this.

See:
http://social.msdn.microsoft.com/for...-5f9d65facfcf/
and
http://groups.google.com/group/DotNe...d69fec7e56d166

They provided a script:
Code Snippet
@echo off
endlocal
set IPtoCheck=10.0.0.21
ping -n 1 %IPtoCheck% >nul
arp -a | findstr %IPtoCheck%
endlocal

If you had a managed switch then you should automate logging in to the device and downloading the ARP table or possibly querying it with SNMP.
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 6
Reputation: mnoor is an unknown quantity at this point 
Solved Threads: 0
mnoor mnoor is offline Offline
Newbie Poster

Re: finding all the IP & MAC addresses of a network

 
0
  #8
Jul 2nd, 2009
Thanks
Now i can see your point.
what about a LAN? can i find all ip and mac addresses in a LAN? is there a way?
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,219
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 573
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: finding all the IP & MAC addresses of a network

 
0
  #9
Jul 2nd, 2009
Everything I have discussed thus far was referring to devices on your same network segment (subnet/LAN).
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 6
Reputation: mnoor is an unknown quantity at this point 
Solved Threads: 0
mnoor mnoor is offline Offline
Newbie Poster

Re: finding all the IP & MAC addresses of a network

 
0
  #10
Jul 2nd, 2009
What about this:
we send a broadcast message to the lan that all of the lan must answer:
for example a broad cast the is after the mac address xx-xx-xx-xx-xx-xx ?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Network Security Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC