17 May 2012

IP to MAC conversion

On the LAN packets are sent between computers and switches using MAC addresses. FQDN (fully qualified domain name) will be resolved to IP addresses using DNS (domain name system) servers. To test how name is resolved to IP address, you can use command:

nslookup google.ee 8.8.8.8

“nslookup” is command’s name, “google.ee” is name to be resolved and “8.8.8.8” is a DNS server on the Internet or LAN (you can omit the last option, then it uses first DNS server found in ipconfig /all). Result looks like that:

image

Next step would be the IP to MAC conversion (this will be done only for local subnet addresses). If address is on remote subnet, then the local gateway’s MAC address needs to be resolved. To test a IP2MAC conversion, you probably ping the IP address and then run following command:

for IPv4 addresses: arp -a

to find a particular IP address: arp –a | findstr 192.168.0.1

image

for IPv6 addresses: netsh interface ipv6 show neighbors

to find a particular IP address: netsh interface ipv6 show neighbors | findstr fe80::3579

image

To find local MAC address, use getmac or ipconfig /all command

No comments:

Post a Comment