















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Unit-4_computer networks topics are given notes
Typology: Schemes and Mind Maps
1 / 23
This page cannot be seen from the preview
Don't miss anything!
Structure of IPv4: IPv4 Address Format : A.B.C.D o A : First byte (8 bits) o B : Second byte (8 bits) o C : Third byte (8 bits) o D : Fourth byte (8 bits)
Example of an IPv4 Address: 192.168.1.
192 : First byte (8 bits) 168 : Second byte (8 bits) 1 : Third byte (8 bits) 1 : Fourth byte (8 bits) Key Characteristics:
o Class A : 1.0.0.0 to 127.255.255.255 (large networks)
o Class B : 128.0.0.0 to 191.255.255.255 (medium-sized networks) o Class C : 192.0.0.0 to 223.255.255.255 (small networks) o Class D : 224.0.0.0 to 239.255.255.255 (multicast addresses) o Class E : 240.0.0.0 to 255.255.255.255 (reserved for future use)
o Private Addresses : Used within private networks (not routable over the internet). These are defined in specific ranges, such as: 10.0.0.0 to 10.255.255.255 (Class A) 172.16.0.0 to 172.31.255.255 (Class B) 192.168.0.0 to 192.168.255.255 (Class C) o Public Addresses : Routable on the internet and unique globally.
Special IPv4 Addresses:
192.168.1.0/ o 192.168.1.0 is the IP address, and o /24 represents the subnet mask (24 bits for the network portion, leaving 8 bits for the host portion). Notations IPv4 Address Notations
1. Dotted Decimal Notation (Standard Representation)
2. Binary Notation
Class Range of 1st Octet Address Range Default Subnet Mask Network/Host Bits Usage A^1 -^126 1.0.0.0 - 126.255.255. 255.0.0.0 (/8) 8/24 (Large networks) Large organizations B 128 - 191 128.0.0.0 - 191.255.255. 255.255.0. (/16) 16/16 (Medium networks) Midsized organizations C 192 - 223 192.0.0.0 - 223.255.255. 255.255.255. (/24) 24/8 (Small networks) Small businesses D 224 - 239 224.0.0.0 - 239.255.255.255 N/A^ Multicast^ Used for multicast E 240 - 255 240.0.0.0 - 255.255.255.255 N/A^ Experimental^ Reserved for future use Breakdown of Each Class Class A First bit always 0 (range: 00000001 to 01111111 → 1 - 126 in decimal). Supports: o 128 networks (2⁷). o 16.7 million hosts per network (2²⁴ - 2). Example: 10.0.0.0 - 10.255.255.255 (Private range). Class B First two bits always 10 (range: 10000000 to 10111111 → 128 - 191 in decimal). Supports: o 16,384 networks (2¹⁴). o 65,536 hosts per network (2¹⁶ - 2). Example: 172.16.0.0 - 172.31.255.255 (Private range). Class C First three bits always 110 (range: 11000000 to 11011111 → 192 - 223 in decimal). Supports: o 2,097,152 networks (2²¹). o 254 hosts per network (2⁸ - 2). Example: 192.168.0.0 - 192.168.255.255 (Private range). Class D (Multicast) First four bits always 1110 (range: 224 - 239 in decimal). Used for multicast group communications. Does not have a subnet mask. Example: 224.0.0.1 (Multicast for all hosts on a network).
Class E (Experimental) First four bits always 1111 (range: 240 - 255 in decimal). Reserved for experimental purposes. Not used for public networking. Diagram: Classful Addressing Structure markdown CopyEdit
| A | 1 - 126 | 8 bits | 24 bits | | B | 128 - 191 | 16 bits | 16 bits | | C | 192 - 223 | 24 bits | 8 bits | | D | 224 - 239 | Multicast | N/A | | E | 240 - 255 | Experimental | N/A |
Limitations of Classful Addressing
Classless addressing Classless Addressing (CIDR - Classless Inter-Domain Routing)
Key Concepts of Classless Addressing
1. CIDR Notation (/ Prefix Length) CIDR notation represents an IP address + subnet mask in a compact format. Instead of using fixed classful subnet masks (e.g., 255.255.255.0 for Class C), CIDR uses a prefix length /X, where X is the number of bits used for the network portion. Example: o 192.168.1.0/24 → 24 bits for the network, 8 bits for hosts (255.255.255.0). o 10.0.0.0/8 → 8 bits for the network, 24 bits for hosts (255.0.0.0). o 172.16.0.0/12 → 12 bits for the network, 20 bits for hosts (255.240.0.0). 2. Subnet Mask in Classless Addressing
CIDR Notation Subnet Mask Number of Hosts /8 255.0.0.0 (^) 16,777,
Subnet CIDR Notation IP Range Usable Hosts Subnet 2 192.168.2.0/24^ 192.168.2.0^ -^ 192.168.2.255^254 Subnet 3 192.168.3.0/25^ 192.168.3.0^ -^ 192.168.3.127^126
Summary: Classless vs. Classful Addressing Feature Classful Addressing Classless Addressing (CIDR) Fixed Classes Yes (A, B, C) No (Any size possible) Address Wastage High Low Subnet Flexibility No Yes (VLSM Supported) Routing Efficiency Poor (Large tables) Better (Hierarchical routing) IPv4 Conservation Poor High (Delays IPv4 exhaustion) Problems in VLSM and FLSM Problems in VLSM (Variable Length Subnet Masking) and FLSM (Fixed Length Subnet Masking)
🔴 Problems in FLSM
1. IP Address Wastage In FLSM, each subnet gets the same number of IP addresses , even if some subnets need fewer hosts. Example: o Suppose a network needs two subnets , one requiring 10 hosts and another needing 200 hosts. o If we use FLSM with /24 (256 addresses per subnet), both subnets will get 256 IPs. o Result: The first subnet wastes 246 IPs. 2. Inefficient Use of IPv4 Address Space IPv4 address space is limited. Assigning equal-sized blocks in FLSM leads to wasting many IPs , reducing the number of available subnets.
3. Not Scalable for Large Networks Large organizations need networks of different sizes. FLSM forces them to use the same size for all , making it difficult to expand efficiently. 4. Increases Routing Table Size Since each subnet has the same size , more routes need to be maintained, leading to larger routing tables in routers. This increases memory usage and slows down network performance.
🔴 Problems in VLSM
1. Complex Subnet Planning Unlike FLSM, where all subnets are the same size, VLSM requires careful planning to assign different subnet masks. Requires manual calculation to ensure no IP overlaps or wastage. 2. Risk of Overlapping Subnets If not planned properly, overlapping subnets can cause IP conflicts and disrupt communication. Example: If an administrator incorrectly assigns 192.168.1.0/25 and 192.168.1.128/26, the IPs might overlap , causing connectivity issues. 3. Routing Complexity VLSM increases the number of routes in a routing table. More subnets with different masks require routers to process more entries , increasing CPU and memory load. Example: o In FLSM: 192.168.1.0/24 is a single route. o In VLSM: Multiple subnets like 192.168.1.0/26, 192.168.1.64/27, 192.168.1.96/28, etc., create many routing table entries. 4. Not Fully Supported in Older Routing Protocols Older routing protocols like RIP (Routing Information Protocol) do not support VLSM. Only modern protocols like OSPF and BGP handle VLSM efficiently. 5. Increased Administrative Overhead Requires careful IP allocation and continuous monitoring to ensure there are no conflicts or wasted addresses. Administrators must maintain detailed subnet maps to avoid misconfigurations.
3️ ⃣ PAT (Port Address Translation) / NAT Overload (Many-to-One) Most common NAT type (used in home routers). Maps multiple private IPs to a single public IP using different port numbers. Example: o 192.168.1.10:1050 → 203.0.113.5: o 192.168.1.11:1051 → 203.0.113.5: Pros: Saves public IPs, highly efficient. Cons: Port tracking increases router workload. 🔹 NAT Diagram nginx CopyEdit Private Network (LAN) Public Internet
192.168.1.10 → 203.0.113.5:3000 → Internet 192.168.1.11 → 203.0.113.5:3001 → Internet 192.168.1.12 → 203.0.113.5:3002 → Internet 🔹 Advantages of NAT
🔹 Disadvantages of NAT
IPv6 Address Structure 🔹 What is IPv 6?
🔹 IPv 6 Address Format Length: 128 bits Written in Hexadecimal (Base-16) notation Separated by colons (:) Divided into 8 groups of 16-bit blocks 🔹 Example of an IPv 6 Address makefile CopyEdit
2001:0db8:85a3:0000:0000:8a2e:0370:
🔹 IPv 6 Address Breakdown Part Example Description Global Prefix 2001:0db8:85a3::^ Identifies the network (similar to IPv4 network address) Subnet ID^0000 Defines a subnet within the network Interface ID 8a2e:0370:7334^ Identifies a unique device in the subnet (like an IPv4 host ID) Global Prefix (First 48 Bits): Assigned by an ISP or authority (like a company network). Subnet ID (Next 16 Bits): Defines subnet divisions within an organization. Interface ID (Last 64 Bits): Uniquely identifies a device in a network (can be auto-generated using MAC address). 🔹 Types of IPv 6 Addresses 1️ ⃣ Unicast Addresses (One-to-One Communication)
Global Unicast (2000::/3) – Public IPv6 addresses used on the internet. Link-Local (FE80::/10) – Auto-assigned addresses for local communication (cannot be routed). Unique Local (FC00::/7) – Private addresses similar to IPv4's 192.168.x.x. 2️ ⃣ Multicast Addresses (One-to-Many Communication)
Example: FF00::/8 (for multicast traffic). 3️ ⃣ Anycast Addresses (One-to-Nearest Communication)
Used in CDNs (Content Delivery Networks) and Load Balancing. 🔹 IPv 6 Address Notation Rules
1️ ⃣ Removing Leading Zeros Full: 2001:0db8:0000:0000:0000:ff00:0042: Compressed: 2001:db8:0:0:0:ff00:42: 2️ ⃣ Using Double Colons (::) for Consecutive Zeros Full: 2001:0db8:0000:0000:0000:0000:0000:
Field Size (bits) Description Flags 3 Controls fragmentation Fragment Offset 13 Helps reassemble fragmented packets Time to Live (TTL) 8 Limits packet lifetime (prevents loops) Protocol 8 Defines next-layer protocol (TCP = 6, UDP = 17) Header Checksum 16 Error-checking for header Source IP Address 32 IPv4 sender address Destination IP Address 32 IPv4 recipient address Options (Optional) Variable Extra settings (e.g., security, timestamps) 🔴 Problems with IPv 4 Header
🔹 IPv 6 Header Format Size: Fixed 40 bytes (simpler than IPv4) Efficiency: Faster processing due to fewer fields Fragmentation: Only sender fragments packets, routers do not Security: IPSec mandatory IPv6 Header Structure (40 Bytes) Field Size (bits) Description Version 4 Set to 6 for IPv Traffic Class 8 Similar to IPv4 TOS (QoS handling) Flow Label 20 Helps routers handle traffic efficiently Payload Length 16 Length of data (excluding header) Next Header 8 Defines next protocol (like IPv4’s Protocol field) Hop Limit 8 Same as IPv4 TTL (prevents infinite loops) Source IP Address 128 IPv6 sender address Destination IP Address 128 IPv6 recipient address
Advantages of IPv6 Header
🔹 IPv 4 vs. IPv 6 Header Comparison Feature IPv4 Header IPv6 Header Header Size Variable (20–60 bytes) Fixed (40 bytes) IP Address Size 32 - bit 128 - bit Fragmentation Routers & sender Only sender Checksum Yes No (reduces overhead) Security (IPSec) Optional Mandatory Broadcasting Yes No (uses multicast) Next Header Handling Protocol Field Next Header Field Routing Efficiency Less efficient More efficient Static Routing What is Static Routing? A manually configured routing method where the administrator manually sets up routes in the routing table. The router forwards packets based on predefined paths set by the network administrator. Characteristics of Static Routing
Example of Static Route Configuration (Cisco Router) bash CopyEdit Router(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.
🔹 Characteristics of Dynamic Routing
🔹 Types of Dynamic Routing Protocols Type Protocols Description Distance Vector RIP, EIGRP Selects paths based on hop count Link-State OSPF, IS-IS Builds a complete network map before choosing the best route Path-Vector BGP Used in the Internet for inter-AS routing 🔹 Example of Dynamic Routing Configuration (Cisco Router - OSPF) bash CopyEdit Router(config)# router ospf 1 Router(config-router)# network 192.168.1.0 0.0.0.255 area 0
🔹 Advantages of Dynamic Routing
🔹 Disadvantages of Dynamic Routing
🔹 Static vs. Dynamic Routing: Comparison Table Feature Static Routing Dynamic Routing Configuration Manual Automatic Scalability Poor (Good for small networks) High (Handles large networks) Adaptability Does not adapt Adapts to changes automatically Security More secure (No external updates) Less secure (Can be attacked) Administrative Overhead High (Manual maintenance) Low (Auto-updates)
Feature Static Routing Dynamic Routing Failure Recovery No automatic recovery Auto rerouting on failure Resource Usage Low High (Uses CPU, memory, bandwidth) Examples Used in small, simple networks Used in large, complex networks Distance Vector Routing Protocol 🔹 What is Distance Vector Routing?
🔹 How Does Distance Vector Routing Work?
🔹 Example of Distance Vector Routing Protocols Protocol Hop Count Limit Update Interval Used in RIP (Routing Information Protocol)
unreachable) Every 30 seconds Small networks IGRP (Interior Gateway Routing Protocol) 255 Every 90 seconds Cisco proprietary EIGRP (Enhanced Interior Gateway Routing Protocol) 255 Partial updates Large networks
🔹 1. Routing Information Protocol (RIP) 🔹 What is RIP? RIP is a Distance Vector Routing Protocol used in small to medium-sized networks. It selects the best route based on hop count , with a maximum limit of 15 hops (16 is considered unreachable). It updates its routing table every 30 seconds , which can cause slow convergence. 🔹 How RIP Works?
🔹 Disadvantages of RIP
🔹 Example of RIP Configuration (Cisco Router) bash CopyEdit Router(config)# router rip Router(config-router)# version 2 Router(config-router)# network 192.168.1. Router(config-router)# network 10.0.0. 0 Router(config-router)# exit 🔹 2. Link-State Routing Protocols (OSPF & IS-IS) 🔹 What is Link-State Routing?
Unlike RIP, which relies on hop count , Link-State Routing builds a complete network map using Link-State Advertisements (LSAs). Each router independently calculates the best route using the Dijkstra Algorithm. Link-State protocols converge faster and scale better for large networks. 🔹 Key Link-State Protocols Protocol Use Case OSPF (Open Shortest Path First) Used in enterprise networks IS-IS (Intermediate System to Intermediate System) Used by ISPs and large-scale networks Open Shortest Path First (OSPF) Uses Cost as a Metric (based on bandwidth, not hop count). Hierarchical Design with Areas (e.g., Area 0 as the Backbone). Supports VLSM & CIDR for efficient IP allocation. Fast Convergence with minimal bandwidth usage. Sends only updates when changes occur (instead of periodic updates like RIP). 🔹 OSPF Advantages
🔹 OSPF Disadvantages
🔹 OSPF Configuration (Cisco Router) bash CopyEdit Router(config)# router ospf 1 Router(config-router)# network 192.168.1.0 0.0.0.255 area 0 Router(config-router)# exit 🔹 IS-IS (Intermediate System to Intermediate System) Similar to OSPF , but used more in large service provider networks. Uses a two-level hierarchy (Level-1 for internal routing, Level-2 for inter-domain routing). Supports both IPv4 and IPv6 efficiently.