# REVIEW OF TRADITIONAL NETWORKS
A **computer network** is a group of computers and devices connected to share data and resources.
## Main Types
1. **Peer-to-Peer:** Each computer acts as both client and server; used in small setups.
2. **Client-Server:** A central server provides data/services to clients; used in organizations.
## Basic Components
- **Nodes:** Computers, printers, routers.
- **Links:** Cables or wireless connections.
- **Devices:** Hubs, switches, routers.
- **Protocols:** Rules for communication (e.g., TCP/IP).
## Features
- Physical wired connections.
- Manual configuration.
- Small-scale and low cost.
## Advantages
- Simple design.
- Easy to manage in small areas.
## Limitations
- Difficult to expand.
- Limited security and fault tolerance.
**Summary:**
Traditional networks laid the base for modern LAN, MAN, and WAN systems by introducing communication and resource sharing concepts.
# LOCAL AREA NETWORK (LAN)
A **LAN** is a network that connects computers and devices within a small geographical area such as a home, school, or office building.
## Characteristics
- Covers area up to few kilometers.
- High data transfer speed (10 Mbps to 10 Gbps).
- Owned and managed by a single organization.
- Uses wired (Ethernet) or wireless (Wi-Fi) connections.
## Components
- **Switches & Hubs:** Connect multiple computers.
- **Router:** Connects LAN to external networks.
- **NIC (Network Interface Card):** Connects each device to the LAN.
## Advantages
- High speed and reliability.
- Easy file and printer sharing.
- Centralized data management.
## Disadvantages
- Limited coverage area.
- Setup cost can be high initially.
**Example:**
College computer lab connected through Ethernet cables.
# METROPOLITAN AREA NETWORK (MAN)
A **MAN** is a network that connects multiple LANs within a large city or campus.
It acts as a bridge between LAN and WAN.
## Characteristics
- Covers a city or large campus (10–50 km range).
- Data transfer speed is moderate to high.
- Owned by a group of organizations or service providers.
- Uses optical fiber or wireless links.
## Components
- Routers, switches, and transmission towers.
- Backbone connections made with high-speed cables.
## Advantages
- Connects multiple LANs efficiently.
- High-speed communication across city areas.
- Useful for universities and government networks.
## Disadvantages
- More expensive than LAN.
- Complex management and maintenance.
**Example:**
Connecting all branches of a city’s university through a fiber backbone network.
# WIDE AREA NETWORK (WAN)
A **WAN** connects computers and LANs across large geographical areas such as countries or continents using public or private
communication links.
## Characteristics
- Covers thousands of kilometers.
- Data transmission through satellites, telephone lines, or optical fibers.
- Owned by multiple organizations or ISPs.
- Slower speed compared to LAN/MAN due to long-distance communication.
## Components
- Routers and gateways for network connection.
- Communication links (fiber, microwave, satellite).
- WAN service providers (like BSNL, Airtel).
## Advantages
- Enables global communication and data sharing.
- Connects branch offices and remote locations.
- Supports centralized data access.
## Disadvantages
- High installation and maintenance cost.
- More prone to delays and security issues.
**Example:**
The Internet is the largest example of a WAN.
# INTRANET
An **Intranet** is a private network that uses Internet technologies within an organization for internal communication and data sharing.
## Characteristics
- Accessible only to employees or authorized users.
- Uses web browsers and Internet protocols (HTTP, TCP/IP).
- Provides company information, notices, and internal communication.
- Protected by firewalls to prevent outside access.
## Components
- Web servers and databases.
- Internal websites and portals.
- Authentication systems for security.
## Advantages
- Improves internal communication.
- Easy document sharing and collaboration.
- Increases efficiency and saves time.
## Disadvantages
- Accessible only within organization.
- Needs proper maintenance and updates.
**Example:**
A company’s employee portal for attendance, salary, and announcements.
# INTERNET
The **Internet** is a global network of interconnected computers that communicate using standard protocols like TCP/IP.
It allows users worldwide to share information and access online services.
## Characteristics
- Public and worldwide network.
- Uses client-server architecture.
- Provides services like email, web browsing, file transfer, and online communication.
## Components
- **Web Servers:** Host websites and applications.
- **Routers & Gateways:** Direct network traffic.
- **Protocols:** HTTP, FTP, SMTP, DNS, etc.
## Advantages
- Global connectivity and information access.
- Supports communication through email, chat, and video calls.
- E-commerce, e-learning, and entertainment.
## Disadvantages
- Security and privacy risks.
- Virus and cyberattack threats.
- Misuse of information.
**Example:**
Accessing websites, online banking, and social media through the Internet.
# INTERCONNECTIVITY DEVICES
These are hardware devices that connect different computers or networks to enable communication and data sharing.
## 1. HUB
- Basic device that connects multiple computers in a LAN.
- Works at the **Physical Layer (Layer 1)**.
- Broadcasts data to all devices (less secure).
## 2. SWITCH
- Connects multiple devices but sends data only to the intended device.
- Works at the **Data Link Layer (Layer 2)**.
- Improves speed and security.
## 3. BRIDGE
- Connects two LAN segments and filters network traffic.
- Works at the **Data Link Layer**.
- Reduces network congestion.
## 4. ROUTER
- Connects different networks (e.g., LAN to WAN).
- Works at the **Network Layer (Layer 3)**.
- Uses IP addresses to forward data packets.
## 5. GATEWAY
- Connects networks using different protocols.
- Works at **all layers**.
- Converts data formats between networks.
**Summary:**
Interconnectivity devices ensure smooth communication, data transfer, and efficient routing between networks.
# TCP/IP PROTOCOL ARCHITECTURE
**TCP/IP (Transmission Control Protocol / Internet Protocol)** is the standard communication model used for data transmission over the
Internet.
## Layers of TCP/IP Model
1. **Application Layer**
- Provides user services like email, file transfer, and web access.
- Protocols: HTTP, FTP, SMTP, DNS.
2. **Transport Layer**
- Ensures reliable data delivery between devices.
- Protocols: TCP (connection-oriented), UDP (connectionless).
3. **Internet Layer**
- Responsible for logical addressing and routing.
- Main protocol: IP (Internet Protocol).
4. **Network Access Layer**
- Handles physical transmission of data.
- Deals with hardware, drivers, and network interfaces.
## Features
- Open and widely used standard.
- Supports interoperability between different networks.
- Used for both LAN and WAN communication.
**Example:**
When you open a website, TCP ensures proper data delivery, and IP handles addressing and routing.
# ARP / RARP
## 1. ARP (Address Resolution Protocol)
- **Purpose:** Converts an **IP address** into a **MAC address**.
- **Working:**
- When a device wants to communicate, it broadcasts an ARP request.
- The device with the matching IP responds with its MAC address.
- **Layer:** Data Link Layer (Layer 2) and Network Layer (Layer 3).
- **Example:**
If computer A knows IP of computer B but not its MAC, ARP finds it.
## 2. RARP (Reverse Address Resolution Protocol)
- **Purpose:** Converts a **MAC address** into an **IP address**.
- **Used by:** Diskless systems that don’t know their IP.
- **Working:** The device sends its MAC to RARP server, which replies with its IP.
- **Layer:** Network Layer.
## Difference
| Feature | ARP | RARP |
|----------|-----|------|
| Converts | IP → MAC | MAC → IP |
| Use | Data transmission | Booting diskless systems |
**Summary:**
ARP and RARP help in mapping between IP and MAC addresses, making communication possible in a network.
# IP ADDRESSING
An **IP address (Internet Protocol Address)** is a unique number assigned to every device on a network to identify it and enable
communication.
## Types of IP Address
1. **IPv4 (32-bit):**
- Format: Four numbers separated by dots (e.g., 192.168.1.1)
- Provides around 4.3 billion addresses.
2. **IPv6 (128-bit):**
- Format: Hexadecimal numbers separated by colons (e.g., 2001:0db8::1)
- Provides a much larger address space.
## IPv4 Address Classes
| Class | Range | Use |
|-------|--------|-----|
| A | 1.0.0.0 – 126.0.0.0 | Very large networks |
| B | 128.0.0.0 – 191.255.0.0 | Medium networks |
| C | 192.0.0.0 – 223.255.255.0 | Small networks |
| D | 224.0.0.0 – 239.255.255.255 | Multicasting |
| E | 240.0.0.0 – 255.255.255.255 | Experimental |
## Types of Address
- **Unicast:** For one-to-one communication.
- **Broadcast:** For one-to-all communication.
- **Multicast:** For one-to-group communication.
**Summary:**
IP addressing uniquely identifies each device in a network, allowing accurate routing and communication between systems.
# IP DATAGRAM FORMAT AND ITS DELIVERY
An **IP Datagram** is the basic unit of data transmitted across an IP network. It carries information from the source to the destination
using the IP protocol.
## Structure of IP Datagram
1. **Header (20–60 bytes):** Contains control information.
2. **Data:** The actual message or payload.
### Important Fields in IP Header:
- **Version:** Indicates IP version (IPv4 or IPv6).
- **Header Length:** Size of the header.
- **Total Length:** Total size of datagram (header + data).
- **Identification, Flags, Fragment Offset:** Used for fragmentation and reassembly.
- **Time to Live (TTL):** Limits the number of hops to prevent looping.
- **Protocol:** Defines upper-layer protocol (TCP, UDP, etc.).
- **Source Address:** IP address of sender.
- **Destination Address:** IP address of receiver.
- **Checksum:** Error checking for header.
## IP Datagram Delivery
- Data moves **hop by hop** from one router to another.
- Each router checks the destination IP address.
- Routers forward datagram to the next best path until it reaches the destination.
**Summary:**
An IP datagram carries both addressing and data information, enabling proper delivery of packets across interconnected networks.
# ROUTING TABLE FORMAT
A **routing table** is a database stored in a router that holds information about different network paths and how to reach them.
## Purpose
Routers use routing tables to determine the best path for forwarding data packets toward their destination.
## Basic Fields in a Routing Table
1. **Destination Network:**
- IP address of the target network or host.
2. **Subnet Mask:**
- Defines the network portion of the IP address.
3. **Next Hop / Gateway:**
- IP address of the next router to which the packet should be sent.
4. **Interface:**
- Specifies which port or network interface to use.
5. **Metric / Cost:**
- Indicates the efficiency or distance of the route (lower value = better route).
6. **Route Source:**
- How the route was learned (e.g., static or dynamic routing protocol).
## Example
| Destination | Subnet Mask | Next Hop | Interface | Metric |
|--------------|--------------|-----------|------------|--------|
| 192.168.1.0 | 255.255.255.0 | 192.168.2.1 | eth0 | 1 |
**Summary:**
The routing table helps routers make efficient path decisions, ensuring data packets reach their correct destination quickly.
# ICMP MESSAGES
**ICMP (Internet Control Message Protocol)** is used by network devices (like routers) to send control and error messages about network
communication.
## Purpose
- To report errors and provide feedback about IP packet processing.
- Helps diagnose network problems.
## Types of ICMP Messages
1. **Error Reporting Messages:**
- **Destination Unreachable:** Target host or network can’t be reached.
- **Time Exceeded:** Packet’s TTL (Time to Live) expired.
- **Parameter Problem:** Header field is invalid.
- **Source Quench:** Congestion detected (obsolete now).
2. **Query Messages:**
- **Echo Request & Echo Reply:** Used by the *ping* command to check connectivity.
- **Timestamp Request/Reply:** Used for time synchronization.
## Features
- Works at the **Network Layer (Layer 3)**.
- Used by administrators to monitor and troubleshoot networks.
**Example:**
When you use the “ping” command, ICMP sends echo request and reply messages to test connectivity.
# SUBNETTING
**Subnetting** is the process of dividing a large network into smaller, manageable parts called **subnets**.
It helps in efficient use of IP addresses and improves network management.
## Purpose
- To reduce network traffic.
- To improve security and performance.
- To organize IP addresses in large networks.
## How It Works
- An IP address is divided into **Network ID** and **Host ID**.
- Subnetting borrows bits from the host part to create **subnet IDs**.
- Each subnet functions as an independent network.
## Example
Class C Network: 192.168.1.0
Default Mask: 255.255.255.0
If we borrow 2 bits → New Mask: 255.255.255.192
→ Creates 4 subnets with 62 hosts each.
## Advantages
- Better utilization of IP addresses.
- Simplifies troubleshooting.
- Enhances network security and control.
**Summary:**
Subnetting divides a single network into smaller segments, improving efficiency and manageability in large organizations.
# SUPERNETTING AND CIDR
## 1. Supernetting
**Supernetting** is the opposite of subnetting.
It combines multiple smaller networks into a **larger network** to reduce the number of routing entries.
### Example:
Four Class C networks:
- 192.168.1.0
- 192.168.2.0
- 192.168.3.0
- 192.168.4.0
can be combined into one supernet: **192.168.0.0/22**
### Advantages:
- Reduces routing table size.
- Increases routing efficiency.
- Used by ISPs for address aggregation.
---
## 2. CIDR (Classless Inter-Domain Routing)
**CIDR** removes the concept of fixed IP classes (A, B, C).
It uses a **slash notation (/n)** to define how many bits are used for the network part.
### Example:
192.168.1.0/24 → 24 bits for network, 8 bits for host.
### Benefits:
- Better utilization of IP address space.
- Simplifies routing.
- Supports variable-length subnet masks (VLSM).
**Summary:**
Supernetting merges networks to simplify routing, while CIDR allows flexible, classless IP address allocation.
# DOMAIN NAME SYSTEM (DNS)
**DNS (Domain Name System)** is a system that translates **domain names** (like www.google.com) into **IP addresses** (like
142.250.190.78).
It acts like the phonebook of the Internet.
## Purpose
- Makes it easier for users to access websites using names instead of numeric IPs.
- Provides a hierarchical naming structure.
## Working Process
1. User enters a domain name in the browser.
2. Browser sends a DNS query to the DNS server.
3. The server returns the corresponding IP address.
4. Browser connects to the web server using that IP.
## DNS Structure
- **Root Level:** “.” at the end of every domain.
- **Top-Level Domains (TLDs):** .com, .org, .in, .edu, etc.
- **Second-Level Domains:** Organization or company name.
- **Subdomains:** Divisions within the main domain (e.g., mail.google.com).
## Advantages
- Simplifies Internet usage.
- Provides flexibility and scalability.
**Example:**
When you type *www.youtube.com*, DNS converts it into its IP address automatically.
# NETWORK ADDRESS TRANSLATION (NAT)
**NAT** is a technique used in routers or firewalls to translate **private IP addresses** into **public IP addresses** and vice versa.
It allows multiple devices in a local network to access the Internet using a single public IP.
## Purpose
- Conserves the number of public IP addresses.
- Hides internal network structure for security.
- Enables private networks to connect to the Internet.
## Types of NAT
1. **Static NAT:**
- One private IP mapped to one public IP.
- Used for hosting web servers.
2. **Dynamic NAT:**
- Private IPs mapped to available public IPs from a pool.
- Mapping changes dynamically.
3. **PAT (Port Address Translation) / Overloading:**
- Multiple private IPs share a single public IP using different port numbers.
- Most common form of NAT in home routers.
## Advantages
- Improves security by masking internal IPs.
- Reduces the need for public IP addresses.
**Example:**
When many computers in a Wi-Fi network access the Internet, NAT translates their private IPs into one public IP.
# PRIVATE ADDRESSING AND NAT TYPES (SNAT, DNAT)
## 1. Private Addressing
Private IP addresses are used **within local networks** and **not routable on the Internet**.
They are defined by the Internet Assigned Numbers Authority (IANA).
### Private IP Ranges:
- **Class A:** 10.0.0.0 – 10.255.255.255
- **Class B:** 172.16.0.0 – 172.31.255.255
- **Class C:** 192.168.0.0 – 192.168.255.255
**Purpose:**
- Used for LANs, offices, or home networks.
- Reduces demand for public IPs.
---
## 2. Types of NAT
### a) **SNAT (Source NAT)**
- Changes the **source IP address** of packets leaving the network.
- Used when internal devices access the Internet.
### b) **DNAT (Destination NAT)**
- Changes the **destination IP address** of incoming packets.
- Used to redirect external requests to internal servers (e.g., web server hosting).
**Example:**
When you access a website from a home network, SNAT translates your local IP;
when someone accesses your hosted site, DNAT routes it to your server.
**Summary:**
Private addressing saves public IPs, while SNAT and DNAT allow controlled communication between private and public networks.
# NAT AND FIREWALLS
**NAT (Network Address Translation)** and **Firewalls** often work together to improve security and manage data flow between private
and public networks.
## Role of NAT
- Converts private IPs into public IPs for Internet communication.
- Masks internal network details from outsiders.
- Acts as a basic security layer by hiding internal devices.
## Role of Firewall
A **firewall** is a security device (hardware or software) that monitors and controls incoming and outgoing network traffic based on
security rules.
### Types of Firewalls
1. **Packet Filtering Firewall:**
- Filters packets based on IP address, port, or protocol.
2. **Stateful Inspection Firewall:**
- Monitors active connections and traffic state.
3. **Application Layer Firewall:**
- Filters traffic at the application level (e.g., web or email filtering).
## NAT + Firewall Combination
- NAT hides internal IPs, while the firewall blocks unauthorized access.
- Together, they provide **network security** and **controlled communication**.
**Example:**
A home Wi-Fi router uses NAT for IP translation and a built-in firewall for protection from external attacks.
# VLANs: CONCEPTS
**VLAN (Virtual Local Area Network)** is a technology that divides a physical LAN into multiple logical networks.
It allows devices from different areas to communicate as if they were on the same network.
## Purpose
- To improve network performance and security.
- To group users or devices logically instead of physically.
- To reduce broadcast traffic within the network.
## Working
- VLANs are created using **managed switches**.
- Each VLAN has a **unique ID (VLAN ID)**.
- Devices in different VLANs can’t communicate without a **router** or **Layer 3 switch**.
## Advantages
- Better network segmentation.
- Improved security by isolating departments.
- Easier management and troubleshooting.
## Example
In a college network, separate VLANs can be created for:
- Students
- Faculty
- Administration
**Summary:**
VLANs organize networks logically, increasing efficiency and data security in large organizations.
# COMPARISON WITH REAL LANs
A **VLAN (Virtual LAN)** behaves like a **Real LAN (Physical LAN)** but works through software configuration instead of physical cabling.
## 1. Definition
- **Real LAN:** A physical network where computers are connected using switches, cables, and routers.
- **VLAN:** A logical network created within a switch using VLAN IDs.
## 2. Key Differences
| Feature | Real LAN | VLAN |
|----------|-----------|------|
| **Type** | Physical | Logical (virtual) |
| **Setup** | Requires hardware cabling | Configured in software |
| **Flexibility** | Limited (depends on wiring) | Highly flexible |
| **Security** | Shared network, less secure | Segmented, more secure |
| **Broadcast Control** | Broadcast reaches all devices | Broadcast limited to VLAN group |
| **Cost** | Higher (hardware needed) | Lower (logical segmentation) |
## 3. Advantages of VLAN Over LAN
- Easier network reconfiguration.
- Better control and isolation of data.
- Reduces congestion and improves performance.
**Summary:**
While a real LAN connects systems physically, a VLAN provides the same connectivity virtually with more flexibility, control, and security.
# TYPES OF VLAN
**VLAN (Virtual Local Area Network)** can be categorized based on how the network devices are grouped or identified.
Each type has its own method of assigning devices to VLANs.
## 1. Port-Based VLAN
- Devices are assigned to VLANs based on the **switch port** they are connected to.
- Simple to configure and manage.
- If a device moves to another port, its VLAN changes.
## 2. MAC-Based VLAN
- Devices are grouped by their **MAC (hardware) addresses**.
- VLAN assignment remains the same even if the device changes ports.
## 3. Protocol-Based VLAN
- Devices are grouped based on the **network protocol** used (e.g., IP, IPX).
- Useful in multi-protocol environments.
## 4. Voice VLAN
- Special VLAN used for **VoIP (Voice over IP)** communication.
- Provides better voice quality and low latency.
## 5. Dynamic VLAN
- Devices are automatically assigned to VLANs using a **VLAN Management Policy Server (VMPS)**.
**Summary:**
Different VLAN types allow flexible and secure network segmentation depending on ports, MAC addresses, or protocols.
# VLAN TAGGING
**VLAN Tagging** is the process of adding an identification tag to data packets so they can be recognized as belonging to a specific VLAN
when traveling between switches.
## Purpose
- To ensure data from different VLANs can travel over the same physical link.
- Helps maintain VLAN separation in **trunk links** (connections between switches).
## How It Works
- When a packet is sent from a VLAN, the switch adds a **VLAN ID tag** to the Ethernet frame.
- The receiving switch reads the tag and forwards the packet to the correct VLAN.
- The tag is removed before delivery to the destination device.
## Standards
- Defined by **IEEE 802.1Q** standard.
- The VLAN ID field is **12 bits long** (supports up to 4096 VLANs).
## Types of Links
- **Access Link:** Carries traffic of a single VLAN (no tags).
- **Trunk Link:** Carries traffic of multiple VLANs using tagging.
**Example:**
In a network with VLAN 10 and VLAN 20, trunk ports use VLAN tags to differentiate packets traveling between switches.
**Summary:**
VLAN tagging allows multiple VLANs to share the same connection while keeping their data separate and organized.
# IPv6: ADDRESS STRUCTURE
**IPv6 (Internet Protocol version 6)** is the latest version of the Internet Protocol, developed to replace IPv4 due to the shortage of
available IPv4 addresses.
## 1. Structure
- IPv6 addresses are **128 bits long**, compared to 32 bits in IPv4.
- Written as **eight groups of four hexadecimal digits**, separated by colons (:).
Example: `2001:0db8:85a3:0000:0000:8a2e:0370:7334`
- Leading zeros can be omitted, and consecutive zeros can be replaced by `::` (only once per address).
## 2. Parts of IPv6 Address
- **Network Prefix:** Identifies the network or subnet (similar to IPv4 network ID).
- **Interface ID:** Identifies a specific device (host) on the network.
## 3. Features
- Vast address space (3.4 × 10³⁸ addresses).
- Simplified header for faster routing.
- Built-in security through **IPSec**.
- No need for NAT (Network Address Translation).
## 4. Example Breakdown
`2001:0db8:0000:0042:0000:8a2e:0370:7334`
→ `2001:db8:0:42::8a2e:370:7334` (compressed form)
**Summary:**
IPv6 provides a larger, more efficient addressing system, enhancing speed, security, and scalability of the Internet.
# IPv6 – Address Space and Header
## IPv6 Address Space
- **IPv6** uses **128-bit addresses**, allowing **3.4 × 10³⁸ unique addresses** — enough for every device on Earth and beyond.
- Written in **hexadecimal**, separated by colons `(:)`.
### Example:
`2001:0db8:85a3:0000:0000:8a2e:0370:7334`
### Address Compression Rules:
- Remove leading zeros → `2001:db8:85a3:0:0:8a2e:370:7334`
- Replace consecutive zeros with `::` → `2001:db8:85a3::8a2e:370:7334`
(only once per address)
### Address Types:
1. **Unicast:** Identifies a single interface (one-to-one communication).
2. **Multicast:** Identifies a group of interfaces (one-to-many).
3. **Anycast:** Sent to the nearest node in a group (one-to-nearest).
### Benefits of IPv6 Addressing:
- Huge address space for global connectivity.
- No need for NAT (every device can have a public IP).
- Hierarchical addressing improves routing efficiency.
---
## IPv6 Header
IPv6 header is **simplified and fixed at 40 bytes**, making routing faster than IPv4.
### IPv6 Header Format:
| Field | Size (bits) | Description |
|--------|--------------|-------------|
| Version | 4 | Always 6 (for IPv6) |
| Traffic Class | 8 | Defines packet priority (like QoS) |
| Flow Label | 20 | Identifies flow of packets for same session |
| Payload Length | 16 | Length of the data after the header |
| Next Header | 8 | Type of next header (e.g., TCP, UDP, ICMPv6) |
| Hop Limit | 8 | Similar to TTL in IPv4 – limits hops |
| Source Address | 128 | Address of sender |
| Destination Address | 128 | Address of receiver |
### Key Features:
- **Fixed header length** → faster processing.
- **No checksum field** → less overhead.
- **Supports Extension Headers** for optional features like routing, fragmentation, and security.
- **Integrated IPSec** → better security.
---
### Summary:
> IPv6 provides an enormous address space with simplified 40-byte headers, faster routing, improved security, and scalability — the future
of Internet networking.