IP addresses and MAC addresses are essential for data communication. Assume there are two networks. The first network has three devices: A, B, C and the second network has three devices: X, Y, Z. If a device A from the first network wishes to send data to a device Y in the second network, it must first determine where Y is located in the second network, which requires learning the IP address/ logical address, because the connection is subject to change and is not permanent due to the nature of the Packet Switched Network (Logical). However, in order to send data to that device, it must pass the data across physical communication links, for which a MAC Address/Physical address is utilized.
An IP address is a logical address assigned to a device on a network, whereas a MAC address is a physical address hardcoded into the network interface card (NIC) of a device.
- An IP address is used to identify and communicate with devices on a network. It is assigned to a device by the network administrator or a DHCP (Dynamic Host Configuration Protocol) server. An IP address consists of two parts: network ID and host ID. The network ID identifies the network on which the device is connected, and the host ID identifies the specific device within the network. IP addresses are hierarchical and can be subnetted, allowing for more efficient use of address space and better management of networks.
- On the other hand, a MAC address is a physical address tied to the hardware of the NIC. It is a unique identifier hardcoded by the device manufacturer and consists of six pairs of hexadecimal digits. The MAC address is used to identify the device on a physical network, such as an Ethernet LAN. The MAC address is used for low-level communication between devices on the same network, such as data transfer and network discovery.
The difference between logical and physical addresses is that logical addresses, such as IP addresses, are assigned by software protocols and can be changed or reconfigured, whereas physical addresses, such as MAC addresses, are hardcoded into the hardware of the device and cannot be changed. Logical addresses are used for higher-level network communication, such as routing and addressing, whereas physical addresses are used for low-level communication, such as data transfer.
In summary, an IP address is a logical address used for network communication and routing, whereas a MAC address is a physical address used for low-level communication on a physical network.
IP Address :
An Internet Protocol address is an IP address. It is a unique address that identifies the device on the network. The Internet Service Provider (ISP) assigns IP addresses to all devices on its network. IP addresses are not generated at random. The Internet Assigned Numbers Authority (IANA), a part of the Internet Corporation for Assigned Names and Numbers (ICANN), generates and assigns them mathematically . IP addresses are used at the network layer. IP Addresses are routable in nature.
IP Version Types :
There are 2 different versions of IP as follows.
- IPv4 (IP version 4) –
IPv4 employs a 32-bit address. It is composed of four numbers separated by a ‘dot’ i.e., periods called an octet (byte). Each number in the octet can range from 0 to 255.
Example – 18.104.22.168
- IPv6 (IP version 6) –
IPv6 is the next generation of Internet Protocol addresses. In comparison to IPV4, IPv6 has a larger address space. IPv6 has a length of 128 bits and is written in hexadecimal. It is composed of eight fields, each of which contains two octets. As a result, IPv6 has 16 octets in total.
Example – 3221:1cd7:74b6:6da7:0000:0000:7349:6472
MAC Address :
A MAC address is a one-of-a-kind identification assigned to a NIC (Network Interface Controller/Card). The full form of MAC address is Media Access Control address. MAC addresses are 48 bits long and these addresses could not be routed between networks. MAC Address is a 12 digit hexadecimal numeral which is most typically expressed with a colon or hyphen separating every two digits (an octet), making reading easier. MAC Addresses are used at the Data Link Layer.
A MAC address of 2c549188c9e3 is represented as 2C:54:91:88:C9:E3 or 2c-54-91-88-c9-e3.
Reason for IP address called a “logical” address, and the MAC address is called a “physical” address :
- An IP address is also known as a logical address and it can change over time as well as from one network to another. The Internet Service Provider will be in charge of assigning it. When a device connects to a different network, it receives a different IP address as a result of a change in Internet Service Provider.
- With the help of Dynamic Host Configuration Protocol (DHCP), even in the same network, when a device wants to connect to the internet, it will acquire different addresses from the pool. There is no assurance that the device always has the same IP address. The IP address is not directly linked to any devices. As a result, it is referred to as a logical address.
- However, there is a MAC address provided by the hardware interface vendor. It never changes when a device is attached to any network. As a result, it is referred to as a physical address.
- IP address is, for example, like school register no, university register no and corporate employee id. When a person transfers from school to college and then to the workplace, he or she is assigned a new Identification Number, which is used to uniquely identify the individual inside that organization. At different periods, the same individual was recognized with a different identification number. Similarly, when one machine connects to a different network, it receives a new IP address each time. Thus it is called a logical address.
- However, that address is unique inside that network. But MAC address is like an Aadhaar number, it never changes to any business. It’s like an original identity.
- In the same way, the MAC address will be the same for the device’s (NIC), for any network on which the device is associated. Thus it is called a physical address. A MAC address is also a unique address. There won’t be the same address for two devices.
The Logical/IP Address identifies a device in a network. But to reach and deliver data to the device, we need a MAC/Physical address.
Share your thoughts in the comments
Please Login to comment...