Re: Determine IP Adrress from MAC Address
Muntasim-Ul-Haque <tranjeeshan@inventati.org> 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)
lo Link 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).
Reply to: