Assignment 2CN
Assignment 2CN
Computer Networks
Understanding IP Addressing:
An IP (Internet Protocol) address is a numerical label assigned to each device connected to a network that uses the
Internet Protocol for communication. It serves two main functions:
IPv4 (Internet Protocol version 4): Uses a 32-bit addressing scheme (e.g., 192.168.1.1).
IPv6 (Internet Protocol version 6): Uses a 128-bit addressing scheme (e.g., 2001:db8::ff00:42:8329).
For effective network management, IP addresses are classified into public and private IP addresses.
A. Public IP Addresses
Definition: Public IPs are globally unique addresses assigned by an Internet Service Provider (ISP). They
allow devices to communicate directly over the internet.
Purpose: Used by websites, cloud servers, email servers, and other internet-facing devices.
Example Use Cases:
o Hosting a website (203.0.113.5).
o Connecting an enterprise firewall to the internet.
o Assigning to cloud servers for remote access.
Public IP Address Ranges (Assigned by IANA – Internet Assigned Numbers Authority):
o Any IP that is not in the private range is considered public.
Example of a Public IP: 102.54.98.12
B. Private IP Addresses
Definition: Private IP addresses are reserved for internal network communication and cannot be accessed
directly from the internet.
Purpose: Used for local area networks (LANs), office networks, and home Wi-Fi setups.
Example Use Cases:
o Assigning IPs to computers, printers, and IoT devices.
o Internal communication within an enterprise network.
o Connecting devices within a home Wi-Fi network.
Private IP Address Ranges (Defined by RFC 1918):
o Class A: 10.0.0.0 – 10.255.255.255 (Large organizations)
o Class B: 172.16.0.0 – 172.31.255.255 (Medium-sized networks)
o Class C: 192.168.0.0 – 192.168.255.255 (Small networks, home routers)
Example of a Private IP: 192.168.1.10
Since private IPs are non-routable over the internet, they rely on Network Address Translation (NAT) to
communicate with public networks.
The structured use of public and private IP addressing enables efficient networking. Below are key aspects:
A. Network Segmentation
Public and private IPs help separate internal (local) and external (internet) communications.
This improves network organization, security, and efficiency.
Example:
o A company assigns private IPs to employee computers (192.168.1.5).
o The company’s web server has a public IP (205.45.67.10).
B. Security Enhancement
Since IPv4 addresses are limited, private IPs are reused across different networks.
Private IPs ensure scalability without exhausting global IP space.
Example:
o Every home router uses 192.168.x.x, but NAT allows them to access the internet using a public IP.
DHCP (Dynamic Host Configuration Protocol) automatically assigns private IPs to devices.
Reduces manual configuration and simplifies network management.
Example:
o A home router dynamically assigns IPs (192.168.1.10, 192.168.1.11) to connected devices.
Cloud services use public IPs for global accessibility (e.g., AWS, Azure).
Private IPs enable secure internal communication between virtual machines (VMs).
Example