Re: [CentOS] find IP address of device on network based on, MAC address
John R Pierce <[EMAIL PROTECTED]> wrote: Jerry Geis wrote: > I have a device on my network that is not DHCP and I dont know the IP > address of it > and it has not method of finding it or changing it unless you know the > IP address (setable by browser). > > Is there a way on linux, based on MAC address, to get the IP of the unit? $ nmap -n -sP -PI 192.168.0.1-254 && arp -an | grep -v incomplete I was hoping someone would mention nmap. Here's the output from a quick (5.753 seconds) ping scan of my network: [EMAIL PROTECTED] etc]# nmap -sP 192.168.0.0/24 Starting Nmap 4.20 ( http://insecure.org ) at 2007-12-15 08:10 MST Host 192.168.0.172 appears to be up. MAC Address: 00:0A:5E:1A:EC:9E (3COM) Host 192.168.0.181 appears to be up. MAC Address: 00:0F:B0:6D:61:9E (Compal Electronics) Host 192.168.0.185 appears to be up. Host 192.168.0.250 appears to be up. MAC Address: 00:12:17:7A:B6:F6 (Cisco-Linksys) Nmap finished: 256 IP addresses (4 hosts up) scanned in 5.753 seconds You can also try letting nmap figure out what each device is with something like: nmap -T4 -A 192.168.0.0/24 My x86_64 laptop confused it but it was spot on at identifying my wireless AP. Cheers, Dave -- Politics, n. Strife of interests masquerading as a contest of principles. -- Ambrose Bierce ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] find IP address of device on network based on MAC address
Jerry Geis wrote: I have a device on my network that is not DHCP and I dont know the IP address of it and it has not method of finding it or changing it unless you know the IP address (setable by browser). Is there a way on linux, based on MAC address, to get the IP of the unit? $ nmap -n -sP -PI 192.168.0.1-254 && arp -an | grep -v incomplete ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] find IP address of device on network based on MAC address
On Fri, Dec 14, 2007, Jim Perrin wrote: >On Dec 14, 2007 3:02 PM, Jerry Geis <[EMAIL PROTECTED]> wrote: >> I have a device on my network that is not DHCP and I dont know the IP >> address of it >> and it has not method of finding it or changing it unless you know the >> IP address (setable by browser). >> >> Is there a way on linux, based on MAC address, to get the IP of the unit? > >Ping all the ips on your network, then use 'arp' to show the ip and >mac linking. This should give you the information you need. For a private network, 192.168.1.0/24 ping -c3 -b 192.168.1.255 arp -an | grep -i macaddress Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 Democracy must be sometihng more than two wolves and a sheep voting on what to have for dinner -- James Bovard ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] find IP address of device on network based on MAC address
Brian Mathis wrote: On Dec 14, 2007 4:11 PM, Milton Calnek <[EMAIL PROTECTED]> wrote: Brian wrote: On Dec 14, 2007, at 3:21 PM, Les Mikesell wrote: Jerry Geis wrote: I have a device on my network that is not DHCP and I dont know the IP address of it and it has not method of finding it or changing it unless you know the IP address (setable by browser). Is there a way on linux, based on MAC address, to get the IP of the unit? You accumulate a table of mac<->ip assocations, but only after communicating with something. arp -a will show the current entries (which expire fairly quickly). You might ping everything in the network range, then look for the mac in the arp list. to ping every address, check out broadcast pings here http://www.macworld.com/article/53277/2006/10/pingfind.html (or google other how-to's) The tool you want is fping. It's available from the rpmforge repository. fping -ga 192.168.c.d/m arp -n | grep aa:bb:cc:dd:ee:ff Now you may have two problems: 1. The unknown device is not in your address space. ie: your net is 192.168.0.0/24 and the ip of the device is 192.168.1.1. 2. Your mask is too large. ie: 192.168.0.0/20 may be too large for you to scan the entire address space before your arp tables runs out of room. Good luck. -- Milton Calnek BSc, A/Slt(Ret.) You can sacrifice a little bit of speed (this is not parallel) at the advantage of not having to install another package by doing something like this (using bash): for ((i=1; i<=254; i+=1)) do ping -c 5 192.168.1.$i done OR for ((i=1; i<=254; i+=1)) do for ((j=1; j<=254; j+=1)) ping -c 5 192.168.$i.$j done done You sacrifice a lot of speed. To the point where if you do your arp after all the pings have finished, some of the arp entries at the lower end will have been deleted based on time when working with one class C. If you want to do it that way try: ping -c 3 192.168.$i.$j; arp -n | grep aa:bb:cc:dd:ee:ff Also seq is much easier to use... for i in `seq 0 255`; do You can probably get parallel by adding an "&" to the end of the ping line ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos -- Milton Calnek BSc, A/Slt(Ret.) [EMAIL PROTECTED] 306-717-8737 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] find IP address of device on network based on MAC address
On Dec 14, 2007 4:11 PM, Milton Calnek <[EMAIL PROTECTED]> wrote: > Brian wrote: > > > > On Dec 14, 2007, at 3:21 PM, Les Mikesell wrote: > > > >> Jerry Geis wrote: > >>> I have a device on my network that is not DHCP and I dont know the IP > >>> address of it > >>> and it has not method of finding it or changing it unless you know > >>> the IP address (setable by browser). > >>> Is there a way on linux, based on MAC address, to get the IP of the > >>> unit? > >> > >> You accumulate a table of mac<->ip assocations, but only after > >> communicating with something. arp -a will show the current entries > >> (which expire fairly quickly). You might ping everything in the > >> network range, then look for the mac in the arp list. > > > > to ping every address, check out broadcast pings here > > > > http://www.macworld.com/article/53277/2006/10/pingfind.html > > (or google other how-to's) > > The tool you want is fping. It's available from the rpmforge repository. > > fping -ga 192.168.c.d/m > arp -n | grep aa:bb:cc:dd:ee:ff > > Now you may have two problems: > 1. The unknown device is not in your address space. ie: your net is > 192.168.0.0/24 and the ip of the device is 192.168.1.1. > 2. Your mask is too large. ie: 192.168.0.0/20 may be too large for you > to scan the entire address space before your arp tables runs out of room. > > Good luck. > > -- > Milton Calnek BSc, A/Slt(Ret.) You can sacrifice a little bit of speed (this is not parallel) at the advantage of not having to install another package by doing something like this (using bash): for ((i=1; i<=254; i+=1)) do ping -c 5 192.168.1.$i done OR for ((i=1; i<=254; i+=1)) do for ((j=1; j<=254; j+=1)) ping -c 5 192.168.$i.$j done done You can probably get parallel by adding an "&" to the end of the ping line ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] find IP address of device on network based on MAC address
Brian wrote: On Dec 14, 2007, at 3:21 PM, Les Mikesell wrote: Jerry Geis wrote: I have a device on my network that is not DHCP and I dont know the IP address of it and it has not method of finding it or changing it unless you know the IP address (setable by browser). Is there a way on linux, based on MAC address, to get the IP of the unit? You accumulate a table of mac<->ip assocations, but only after communicating with something. arp -a will show the current entries (which expire fairly quickly). You might ping everything in the network range, then look for the mac in the arp list. to ping every address, check out broadcast pings here http://www.macworld.com/article/53277/2006/10/pingfind.html (or google other how-to's) The tool you want is fping. It's available from the rpmforge repository. fping -ga 192.168.c.d/m arp -n | grep aa:bb:cc:dd:ee:ff Now you may have two problems: 1. The unknown device is not in your address space. ie: your net is 192.168.0.0/24 and the ip of the device is 192.168.1.1. 2. Your mask is too large. ie: 192.168.0.0/20 may be too large for you to scan the entire address space before your arp tables runs out of room. Good luck. -- Milton Calnek BSc, A/Slt(Ret.) [EMAIL PROTECTED] 306-717-8737 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] find IP address of device on network based on MAC address
On Dec 14, 2007 5:02 PM, Jerry Geis <[EMAIL PROTECTED]> wrote: > I have a device on my network that is not DHCP and I dont know the IP > address of it > and it has not method of finding it or changing it unless you know the > IP address (setable by browser). > > Is there a way on linux, based on MAC address, to get the IP of the unit? Most TCP/IP devices broadcast some gratuitous arp packet on boot which you should be able to "tcpdump" on the net -- Marcelo "¿No será acaso que ésta vida moderna está teniendo más de moderna que de vida?" (Mafalda) ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] find IP address of device on network based on MAC address
On Dec 14, 2007, at 3:21 PM, Les Mikesell wrote: Jerry Geis wrote: I have a device on my network that is not DHCP and I dont know the IP address of it and it has not method of finding it or changing it unless you know the IP address (setable by browser). Is there a way on linux, based on MAC address, to get the IP of the unit? You accumulate a table of mac<->ip assocations, but only after communicating with something. arp -a will show the current entries (which expire fairly quickly). You might ping everything in the network range, then look for the mac in the arp list. to ping every address, check out broadcast pings here http://www.macworld.com/article/53277/2006/10/pingfind.html (or google other how-to's) then do the arp -a but keep in mind not everything responds to broadcast pings. Brian ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] find IP address of device on network based on MAC address
Jerry Geis wrote: I have a device on my network that is not DHCP and I dont know the IP address of it and it has not method of finding it or changing it unless you know the IP address (setable by browser). Is there a way on linux, based on MAC address, to get the IP of the unit? You accumulate a table of mac<->ip assocations, but only after communicating with something. arp -a will show the current entries (which expire fairly quickly). You might ping everything in the network range, then look for the mac in the arp list. -- Les Mikesell [EMAIL PROTECTED] ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] find IP address of device on network based on MAC address
On Dec 14, 2007 3:02 PM, Jerry Geis <[EMAIL PROTECTED]> wrote: > I have a device on my network that is not DHCP and I dont know the IP > address of it > and it has not method of finding it or changing it unless you know the > IP address (setable by browser). > > Is there a way on linux, based on MAC address, to get the IP of the unit? Ping all the ips on your network, then use 'arp' to show the ip and mac linking. This should give you the information you need. -- During times of universal deceit, telling the truth becomes a revolutionary act. George Orwell ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] find IP address of device on network based on MAC address
I have a device on my network that is not DHCP and I dont know the IP address of it and it has not method of finding it or changing it unless you know the IP address (setable by browser). Is there a way on linux, based on MAC address, to get the IP of the unit? Thanks, Jerry ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos