🌐 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

✨What are IP Versions?

IP (Internet Protocol) has different versions developed to handle communication in networks.

The two main versions are the following:

  • IPv4 (Internet Protocol Version 4)
  • IPv6 (Internet Protocol Version 6)

 

🔢 1️⃣ IPv4 (Internet Protocol Version 4)

📖 Definition

IPv4 is the fourth version of IP and the most widely used protocol for identifying devices on a network.

🔍 Key Features

  • 32-bit address
  • Written in decimal format
  • Divided into 4 octets
  • Each octet ranges from 0 to 255.

📍 Example

192.168.1.1

👉 Structure:
8 bits. 8 bits. 8 bits. 8 bits = 32 bits

📊 Total IP Addresses

IPv4 provides approximately

👉 4.3 Billion (2³²) addresses

⚠️ Limitation

Due to the rapid growth of internet devices, IPv4 addresses are almost exhausted.

 

🌐 IP Versions 

Two main versions of Internet Protocol:

  • IPv4 (Internet Protocol Version 4)
  • IPv6 (Internet Protocol Version 6)

🔢 IPv4

  • 32-bit address
  • Written in decimal format
  • Example: 192.168.1.1
  • Total addresses: ~4.3 billion
  • Most widely used

⚠️ Limitation: Address shortage

 

🚀 IPv6

  • 128-bit address
  • Written in hexadecimal format
  • Example: 2001:db8::1
  • Almost unlimited addresses

✅ Solution to IPv4 exhaustion

⚖️ IPv4 vs IPv6 (Quick View)

FeatureIPv4IPv6
Size32-bit128-bit
FormatDecimalHexadecimal
Example192.168.1.12001:db8::1
Address CountLimitedHuge

 

🌐 1️⃣ IPv4 Address Structure

 

📖 Definition

An IPv4 address is a 32-bit logical address divided into 4 parts (octets).

 

🧩 Structure Breakdown

👉 Example IP: 192.168.1.1

Octet 1Octet 2Octet 3Octet 4
19216811

Each octet:

  • Contains 8 bits
  • Range: 0 – 255

👉 Total:
8 + 8 + 8 + 8 = 32 bits

 

🔑 Network ID & Host ID

An IP address has two parts:

  • Network ID → Identifies the network
  • Host ID → Identifies the device

👉 Example:
192.168.1.1

  • Network → 192.168.1
  • Host → 1

(Depends on subnet mask)

 

🔢 2️⃣ Binary Concept (Base of Networking)

Computers understand only binary (0 & 1).

👉 So every IP address is actually stored in binary format.

 

📊 Binary Place Values (Very Important)

Bit PositionValue
1128
264
332
416
58
64
72
81

👉 Total = 255

 

🔄 3️⃣ Decimal to Binary Conversion (Step-by-Step)

🧠 Trick to Convert Decimal → Binary

👉 Use this table:

128 | 64 | 32 | 16 | 8 | 4 | 2 | 1

📌 Example 1: Convert 192 to Binary

Step:

  • 192 ≥ 128 → 1
  • Remaining = 64
  • 64 ≥ 64 → 1
  • Remaining = 0

👉 Binary:
11000000

 

📌 Example 2: Convert 168 to Binary

  • 168 ≥ 128 → 1
  • Remaining = 40
  • 40 ≥ 32 → 1
  • Remaining = 8
  • 8 ≥ 8 → 1

👉 Binary:
10101000

 

📌 Example 3: Convert 1 to Binary

👉 Only last bit = 1

Binary:
00000001

 

🔥 Final Conversion Example

IP Address: 192.168.1.1

DecimalBinary
19211000000
16810101000
100000001
100000001

👉 Final Binary:

11000000.10101000.00000001.00000001

 

⚡ Quick Shortcut Method

  • Memorize common values:
DecimalBinary
000000000
12810000000
19211000000
22411100000
24011110000
25511111111

🎯 Why is This Important?

  • Required for Subnetting
  • Used in CIDR calculations
  • Helps in network design
  • Very common in interviews

 

🎓 Interview-Ready Questions

❓ What is IPv4 structure?

IPv4 is a 32-bit address divided into four octets, where each octet consists of 8 bits and ranges from 0 to 255.

❓ Why binary is used in networking?

Because computers process data in binary format (0 and 1), all IP addresses are internally represented in binary.

❓ Convert 192.168.1.1 into binary

11000000.10101000.00000001.00000001

 

🧠 Memory Trick

👉 128-64-32-16-8-4-2-1 = Full Octet

 

✅ Advantages of IPv4

1️⃣ Simple & Easy to Understand

  • Uses dotted decimal format (e.g., 192.168.1.1)
  • Easy to read, remember, and configure
  • Beginner-friendly

 

2️⃣ Wide Compatibility

  • Supported by almost all devices and networks
  • Works with routers, switches, firewalls, and all operating systems
  • No compatibility issues

 

3️⃣ Well Established & Stable

  • Used for many years → Highly reliable
  • Mature technology with proven performance
  • Stable in real-world environments

 

4️⃣ Efficient for Small Networks

  • Works perfectly in home and small office networks
  • Easy configuration using DHCP or manual IP

 

5️⃣ Low Resource Requirement

  • Requires less memory and processing compared to IPv6
  • Lightweight → Suitable for older devices

 

6️⃣ Supports NAT (Network Address Translation)

  • Allows multiple devices to share a single public IP
  • Helps in conserving IP addresses

👉 Example:
Home network using one internet connection for multiple devices

 

❌ Disadvantages of IPv4

1️⃣ Limited Address Space (Major Problem)

  • Only 4.3 billion addresses (2³²)
  • Due to rapid growth of internet devices → Addresses exhausted

 

2️⃣ Need for NAT

  • NAT solves shortage but creates complexity
  • Breaks end-to-end communication
  • Causes issues in applications like VoIP, gaming

 

3️⃣ Security Limitations

  • No built-in security features
  • Requires external tools like:
    • Firewalls
    • VPN
    • Encryption protocols

 

4️⃣ No Auto-Configuration

  • Requires manual configuration or DHCP
  • More administrative effort

 

5️⃣ Less Efficient Routing

  • Larger routing tables
  • Less optimized compared to IPv6

 

6️⃣ Not Scalable for Future

  • Cannot support growing number of IoT devices
  • Not suitable for future expansion

 

🧠 Real-World Understanding

  • IPv4 = Old phone system with limited numbers
  • IPv6 = New system with unlimited numbers

 

🎯 Key Exam Points

  • IPv4 uses 32-bit addressing
  • Address space is limited
  • NAT is used to overcome shortages.
  • Lacks built-in security
  • Still widely used today

 

🎓 Interview-Ready Answer

❓ What are the advantages and disadvantages of IPv4?

IPv4 is simple, widely supported, and stable, making it suitable for small and existing networks. However, it has a limited address space, lacks built-in security, requires NAT, and is not scalable for future network growth.

 

🌐 Types of IPv4 Addresses

IPv4 addresses are classified based on their usage and purpose in a network.

Main types:

  • Public IP
  • Private IP
  • Loopback IP
  • APIPA
  • Multicast

 

🌍 1️⃣ Public IP Address

 

📖 Definition

public IP address is an IP address that is accessible over the internet.

 

🔑 Features

  • Assigned by ISP (Internet Service Provider)
  • Globally unique
  • Used for internet communication

 

📍 Example

8.8.8.8 (Google DNS)

 

🧩 Use Case

  • Websites
  • Online services
  • Internet communication

 

🏠 2️⃣ Private IP Address

 

📖 Definition

private IP address is used within a local network (LAN) and is not accessible directly from the internet.

 

🔑 Features

  • Used inside homes and offices
  • Not globally unique
  • Requires NAT to access internet

 

📍 Private IP Ranges

  • 10.0.0.0 – 10.255.255.255
  • 172.16.0.0 – 172.31.255.255
  • 192.168.0.0 – 192.168.255.255

 

🧩 Example

192.168.1.1

 

🔁 3️⃣ Loopback Address

 

📖 Definition

loopback address is used to test the network stack of a device.

 

🔑 Features

  • Refers to the same device
  • Used for testing & troubleshooting

 

📍 Range

127.0.0.0 – 127.255.255.255

👉 Most common: 127.0.0.1 (localhost)

 

🧩 Use Case

  • Testing TCP/IP configuration
  • Checking if system networking is working

 

 

⚡ 4️⃣ APIPA (Automatic Private IP Addressing)

 

📖 Definition

APIPA is automatically assigned when a device fails to get an IP from a DHCP server.

 

🔑 Features

  • Automatic assignment
  • Indicates network problem
  • No internet connectivity

 

📍 Range

169.254.0.0 – 169.254.255.255

 

🧩 Real Meaning

👉 If you see 169.254.x.x → DHCP issue

 

📡 5️⃣ Multicast Address

📖 Definition

multicast IP address is used to send data to multiple devices at once (one-to-many).

 

🔑 Features

  • Efficient data delivery
  • Used in streaming, video conferencing

 

📍 Range

224.0.0.0 – 239.255.255.255

 

🧩 Example

Live video streaming to multiple users

 

📊 Quick Summary Table

TypeUsageRange
PublicInternet communicationISP assigned
PrivateLocal network10.x.x.x, 172.16–31.x.x, 192.168.x.x
LoopbackSelf-testing127.x.x.x
APIPADHCP failure169.254.x.x
MulticastOne-to-many224–239.x.x

 

🎯 Key Exam Points

  • Public IP → Internet
  • Private IP → Local network
  • Loopback → Testing
  • APIPA → DHCP failure
  • Multicast → One-to-many communication

🎓 Interview-Ready Answer

❓ What are the types of IPv4 addresses?

IPv4 addresses are classified into public, private, loopback, APIPA, and multicast addresses based on their usage in networking, such as internet communication, local networking, testing, automatic assignment, and group communication.

 

🌐 What are IPv4 Classes?

IPv4 addresses are divided into classes based on:

  • Network size
  • Number of hosts
  • First octet range

👉 Classes help in identifying how many networks and devices can exist.

🧩 IPv4 Classes Overview

 

ClassRange (1st Octet)Default Subnet MaskUsage
A1 – 126255.0.0.0Large networks
B128 – 191255.255.0.0Medium networks
C192 – 223255.255.255.0Small networks
D224 – 239MulticastGroup communication
E240 – 255ReservedResearch

 

🔢 Class A

📍 Range

1.0.0.0 – 126.255.255.255

🔑 Features

  • Very large networks
  • Supports millions of hosts

🧠 Note

  • 127.x.x.x is reserved for loopback

 

🔢 Class B

📍 Range

128.0.0.0 – 191.255.255.255

🔑 Features

  • Medium-sized networks
  • Used by organizations

 

🔢 Class C

📍 Range

192.0.0.0 – 223.255.255.255

🔑 Features

  • Small networks
  • Most commonly used

 

📡 Class D

📍 Range

224.0.0.0 – 239.255.255.255

👉 Used for Multicast

 

🧪 Class E

📍 Range

240.0.0.0 – 255.255.255.255

👉 Reserved for research and future use

 

🏠 Private IPv4 Address Ranges

These are used inside local networks (not on internet).

ClassPrivate Range
A10.0.0.0 – 10.255.255.255
B172.16.0.0 – 172.31.255.255
C192.168.0.0 – 192.168.255.255

 

🌍 Public IPv4 Addresses

  • All IPs outside private ranges
  • Used on the internet
  • Assigned by ISP

👉 Example: 8.8.8.8

 

⚖️ Public vs Private (Quick View)

FeaturePublic IPPrivate IP
AccessInternetLocal network
UniquenessGlobally uniqueCan repeat
Assigned byISPRouter/Admin

🧠 Important Notes (Exam Focus)

  • Class A → Large networks
  • Class B → Medium networks
  • Class C → Small networks
  • Class D → Multicast
  • Class E → Reserved
  • Private IPs cannot access internet directly
  • NAT is used to convert private → public

 

🎯 Memory Trick

👉 A → B → C = Big → Medium → Small
👉 D = Data (Multicast)
👉 E = Experimental

🎓 Interview-Ready Answer

❓ What are IPv4 classes?

IPv4 addresses are divided into five classes: A, B, C, D, and E based on their range and usage. Classes A, B, and C are used for unicast communication, Class D is used for multicast, and Class E is reserved for experimental purposes.

 

🌐 1️⃣ IPv6 Address 

📖 Definition

An IPv6 address is a 128-bit logical address used to uniquely identify devices on a network.

 

🔢 Basic Structure

IPv6 address:

  • 128 bits
  • Written in hexadecimal format (0–9, A–F)
  • Divided into 8 groups
  • Each group = 16 bits
  • Separated by colon :

 

📍 Example

2001:0db8:85a3:0000:0000:8a2e:0370:7334

 

🧩 Structure Breakdown

