虽然有许多关于IP到MAC地址转换的教程,但用于反向转换的教程不多。我已经检查了RARP(这只是协议)。是否有一种方法可以将MAC转换为IP。谢谢!
发布于 2011-09-28 14:00:18
在Linux上,您可以使用arp
命令获取此类信息:
$ sudo arp -n
Address HWtype HWaddress Flags Mask Iface
192.168.1.5 ether 01:00:00:11:44:11 C eth0
192.168.1.6 ether 02:00:00:44:33:22 C eth0
发布于 2020-06-27 05:07:11
我已经确切地解决了你的问题,让我来解释你所需要的一切,比如如何将MAC地址转换为IP地址或MAC to IPv4 IPv6 IP地址?什么是MAC地址?mac地址是48位,IPv6地址是128位。
Here is the MAC to IP address conversion process step by step:
take the mac address: for example 52:74:f2:b1:a8:7f.
throw ff:fe in the middle: 52:74:f2:ff:fe:b1:a8:7f.
reformat to IPv6 notation 5274:f2ff:feb1:a87f.
convert the first octet from hexadecimal to binary: 52 -> 01010010.
invert the bit at index 6 (counting from 0): 01010010 -> 01010000.
convert octet back to hexadecimal: 01010000 -> 50.
replace first octet with newly calculated one: 5074:f2ff:feb1:a87f.
prepend the link-local prefix: fe80::5074:f2ff:feb1:a87f.
MAC地址转换工具是如何工作的?你也可以使用完美的MAC address converter,可以将任何MAC地址转换成IPv4 internet protocol address ranges和IPV6 internet protocol address ranges。它将MAC地址作为输入字符串,并针对给定的MAC地址和转换选项(如convert as IPv6 to IPv4或两者)生成查询,然后执行上述步骤。查询根据选定的options.As生成输出响应,如果提供的MAC地址无效或不可转换,则工具将生成无效的输入消息响应。
https://stackoverflow.com/questions/7578889
复制相似问题