Skip to content
Related Articles

Related Articles

Improve Article

IP address as logical address and MAC address as Physical address

  • Difficulty Level : Medium
  • Last Updated : 22 Sep, 2021
Geek Week

Overview :
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.

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.

  1. 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 – 172.166.3.28
  2. 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.

Example – 
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 Aadhar 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.

Conclusion :
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.

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :