IP Addressing and Routing Protocols
---
### Question 1: Fixed Length and Variable Length Subnet Masking (10 Marks)
#### 1. Fixed Length Subnet Masking (FLSM)
Definition:
FLSM is a subnetting technique where all subnets are of equal size. Each subnet has the same number o
Key Features:
- Simple and uniform
- Easy to implement and manage
- May lead to wastage of IP addresses
Example:
Class C Network: [Link]/24
Requirement: 4 equal subnets
- Bits borrowed: 2 (2^2 = 4)
- New subnet mask: /26 = [Link]
| Subnet | Network Address | Host Range | Broadcast Address |
|--------|---------------------|------------------------|-------------------|
|1 | [Link]/26 | [Link] - 62 | [Link] |
|2 | [Link]/26 | [Link] - 126 | [Link] |
|3 | [Link]/26 | [Link] - 190 | [Link] |
|4 | [Link]/26 | [Link] - 254 | [Link] |
Diagram:
[Link]/24
■■■ Subnet 1: [Link]/26
■■■ Subnet 2: [Link]/26
■■■ Subnet 3: [Link]/26
■■■ Subnet 4: [Link]/26
#### 2. Variable Length Subnet Masking (VLSM)
Definition:
VLSM allows subnetting a network into subnets of different sizes based on host requirements.
Key Features:
- Efficient IP address utilization
- Complex to design and manage
Example:
Network: [Link]/24
Requirements:
- Subnet A: 100 hosts
- Subnet B: 50 hosts
- Subnet C: 25 hosts
- Subnet D: 10 hosts
| Subnet | Network Address | Host Range | Broadcast Address |
|--------|---------------------|------------------------|-------------------|
|A | [Link]/25 | [Link] - 126 | [Link] |
|B | [Link]/26 | [Link] - 190 | [Link] |
|C | [Link]/27 | [Link] - 222 | [Link] |
|D | [Link]/28 | [Link] - 238 | [Link] |
Diagram:
[Link]/24
■■■ Subnet A: [Link]/25 (100 hosts)
■■■ Subnet B: [Link]/26 (50 hosts)
■■■ Subnet C: [Link]/27 (25 hosts)
■■■ Subnet D: [Link]/28 (10 hosts)
---
### Question 2: IPv4 and IPv6 Protocols (20 Marks)
#### 1. Introduction to Network Layer
The Network Layer (Layer 3 of the OSI model) handles logical addressing, routing, and forwarding of pac
#### 2. IPv4 Protocol
Key Features:
- 32-bit address
- ~4.3 billion unique addresses
- Dotted decimal notation (e.g., [Link])
- Uses ARP and broadcasting
- Header size: 20–60 bytes
IPv4 Header Diagram:
+--------+--------+--------+--------+
| Version| IHL |Type of | Length |
+--------+--------+--------+--------+
| Identification | Flags | Offset |
+--------+--------+--------+--------+
| TTL | Protocol | Header Checksum |
+--------+--------+--------+--------+
| Source IP Address |
| Destination IP Address |
+----------------------------------+
#### 3. IPv6 Protocol
Key Features:
- 128-bit address
- ~3.4 x 10^38 addresses
- Hexadecimal format (e.g., [Link])
- No broadcasting; uses multicast
- Header size: Fixed 40 bytes
- IPSec support mandatory
IPv6 Header Diagram:
+----------------------------------------+
| Version | Traffic Class | Flow Label |
+----------------------------------------+
| Payload Length | Next Header | Hop Limit|
+----------------------------------------+
| Source IP Address (128 bits) |
+----------------------------------------+
| Destination IP Address (128 bits) |
+----------------------------------------+
#### 4. Differences Between IPv4 and IPv6
| Feature | IPv4 | IPv6 |
|--------------------|------------------------------|-------------------------------|
| Address Length | 32 bits | 128 bits |
| Address Format | Decimal | Hexadecimal |
| NAT | Required | Not required |
| Broadcast Support | Yes | No (uses multicast) |
| Header Size | 20-60 bytes (variable) | 40 bytes (fixed) |
| Configuration | Manual or DHCP | Auto-configuration supported |
| Security | Optional | Built-in (IPSec mandatory) |
#### 5. Address Example
IPv4: [Link]
IPv6: [Link] or compressed: [Link]
#### 6. Summary
IPv6 was introduced to overcome IPv4 limitations. It enables scalability, better routing efficiency, and inte
---
### Question 3: Routing Protocols (15 Marks)
#### 1. Introduction to Routing Protocols
Routing protocols determine the best path for forwarding packets across interconnected networks.
#### 2. Types of Routing
- Static Routing: Manually set by admin
- Dynamic Routing: Automatically adapts using routing protocols
- Default Routing: Routes packets to a default gateway when no specific path is known
#### 3. Types of Routing Protocols
| Category | Protocols |
|-----------------------|-----------------------------|
| Distance Vector | RIP, IGRP |
| Link State | OSPF, IS-IS |
| Hybrid | EIGRP |
| Exterior Gateway | BGP |
#### 4. Distance Vector Protocols
- Share routing tables with neighbors
- Use hop count as a metric
- Example: RIP (max hop count = 15)
Diagram:
R1 ----- R2 ----- R3
| | |
A B C
Each router only knows the distance (hop count) to destinations.
#### 5. Link State Protocols
- Each router has a full map of the network
- Uses Dijkstra’s Algorithm to find best paths
- Example: OSPF
Diagram:
R2
/ \
R1 R3
\ /
R4
Routers share Link State Advertisements (LSAs) with all others.
#### 6. Hybrid Protocols
- Combine features of both distance vector and link state
- Example: EIGRP (Cisco proprietary)
#### 7. Interior vs Exterior Gateway Protocols
| Type | Use Case | Example |
|---------|-------------------------------|----------------|
| IGP | Within an AS (organization) | RIP, OSPF |
| EGP | Between AS (ISPs) | BGP |
BGP Diagram:
[AS1] ---- BGP ---- [AS2]
| |
[Router A] [Router B]
#### 8. Conclusion
Routing protocols ensure reliable and efficient path selection. Proper protocol choice depends on network
---
End of Document