Search code examples
network-programmingipmac-address

How to calculate mac address from ip address


Hi I'd like to know how can I calculate a Mac address from a ip address manually.

For example if I've this ip:

192.168.0.1/24

What's the mac address?


Solution

  • You cannot calculate the Mac address from the IP address. They originate from different sources.

    • It's generally the hardware that determines its MAC address
    • It's the configuration of the network that determines its IP address.