Networking Basics for UPSC: IP Addressing, Subnetting

Networking Basics for UPSC: IP Addressing, Subnetting

Computer networking is the foundation of digital communication, allowing devices to exchange data efficiently across local and global networks. For UPSC and other prelims exams, the most important basics include IP addressing, subnetting, routing, and the role of key network devices.

IP Addressing: Core Idea

An Internet Protocol (IP) address is a numerical label assigned to every device connected to a network that uses the Internet Protocol for communication. It helps identify devices and ensures packets reach the correct destination.

  • Function: Identifies a device on a network.
  • Use: Supports routing of data packets between source and destination.
  • Structure: Split into a network part and a host part.

IPv4 and IPv6 Addressing

IPv4 is a 32-bit numeric address written in dotted-decimal notation. It is divided into four octets separated by dots, and each octet ranges from 0 to 255. IPv4 addresses are limited in number, which led to address exhaustion over time.

IPv6 uses a 128-bit numerical structure written in eight groups of four hexadecimal digits separated by colons. It was designed to solve the depletion problem of IPv4 and also supports stateless address autoconfiguration and integrated security mechanisms at the network layer.

  • IPv4 format: 32 bits, dotted-decimal, four octets.
  • IPv6 format: 128 bits, hexadecimal, eight groups.
  • Main advantage of IPv6: Vastly larger address space.
  • IPv6 feature: Supports autoconfiguration.

Exam fact: IPv4 was formally defined in RFC 791, while IPv6 was formalized under RFC 2460.

Classful Addressing and CIDR

Earlier IPv4 systems used classful addressing, where networks were grouped into Class A, Class B, Class C, Class D, and Class E based on leading bits. This approach has largely been replaced by more flexible methods.

Classless Inter-Domain Routing (CIDR) replaces fixed class boundaries with arbitrary-length prefix notation. In CIDR, a slash is added to the address followed by the number of network bits.

  • Class A, B, C: Used for general unicast addressing in the classful model.
  • Class D: Reserved for multicast.
  • Class E: Reserved for experimental purposes.
  • CIDR notation: Example format is address slash prefix length.

Subnetting and Subnet Masks

Subnetting divides one physical network into multiple smaller logical sub-networks. This improves routing efficiency, reduces broadcast traffic, and helps with better network management and security.

A subnet mask is a 32-bit number used to separate the network and host portions of an IP address. Variable Length Subnet Masking (VLSM) allows network administrators to create subnets of different sizes according to host requirements.

  • Subnetting purpose: Break a large network into smaller segments.
  • Subnet mask role: Identifies the network and host portions.
  • VLSM: Allows different subnet sizes within the same network.
  • Benefit: Better allocation of available IP addresses.

Network ID, Broadcast Address and Usable Hosts

In any subnet, the first address is the network identifier. The last address is the broadcast address, used to communicate with all devices on that subnet. Usable host addresses exclude both of these addresses.

  • Network ID: Identifies the subnet itself.
  • Broadcast address: Reaches all hosts in that subnet.
  • Usable host range: Lies between the network ID and broadcast address.

Routing: How Packets Travel

Routing directs network packets from the source to the destination across interconnected networks. Routers use routing tables to choose paths and forward packets based on IP addresses.

  • Static routing: Manually configured paths that remain fixed unless changed by an administrator.
  • Dynamic routing: Paths are calculated automatically using routing protocols.
  • Default routing: Used when no specific route is available; acts as a fallback route.
Routing Protocols
  • RIP (Routing Information Protocol): Uses hop count as the metric to select the best path.
  • OSPF (Open Shortest Path First): Uses the Dijkstra algorithm to calculate the shortest path tree.
  • BGP (Border Gateway Protocol): Manages routing between autonomous systems across the global internet.

Network Hardware and Important Reserved Addresses

Different network devices perform different tasks in packet transmission and translation.

  • Router: Works at the network layer and forwards packets between different networks.
  • Switch: Works at the data link layer and connects devices within a local area network using MAC addresses.
  • Gateway: Translates communication between incompatible network architectures.
  • Modem: Converts digital signals into analog signals for transmission over telephone or cable lines.

Some IP ranges and addresses are reserved for special use. Loopback address is 127.0.0.1, used for local host testing. Private IP address ranges for internal home and enterprise networks are defined under RFC 1918. Autonomous systems use unique autonomous system numbers assigned by regional internet registries to exchange routing information via BGP.

Key Prelims Takeaways

  • IP address: A numerical label used to identify a device on an IP network.
  • IPv4: 32-bit address in dotted-decimal form with four octets.
  • IPv6: 128-bit address designed to overcome IPv4 exhaustion.
  • CIDR: Replaced class-based addressing with prefix-based notation.
  • Subnetting: Creates smaller logical networks for better routing and management.
  • Network ID and broadcast address: The first and last addresses in a subnet are not usable by hosts.
  • Routing protocols: RIP uses hop count, OSPF uses Dijkstra, and BGP works between autonomous systems.
Originally written on June 9, 2026 and last modified on September 6, 2026.

Leave a Reply

Your email address will not be published. Required fields are marked *