🌐 What is an IP Address?

📖 Technical Definition

An IP address (Internet Protocol address) is a unique logical address assigned to a device in a network that is used to identify and communicate with that device.

🧠 Simple Meaning

👉 IP Address = Digital Address of a device on a network

Just like your home has an address, every device on a network has an IP address.

📍 Example

  • Mobile: 192.168.1.10
  • Laptop: 192.168.1.20
  • Router: 192.168.1.1

These addresses help devices find and communicate with each other.

🔑 Key Points

  • Logical (can change)
  • Assigned manually or by DHCP
  • Used for communication between networks
  • Works at Network Layer (Layer 3)

🌍 Real-Life Analogy

📮 Postal System Example

  • Your Home Address → IP Address
  • Postman → Network
  • Letter → Data

Without an address, delivery is impossible.

🔗 What is a MAC Address?

📖 Technical Definition

MAC address (Media Access Control Address) is a unique physical address assigned to a network interface card (NIC) by the manufacturer.

🧠 Simple Meaning

👉 MAC Address = Permanent hardware address of a device

It identifies a device physically inside a network.

📍 Example

00:1A:2B:3C:4D:5E

  • Written in Hexadecimal (0–9, A–F)
  • 48-bit address

 

🔑 Key Points

  • Physical (cannot change easily)
  • Assigned by the manufacturer
  • Unique worldwide
  • Works at Data Link Layer (Layer 2)

🧩 Structure of MAC Address

  • First 24 bits → Manufacturer (OUI)
  • Last 24 bits → Device unique number

⚖️ Difference Between IP Address and MAC Address

FeatureIP AddressMAC Address
TypeLogicalPhysical
ChangeableYesNo (generally)
LayerLayer 3 (Network)Layer 2 (Data Link)
FormatDecimal (IPv4)Hexadecimal
PurposeIdentify device in the network.Identify device hardware

🔄 How IP and MAC Work Together

When data is sent:

1️⃣ IP address → Finds the destination network
2️⃣ MAC address → Finds the exact device

👉 Both are required for communication.

📦 Simple Flow

  • You send data to a website
  • IP address identifies the destination
  • MAC address is delivered inside the local network

🎯 Interview-Ready Answers

❓ What is an IP address?

An IP address is a unique logical address assigned to a device in a network to identify and enable communication between devices.

❓ What is a MAC address?

A MAC address is a unique physical address assigned to a network interface card, used to identify a device at the data link layer.

❓ Difference Between IP and MAC?

An IP address is a logical and changeable address used for network communication, whereas a MAC address is a permanent physical address used to identify a device within a local network.

🧠 Memory Trick

👉 IP = Identity in Network
👉 MAC = Machine Address Code