Re: Determine IP Adrress from MAC Address
Joe Pfeiffer writes: > Muntasim-Ul-Haque writes: > >> Hi, >> How can I determine the IP address if I already have the MAC address >> or Hardware Address? What is the most convenient way? >> >> -Muntasim Ul Haque > > The fact that you already have the MAC address doesn't matter in finding > out your IP address. > > ifconfig will give you both the MAC address and IP address of all your > network interfaces: > > snowball:593$ ifconfig > eth0 Link encap:Ethernet HWaddr d4:3d:7e:01:8c:8f > inet addr:192.168.13.2 Bcast:192.168.13.255 Mask:255.255.255.0 > inet6 addr: fe80::d63d:7eff:fe01:8c8f/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:75979320 errors:0 dropped:0 overruns:0 frame:0 > TX packets:79860948 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:26691502625 (24.8 GiB) TX bytes:34703381554 (32.3 GiB) > > loLink encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > inet6 addr: ::1/128 Scope:Host > UP LOOPBACK RUNNING MTU:65536 Metric:1 > RX packets:590910 errors:0 dropped:0 overruns:0 frame:0 > TX packets:590910 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:38390044 (36.6 MiB) TX bytes:38390044 (36.6 MiB) > > So eth0 (my ethernet card) has IP address 192.168.13.2, and lo (the > loopback "device", used for programs on my machine to talk to other > programs on the same machine) has 127.0.0.1 -- it's actually always > 127.0.0.1 > > If you have network devices that aren't configured at the moment, > ifconfig -a will tell you about them too (but they won't have IP > addresses). Ah, re-reading: when you said "the" MAC address, my previous response was based on the assumption that you meant "your" IP address. If you need the IP address of some other machine, arping should give it to you. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1bfvnhphb8@snowball.wb.pfeifferfamily.net
Re: Determine IP Adrress from MAC Address
Ahoj, Dňa Tue, 18 Feb 2014 00:36:08 +0600 Muntasim-Ul-Haque napísal: > Hi, > How can I determine the IP address if I already have the MAC address > or Hardware Address? What is the most convenient way? The simplest way is look into (as root): arp -a I you are happy man, it will be there ;-) More complicated way is to use the arping or arp-scan tools, e.g.: arp-scan -l I never used the arping ;-) regards -- Slavko http://slavino.sk signature.asc Description: PGP signature
Re: Determine IP Adrress from MAC Address
Muntasim-Ul-Haque writes: > Hi, > How can I determine the IP address if I already have the MAC address > or Hardware Address? What is the most convenient way? > > -Muntasim Ul Haque The fact that you already have the MAC address doesn't matter in finding out your IP address. ifconfig will give you both the MAC address and IP address of all your network interfaces: snowball:593$ ifconfig eth0 Link encap:Ethernet HWaddr d4:3d:7e:01:8c:8f inet addr:192.168.13.2 Bcast:192.168.13.255 Mask:255.255.255.0 inet6 addr: fe80::d63d:7eff:fe01:8c8f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:75979320 errors:0 dropped:0 overruns:0 frame:0 TX packets:79860948 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:26691502625 (24.8 GiB) TX bytes:34703381554 (32.3 GiB) loLink encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:590910 errors:0 dropped:0 overruns:0 frame:0 TX packets:590910 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:38390044 (36.6 MiB) TX bytes:38390044 (36.6 MiB) So eth0 (my ethernet card) has IP address 192.168.13.2, and lo (the loopback "device", used for programs on my machine to talk to other programs on the same machine) has 127.0.0.1 -- it's actually always 127.0.0.1 If you have network devices that aren't configured at the moment, ifconfig -a will tell you about them too (but they won't have IP addresses). -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1bk3ctpk5n@snowball.wb.pfeifferfamily.net
Re: Determine IP Adrress from MAC Address
Hi On Tue, Feb 18, 2014 at 12:36:08AM +0600, Muntasim-Ul-Haque wrote: > Hi, > How can I determine the IP address if I already have the MAC address > or Hardware Address? What is the most convenient way? I know of no "easy" way - but there *are* two ways I can think of. Both assume that you have access to another box on the same network. (1) Passively listen on the network and wait for the MAC address to "speak". Since you are most likely connected via a switch, you will only see broadcast/multicast traffic (unless the target MAC address talks directly to you). Something like: # tcpdump -i eth0 -n -l -c 1 ether host ${mac_address} and arp Then you can see ARP requests issued by the mac address in question, in the style of: 19:03:02.281737 ARP, Request who-has 192.168.0.130 (ff:ff:ff:ff:ff:ff) tell 192.168.0.3, length 28 which tells us which IP address ${mac_address} is associated with (192.168.0.3 in my example) (2) Another way is to actively scan the whole network, and check your arp cache afterwards, e.g.: # nmap -sP 192.168.0.0/24 (lots of nmap output - can be ignored) # arp -an Hope this helps -- Karl E. Jorgensen -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20140217190704.GB9715@hawking
Re: Determine IP Adrress from MAC Address
You can't, it's two different thing. As you said the MAC address, is linked to your hardware, whereas the IP is given by the network, it will change if you change network. fabrice On 02/17/2014 07:36 PM, Muntasim-Ul-Haque wrote: Hi, How can I determine the IP address if I already have the MAC address or Hardware Address? What is the most convenient way? -Muntasim Ul Haque -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/53025b67.4020...@gmail.com