Internet Protocol (IP) Fundamentals
Overview
Internet Protocol (IP) is the principal communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking and essentially establishes the Internet.
Key Characteristics
- Connectionless protocol (no prior connection establishment)
- Best-effort delivery (no guarantee of delivery)
- Media independent (works over any underlying technology)
- Logical addressing (IP addresses identify hosts)
IPv4 vs IPv6
IPv4 Packet Structure
Version (4 bits)
Indicates the IP version (4 for IPv4, 6 for IPv6). Enables routers to process packets correctly.
TTL (8 bits)
Time To Live. Decremented at each hop. Prevents infinite routing loops. When 0, packet is discarded.
Protocol (8 bits)
Identifies the next-level protocol (TCP=6, UDP=17, ICMP=1). Determines payload handling.
IP Addressing & Subnetting
Classful Addressing (Legacy)
| Class | Range | Default Mask | Networks |
|---|---|---|---|
| A | 1.0.0.0 - 126.0.0.0 | /8 | 128 |
| B | 128.0.0.0 - 191.255.0.0 | /16 | 16,384 |
| C | 192.0.0.0 - 223.255.255.0 | /24 | 2,097,152 |
CIDR (Classless Inter-Domain Routing)
Replaced classful addressing to improve address space utilization and routing scalability.
Interactive Subnetting
Visual Subnet Map
Laboratory Procedure
Experiment 1: IP Address Analysis
Objective: Understand IPv4 address structure and identify address classes.
- Open the Binary/Decimal Converter simulation
- Enter the IP address:
172.16.0.1 - Convert to binary and record the first 4 bits of the first octet
- Identify the address class (A, B, or C) based on the binary prefix:
- Class A: 0xxx (0-127)
- Class B: 10xx (128-191)
- Class C: 110x (192-223)
- Repeat for addresses:
10.0.0.1,192.168.1.1,223.255.255.1
Experiment 2: Subnetting and CIDR
Objective: Calculate subnet parameters and understand CIDR notation.
- Navigate to the Subnetting Calculator
- Enter network address:
192.168.10.0 - Set CIDR to
/26(255.255.255.192) - Record the following parameters:
- Number of usable hosts per subnet
- Number of possible subnets
- Broadcast address
- Host range
- Change CIDR to
/30and observe the change in usable hosts - Explain why /30 is commonly used for point-to-point links
Experiment 3: IP Packet Structure Analysis
Objective: Analyze IPv4 header fields and understand packet encapsulation.
- Open the Packet Analyzer simulation
- Build a packet with:
- Source:
192.168.1.5 - Destination:
192.168.1.10 - TTL:
64 - Protocol:
TCP (6)
- Source:
- Observe the header fields and their binary representation
- Calculate the header checksum (observe the field)
- Modify the TTL value and observe how it affects the header
- Change protocol to UDP and note the protocol field change
Experiment 4: Routing Logic
Objective: Understand longest prefix match and routing decisions.
- Launch the Routing Simulation
- Examine the routing table entries
- Test the following destination addresses and record the next hop:
192.168.1.50(local network)10.0.5.20(remote network)8.8.8.8(internet/default route)
- Explain why the router chose specific paths
- Describe the concept of "longest prefix match" using your results
Experiment 5: Advanced Subnetting (VLSM)
Objective: Design a subnetting scheme using Variable Length Subnet Masking.
- Given network:
172.16.0.0/16 - Requirements:
- Subnet A: 500 hosts
- Subnet B: 200 hosts
- Subnet C: 100 hosts
- 3 point-to-point links (2 hosts each)
- Calculate the required CIDR for each subnet
- Use the calculator to verify your calculations
- Create a subnet allocation table showing network address, mask, and range for each
Safety & Best Practices
- Double-check all binary-to-decimal conversions
- Remember that usable hosts = 2^(host bits) - 2 (network and broadcast addresses reserved)
- When subnetting, always account for future growth
- Document all calculations step-by-step for verification
Laboratory Report Guidelines
Report Structure
Cover Page
Experiment title, course name, student name, ID, date, instructor name
Objectives
Clear statement of what the experiment aims to demonstrate
Theory
Brief summary of IP protocol, addressing, and subnetting concepts
Equipment/Tools
Virtual laboratory software, calculator, simulation parameters
Content Requirements
Procedure
Step-by-step description of experiments performed
Observations & Data
All calculated values, screenshots of simulations, binary conversions
Analysis
Interpretation of results, verification of calculations, error analysis
Conclusion
Summary of findings, key learnings, practical applications
Data Recording Tables
Include properly formatted tables for all experiments. Example format:
| Experiment | Input Parameters | Calculated Result | Simulated Result | Error % |
|---|---|---|---|---|
| Subnetting /26 | 192.168.1.0/26 | 62 hosts | 62 hosts | 0% |
| Binary Conversion | 192.168.1.1 | 11000000... | 11000000... | 0% |
Common Mistakes to Avoid
- Forgetting to subtract 2 for network and broadcast addresses
- Confusing CIDR notation with subnet mask notation
- Incorrect binary-to-decimal conversion (check bit weights)
- Ignoring the header length field (IHL) in packet analysis
- Not showing step-by-step calculations
- Missing units (bits vs bytes) in final answers