That is valid for IPv4, but IPv6 has link local addresses for each device inherited from NIC MAC addresses, note this: inet6 addr: fe80::a00:27ff:fe80:e2be/64 Scope:Link. ![]() ![]() There have been a few interesting comments on this post, I encourage you to read them if you want to learn more about this mechanism. As youve mentioned, you dont have IP addresses in this network. Here’s the conversion process step by step: take the mac address: for example 52:74:f2:b1:a8:7f. A mac address is 48 bits, an IPv6 address is 128 bits. One of the ways I learn a new scripting language is to implement a subroutine to convert a network MAC addr into the IPv6 link-local address, as described in RFC 4862. For IPv4 ARP is used to find out which MAC (Layer-2) address belongs to a certain IP (Layer-3) address. MAC addresses are on Layer-2, IP on Layer-3 of the OSI model. prepend the link-local prefix: fe80::5074:f2ff:feb1:a87fĪ converter to do the same operation in reverse is available here. This link-local IPv6 is infered from the NIC’s mac address. On Linux use ip or ifconfig for most Windows look at the driver settings of your network interface.replace first octet with newly calculated one: 5074:f2ff:feb1:a87f.convert octet back to hexadecimal: 01010000 -> 50.convert the first octet from hexadecimal to binary: 52 -> 01010010.reformat to IPv6 notation 5274:f2ff:feb1:a87f.take the mac address: for example 52:74:f2:b1:a8:7f.Here’s the conversion process step by step: This link-local IPv6 is infered from the NIC’s mac address.Ī mac address is 48 bits, an IPv6 address is 128 bits. It might also be useful to check if the given arguments are correct MACs or IPv6s. ![]() Instead of getting an address via DHCP, a NIC will hop on the network with a link-local IPv6 address and with this will have to ability to do further configuration automatically (soliciting neighbors, router, et cetera). Here are two functions to convert in both ways. Link-local IPv6 addresses are used as part of the IPv6 network auto-configuration process.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |