🌐 Networking Fundamentals Part 2 IP Addressing & Services

Networking Fundamentals —
IP Addressing & Services

IP addresses, IPv4 vs IPv6, public & private IPs, subnet masks, gateways, DHCP, hostnames, localhost, and DNS — everything a device needs to communicate on a network.

📌IP Addressing
🔌Network Configuration
🌐DNS & Hostnames
📌  Part 2 — IP Addresses
1Why IP Addresses?

Why Do We Need IP Addresses?

From Part 1, we know every NIC has a MAC address — great for identifying devices on a local network. But MAC addresses are not practical for global communication. There is no hierarchy; routers cannot use them to determine where a device is located globally.

Just like sending a letter requires Country → State → City → Street → House Number, networks need a hierarchical location system. That system is called an IP Address.

2What is an IP Address?

What is an IP Address?

IP stands for Internet Protocol. An IP address identifies where a device is located on a network — think of it as a home address, while the MAC address is an identity card.

IdentifierAnalogyAnswersChanges?
MAC AddressIdentity CardWho are you?Never
IP AddressHome AddressWhere are you?Yes (can change)
IP infographic: Why we need IP addresses with postal analogy Country-State-City-Street-House, What is an IP Address with MAC vs IP comparison showing MAC identifies who you are and IP identifies where you are
Why IP addresses exist (postal analogy) and the MAC Address vs IP Address distinction
🕐  IP Versions
3IPv4

IPv4

IPv4 (Internet Protocol Version 4) is the most widely deployed version of IP. It uses 32 bits, written as four octets (0–255) separated by dots.

Example: 192.168.1.10 → four sections, each called an octet, each ranging from 0 to 255.

IPv4 allows 2324.3 billion addresses — a number that seemed enormous in the early days but has been exhausted by smartphones, laptops, tablets, and IoT devices.

4Why Not IPv5?

Why Not IPv5?

IPv5 actually existed — it was assigned to the Internet Stream Protocol (ST-II), designed for audio streams, video streams, and real-time communications. It was never intended to replace IPv4 as the general Internet protocol, so IPv6 became the successor.

5IPv6

IPv6

IPv6 (Internet Protocol Version 6) was created specifically to solve IPv4 address exhaustion. It uses 128 bits — providing 2128 addresses, an unimaginably large number sufficient for every device on Earth many times over.

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

👥

More Addresses

The primary reason IPv6 exists. Virtually unlimited address space.

Better Routing Efficiency

Internet routers handle routes more efficiently with IPv6 headers.

🔌

Simpler Allocation

Large address spaces simplify network design and eliminate NAT.

🎯

Built-In Modern Features

Designed with future networking requirements in mind from the start.

IPv4 IPv5 IPv6 infographic: IPv4 structure with 32 bits and four octets showing 192.168.1.10 split as Octet 1-4, IPv4 address limit of 4.3 billion, Why Not IPv5 (Internet Stream Protocol ST-II for audio/video), IPv6 with 128 bits and 2-to-128 addresses and four advantages
IPv4 structure (32-bit, 4 octets), Why IPv5 was skipped, and IPv6 (128-bit, advantages)
🌐  IP Types
6Public IP

Public IP Addresses

A Public IP Address is globally unique and reachable from anywhere on the Internet. They are assigned by ISPs (Internet Service Providers). Your home router uses one public IP to represent the entire home network to the outside world.

7Private IP

Private IP Addresses

Private IPs are used inside local networks and are not routable on the public Internet. They exist because if every device needed a public IP, IPv4 would have been exhausted far sooner. Millions of networks can reuse the same private ranges internally.

RangeAddressesTypical Use
Range 110.0.0.0 – 10.255.255.255Large enterprise networks
Range 2172.16.0.0 – 172.31.255.255Medium networks
Range 3192.168.0.0 – 192.168.255.255Home & small office
8Static vs Dynamic

Static vs Dynamic IP Addresses

A static IP is configured manually and never changes — essential for servers, printers, routers, and cameras that must always be reachable at a predictable address. A dynamic IP is assigned automatically (via DHCP) and can change over time — used for phones, laptops, and home computers where flexibility matters more than predictability.

💡
Key rule
Services need predictable addresses → use Static. User devices need easy management → use Dynamic (DHCP handles it automatically).
IP types infographic: Public IP (globally unique, routable, ISP-assigned, example 8.8.8.8 with router topology), Private IP (three ranges 10.x.x.x 172.16-31.x.x 192.168.x.x, not routable publicly), Static vs Dynamic comparison with address stability configuration purpose management and common uses
Public IP (globally unique, ISP-assigned), Private IP (three reserved ranges), Static vs Dynamic comparison
⚙  Network Configuration
9Subnet Mask

Subnet Mask

When a computer wants to communicate, it must first answer: is the destination on the same local network, or is it remote? The subnet mask answers this question.

A subnet mask divides an IP address into two parts: the Network Part (which network does this device belong to?) and the Host Part (which specific device within that network?).

Example: IP 192.168.1.10 with mask 255.255.255.0 means:

  • Network Part: 192.168.1 (the first 24 bits, identified by 255.255.255)
  • Host Part: .10 (the last 8 bits, identified by .0 in the mask)
💡
Why it matters
If the destination is on the same network → send directly. If it is on a different network → send to the Default Gateway. Without subnet masks, devices cannot make this decision.
Subnet mask infographic: Problem (is destination local or remote?), Example with 192.168.1.10 and mask 255.255.255.0 split into Network Part 192.168.1 and Host Part 10 with binary representation, Same network direct communication vs different network requires gateway, Why subnet masks matter flowchart showing Compare Destination IP going to Stay Local or Go to Router
Subnet Mask — problem it solves, network vs host part breakdown, binary representation, same vs different network routing decision
10Default Gateway

Default Gateway

The Default Gateway is the network’s exit door — the device that handles traffic destined for outside your local network. Think of it like a highway entrance: you stay on local streets within your city, but to reach another city you use the highway. In networking, the gateway is that highway entrance.

When a computer determines (via subnet mask) that the destination is not local, it sends the packet to the Default Gateway, which then decides where to forward it next. The gateway is typically:

  • Home Router — common in home networks
  • Enterprise Router — used in business and campus networks
  • Firewall Appliance — provides security and routing between networks
11Gateway vs Bridge

Gateway vs Bridge

Beginners often confuse these two. The key distinction: a bridge joins segments into one network; a gateway connects separate networks.

FeatureBridgeGateway
OSI LayerLayer 2 (Data Link)Layer 3 and above
Address usedMAC AddressesIP Addresses
PurposeJoin network segmentsConnect different networks
Perspective"These are really one network""These are separate networks — I'll route between them"
AnalogyRemove a wall → one large roomKeep rooms separate + add a controlled door
Default Gateway and Gateway vs Bridge infographic: Default Gateway city analogy with PC 192.168.1.10 sending to gateway 192.168.1.1 which routes to Internet, usually the gateway is Home Router Enterprise Router or Firewall. Gateway vs Bridge comparison table with OSI layer address purpose and perspective, Bridge removes wall to create one room vs Gateway keeps rooms separate with controlled door
Default Gateway (network exit door, routing to Internet) and Gateway vs Bridge comparison (OSI layer, address type, purpose, analogy)
12DHCP

DHCP

DHCP stands for Dynamic Host Configuration Protocol. Every device that joins a network needs four things: IP Address, Subnet Mask, Default Gateway, and DNS Server. Without DHCP, every device must be configured manually. With DHCP, a server (usually your router) assigns all of this automatically.

DHCP uses the DORA process — four messages between client and server:

StepNameWho sendsMessage
1DISCOVERClient → Broadcast"Who can give me an IP?"
2OFFERServer → Client"I can give you 192.168.1.100"
3REQUESTClient → Broadcast"I want that address."
4ACKNOWLEDGEServer → Client"It’s yours."
Lease & Renewal
DHCP assigns a lease with an expiry time. Before it expires, the client must renew it. If the lease expires, the DORA process restarts. DHCP uses UDP port 67 (server) and 68 (client).
13Hostname

Hostname

Humans dislike remembering IP addresses. A hostname is a human-readable name assigned to a device — instead of remembering 192.168.1.50, you use SATWIK-LAPTOP. Hostnames make systems easier to identify in logs, configurations, and network tools.