PartBitsPurpose
Global Routing PrefixFirst 48 bitsIdentifies network
Subnet IDNext 16 bitsIdentifies subnet
Interface IDLast 64 bitsIdentifies device

👉 First 64 bits = Network
👉 Last 64 bits = Host

 

🔄 IPv6 Address Shortening (Important)

IPv6 allows:

1️⃣ Remove Leading Zeros

2001:0db8:0000:0000:0000:0000:0000:0001
→ 2001:db8:0:0:0:0:0:1

 

2️⃣ Use Double Colon (::) Once

2001:db8::1

👉 :: replaces consecutive zeros (can be used only once)

 

🔢 2️⃣ IPv6 Conversion to Binary

Since IPv6 is 128-bit, every hexadecimal digit equals 4 binary bits.

 

📊 Hex → Binary Table

HexBinary
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001
A1010
B1011
C1100
D1101
E1110
F1111

 

📍 Example Conversion

IPv6:
2001

Convert digit by digit:

2 → 0010
0 → 0000
0 → 0000
1 → 0001

Binary:

0010000000000001

👉 Repeat for all 8 groups → total 128 bits

 

🌍 3️⃣ Types of IPv6 Addresses

 

IPv6 addresses are classified into:

  • Unicast
  • Multicast
  • Anycast

 

🔹 1️⃣ Unicast Address

Used for one-to-one communication.

Types of Unicast:

 

✅ Global Unicast

  • Public IPv6
  • Routable on internet
  • Prefix: 2000::/3

Example:
2001:db8::1

 

✅ Link-Local

  • Used inside local network
  • Automatically assigned
  • Not routable on internet
  • Prefix: FE80::/10

Example:
FE80::1

 

✅ Unique Local

  • Similar to private IPv4
  • Used in private networks
  • Not internet routable
  • Prefix: FC00::/7

Example:
FD00::1

 

🔹 2️⃣ Multicast Address

  • One-to-many communication
  • Replaces broadcast in IPv6
  • Prefix: FF00::/8

Example:
FF02::1

 

🔹 3️⃣ Anycast Address

  • One-to-nearest communication
  • Same IP assigned to multiple devices
  • Data goes to nearest device

Used in DNS and large networks.

 

📊 IPv6 Prefix Identification Table

TypePrefixUsage
Global Unicast2000::/3Public internet
Link-LocalFE80::/10Local network
Unique LocalFC00::/7Private network
MulticastFF00::/8One-to-many
Loopback::1/128Self testing
Unspecified::/128No address

✅ Advantages of IPv6

 

1️⃣ Huge Address Space

  • 2¹²⁸ addresses
  • Almost unlimited

 

2️⃣ No NAT Required

  • End-to-end connectivity
  • Better performance

 

3️⃣ Built-in Security

  • Supports IPsec natively
  • More secure communication

 

4️⃣ Auto Configuration

  • Stateless Address Auto Configuration (SLAAC)
  • Plug-and-play networking

 

5️⃣ Efficient Routing

  • Smaller routing tables
  • Hierarchical addressing

 

6️⃣ No Broadcast

  • Uses multicast instead
  • Reduces unnecessary traffic

 

❌ Disadvantages of IPv6

 

1️⃣ Complex Format

  • Long hexadecimal addresses
  • Hard to memorize

 

2️⃣ Transition Cost

  • Requires new infrastructure
  • Upgrade routers & firewalls

 

3️⃣ Compatibility Issues

  • Some older devices may not support IPv6

 

4️⃣ Learning Curve

  • Network engineers must learn new concepts

🎓 IPv6 Interview Questions

 

1️⃣ What is an IPv6 address?

An IPv6 address is a 128-bit logical address used to uniquely identify devices on a network and enable communication over the Internet.
It was developed to overcome the address exhaustion problem of IPv4.

 

2️⃣ Why was IPv6 introduced?

IPv6 was introduced because IPv4 has limited address space (32-bit) and the number of internet-connected devices increased rapidly.

IPv6 provides 2¹²⁸ addresses, which is almost unlimited.

3️⃣ What is the length of an IPv6 address?

An IPv6 address is 128 bits long and written in hexadecimal format separated by colons.

Example:
2001:db8::1

👉 Join our 45-Day Job-Oriented Networking Internship and start building real IT skills.

https://www.evisiontechnoserve.com/internships/it/45-days-job-internship-program-live