IP Networking – Required Knowledge

In-depth understanding of IP addressing, subnetting, CIDR, and how IP packets are constructed, routed, and delivered.

IP Networking is a fundamental area in network design and management. Here’s an in-depth look at key concepts you should understand:

1. IP Addressing

IP Address:

  • Definition: An IP address is a unique identifier assigned to each device connected to a network. It allows devices to communicate with each other over IP networks.
  • Versions:
  • IPv4: Uses 32-bit addresses, typically written in dotted decimal format (e.g., 192.168.1.1). It supports approximately 4.3 billion addresses.
  • IPv6: Uses 128-bit addresses, written in hexadecimal format (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). It supports a vastly larger address space.

Structure of IPv4 Address:

  • Network Portion: Identifies the specific network.
  • Host Portion: Identifies the specific device within the network.
  • Example: In the address 192.168.1.10, if the subnet mask is 255.255.255.0, 192.168.1 is the network portion, and 10 is the host portion.

2. Subnetting

Subnetting:

  • Definition: The process of dividing a larger IP network into smaller, manageable sub-networks (subnets). This improves network performance and security.
  • Subnet Mask: Defines which portion of the IP address is the network and which part is the host.
    • Example: A subnet mask of 255.255.255.0 (or /24 in CIDR notation) means that the first 24 bits of the IP address represent the network, and the remaining 8 bits are used for host addresses within that network.

Calculating Subnets:

  1. Determine Network Size: Decide how many subnets are needed and the size of each subnet.
  2. Subnet Mask Calculation: Adjust the subnet mask to allocate sufficient bits for subnetting and host addresses.
    • Example: To create 4 subnets from a 192.168.1.0/24 network, you would use a subnet mask of 255.255.255.192 (/26), creating 4 subnets with 62 usable addresses each.

3. CIDR (Classless Inter-Domain Routing)

CIDR:

  • Definition: A method for allocating IP addresses and routing IP packets more efficiently than traditional class-based addressing. It allows for variable-length subnet masking.
  • Notation: Uses a notation such as 192.168.1.0/24, where /24 denotes the number of bits used for the network portion.
  • Benefits: Reduces the size of routing tables and allows for more flexible and efficient IP address allocation.

CIDR Examples:

  • CIDR Notation: 10.0.0.0/8 (provides 16,777,216 IP addresses).
  • Subnet Example: 172.16.0.0/12 (provides 1,048,576 IP addresses).

4. IP Packet Construction

IP Packet:

  • Header: Contains metadata necessary for routing and delivery.
    • IPv4 Header: Includes fields such as Source IP Address, Destination IP Address, Time to Live (TTL), Protocol, and Checksum.
    • IPv6 Header: Simplifies some fields and adds new ones like Flow Label and Next Header.

Packet Structure:

  1. Header: Contains essential routing and addressing information.
  2. Payload: The actual data being transmitted.

Example of IPv4 Header Fields:

  • Version: Specifies the IP version (IPv4 or IPv6).
  • Header Length: Length of the header.
  • TTL (Time to Live): Prevents packets from looping indefinitely by limiting the packet’s lifespan.
  • Protocol: Indicates the higher-layer protocol (e.g., TCP, UDP).

5. IP Routing

Routing:

  • Definition: The process of selecting paths in a network along which to send network traffic.
  • Routing Table: Contains information about available routes and is used by routers to determine the best path for forwarding packets.

Routing Protocols:

  • Static Routing: Manually configured routes that do not change unless manually updated.
  • Dynamic Routing: Uses routing protocols like OSPF (Open Shortest Path First), BGP (Border Gateway Protocol), and EIGRP (Enhanced Interior Gateway Routing Protocol) to automatically update routing tables.

Packet Delivery:

  1. Routing Decision: Routers use their routing tables to determine the best path for the packet based on the destination IP address.
  2. Forwarding: The packet is sent to the next hop router or final destination.

Example:

  • Routing Table Entry: 192.168.1.0/24 via 192.168.0.1 indicates that packets destined for the 192.168.1.0/24 network should be forwarded to the next hop with IP address 192.168.0.1.

Summary

  • IP Addressing: Understand IPv4 and IPv6 addressing, including how addresses are structured and used.
  • Subnetting: Learn how to divide networks into subnets and calculate subnet masks.
  • CIDR: Familiarize yourself with CIDR notation and its advantages over traditional class-based addressing.
  • IP Packet Construction: Know how IP packets are structured and the purpose of various header fields.
  • IP Routing: Understand routing principles, routing tables, and the difference between static and dynamic routing.