DHCP and Hostname infographic: DHCP problem it solves (every device needs IP Subnet Mask Gateway DNS), DHCP server (usually router), information DHCP provides (IP Subnet Mask Default Gateway DNS Servers Lease Time), DORA process diagram (Discover Who can give me an IP broadcast, Offer I can give you 192.168.1.100, Request I want that address broadcast, Acknowledge Its yours unicast), Hostname showing 192.168.1.50 replaced by SATWIK-LAPTOP with purpose (makes systems easier to identify) examples MAIL-SERVER FILE-SERVER HR-PC-01 and key takeaway
DHCP (Dynamic Host Configuration Protocol) — problem solved, DORA process, lease notes; and Hostname — replacing IP addresses with friendly names
🏠  Local & DNS
14Localhost

Localhost

Localhost means this computer itself. When software communicates with localhost, it is communicating with services running on the same machine — no network traffic leaves the computer. This is essential for developers running local web servers, testing APIs, and database development without requiring a network connection.

15127.0.0.1

127.0.0.1

127.0.0.1 is the special IPv4 loopback address — the actual IP that represents localhost. It always points back to the local machine and allows software to test and run without touching the network at all.

💻

Testing Software

Run and test applications without needing a real network.

🌐

Local Web Servers

Develop websites locally before deploying to the Internet.

🗄

Database Development

Connect to local database instances during development.

🔧

Troubleshooting

Verify that network software is working at the application layer.

16DNS

Introduction to DNS

Imagine typing 142.250.193.14 instead of google.com every time. DNS (Domain Name System) solves this.

DNS converts human-readable domain names into IP addresses that computers use — exactly like your phone’s contacts book converts "Mom" into a phone number. You remember the name; the system looks up the number.

📞
Real-life analogy
You save "Mom" in your contacts, not "+91xxxxxxxxxx". You dial Mom, your phone looks up the number. You type google.com, DNS looks up 142.250.193.14. Same concept.
Localhost 127.0.0.1 and DNS infographic: Localhost meaning this computer itself with browser communicating with web server through localhost (all communication stays inside the computer), 127.0.0.1 special IPv4 localhost address that allows testing software running local web servers database development and troubleshooting without using the network, Introduction to DNS showing google.com instead of 142.250.193.14 with DNS converting domain to IP like phone contacts converting Mom to phone number
Localhost (this computer itself), 127.0.0.1 (loopback address, use cases), and DNS (Domain Name System — domain to IP conversion)
Reference

Part 2 Summary

✅ Key Concepts from Part 2
  • IP Address — identifies where a device is on a network (location, like a home address). IP = Internet Protocol.
  • IPv4 — 32-bit, four octets (0–255), ~4.3 billion addresses. Most widely deployed.
  • IPv5 — assigned to Internet Stream Protocol (ST-II); never replaced IPv4. IPv6 did.
  • IPv6 — 128-bit, 2³²⁸ addresses. Created to solve IPv4 exhaustion. Adds routing efficiency & modern features.
  • Public IP — globally unique, routable on Internet, assigned by ISP. Example: 8.8.8.8.
  • Private IP — used inside local networks, not routable publicly. Three ranges: 10.x.x.x, 172.16–31.x.x, 192.168.x.x.
  • Static IP — never changes, manually configured. For servers, printers, routers, cameras.
  • Dynamic IP — assigned automatically by DHCP, can change. For phones, laptops, home computers.
  • Subnet Mask — divides IP into Network Part + Host Part; determines if destination is local or remote.
  • Default Gateway — network’s exit door; handles all traffic destined outside the local network.
  • Bridge vs Gateway — bridge joins segments (Layer 2, MAC); gateway connects networks (Layer 3+, IP).
  • DHCP — auto-assigns IP, Subnet Mask, Gateway, DNS. DORA process: Discover → Offer → Request → Acknowledge.
  • Hostname — human-readable device name (SATWIK-LAPTOP) replacing hard-to-remember IP addresses.
  • Localhost / 127.0.0.1 — loopback address; refers to "this computer itself". No network traffic leaves.
  • DNS — Domain Name System; converts google.com to 142.250.x.x. The Internet’s contacts book.
📚
What comes next
OSI Model layers, TCP vs UDP, ports, protocols (HTTP/S, FTP, SSH), and how data actually travels from application to physical wire and back.

Networking Fundamentals — Part 2: IP Addressing, Configuration & Services