Sobes.tech
Junior

What is the difference between an IP address and a MAC address?

sobes.tech AI

Answer from AI

IP address (Internet Protocol address) is a logical address of a node in a network, used for routing data. It is assigned to a program or device that requests it. An IP address can change (dynamic or static).

MAC address (Media Access Control address) is a unique physical address of a device's network adapter (e.g., network card). It is "embedded" by the manufacturer into the hardware and does not change. It is used at the data link layer of the OSI model to identify the device within a local network.

Main differences:

Characteristic IP address MAC address
OSI model layer Network layer (layer 3) Data link layer (layer 2)
Purpose Identification in the network (for routing) Device identification within a local network
Ownership Assigned to a program/device Assigned by the manufacturer to the device
Changeability Can change (dynamic/static) Permanent (unique to the adapter)
Format IPv4 (e.g., 192.168.1.1) or IPv6 48-bit or 64-bit address (e.g., 00:1A:2B:3C:4D:5E)

Example of use: When a device sends data to another network, the router uses the recipient's IP address to determine the route. Within a local network, the MAC address of the recipient is used to deliver the packet to the final device.