Computer_Network_Notes
Computer_Network_Notes
Data Representation:
o Data is represented in the form of binary digits (0 and 1) or bits. These bits are
grouped into bytes (8 bits) for processing.
o Data can be in analog (continuous signals) or digital (discrete signals) form.
Flow of Data:
o Unidirectional: Data flows in only one direction (simplex).
o Bidirectional: Data flows in both directions (half-duplex or full-duplex).
Half-Duplex: Data can flow in both directions, but not at the same time
(e.g., walkie-talkies).
Full-Duplex: Data flows in both directions simultaneously (e.g.,
telephones).
1. Physical Layer: Deals with the physical connection between devices (e.g., cables,
switches).
2. Data Link Layer: Handles data transfer between devices on the same network (e.g.,
MAC addresses).
3. Network Layer: Routes data between different networks (e.g., IP addresses).
4. Transport Layer: Ensures reliable data transfer (e.g., TCP, UDP).
5. Session Layer: Manages sessions between applications.
6. Presentation Layer: Translates data for the application (e.g., encryption, compression).
7. Application Layer: The interface for user applications (e.g., email, browsers).
5. Transmission Media:
6. LAN:
Wired LAN:
o Uses Ethernet cables (usually Cat 5/6) to connect devices within a local area.
o Devices communicate via switches and hubs.
Wireless LAN (Wi-Fi):
o Uses radio waves to connect devices without physical cables.
o Wi-Fi operates on specific frequencies (2.4 GHz, 5 GHz).
o Routers and access points are used to manage communication.
Connecting LANs:
o Bridges: Connect multiple LANs into a single network.
o Routers: Connect different networks (LANs to WANs).
Virtual LAN (VLAN):
o Allows the creation of logical networks within a physical LAN.
o Devices in a VLAN are grouped based on function, not physical location.
o VLANs improve security and reduce broadcast traffic.
Multiplexing:
o Multiplexing is a technique to combine multiple signals into one medium,
increasing bandwidth efficiency.
o Frequency Division Multiplexing (FDM): Divides the bandwidth of a
communication channel into smaller frequency bands, each used for a separate
signal.
Example: Analog TV broadcasting.
o Time Division Multiplexing (TDM): Divides the time into slots and allocates
each slot to a different signal.
Example: Digital telephony systems.
o Wavelength Division Multiplexing (WDM): Used in optical fiber systems,
where multiple wavelengths (or channels) are transmitted simultaneously over the
same fiber.
Example: Fiber-optic communication systems.
Spread Spectrum:
o Spread Spectrum is used to spread the signal over a wide range of frequencies,
improving resistance to interference and improving security.
Frequency Hopping Spread Spectrum (FHSS): Rapidly changes the
frequency of the signal in a pseudo-random pattern.
Direct Sequence Spread Spectrum (DSSS): Spreads the signal over a
broader bandwidth by multiplying the data signal with a spreading code.
Module-2
1. Data Link Layer Overview:
The Data Link Layer is the second layer in the OSI model and is responsible for reliable
data transfer between two devices over a physical medium.
Its main functions include:
o Framing: Divides data into frames.
o Error detection and correction: Ensures data is correctly transmitted.
o Flow control: Manages the rate of data transmission.
o Medium Access Control (MAC): Determines how devices access the shared
communication medium.
Fundamentals:
o Error Detection: Identifies if an error has occurred during transmission.
o Error Correction: Corrects errors that have been detected.
Block Coding:
o Block codes are used for error detection and correction by adding extra bits to the
data to detect or correct errors.
o Parity bits are a simple form of error detection (even or odd parity).
Hamming Distance:
o The Hamming Distance between two codewords is the number of bit positions in
which the corresponding bits differ.
o It is used to measure the error-detection and error-correction capabilities of a
code.
o A code with a Hamming distance of 3 can detect 2-bit errors and correct 1-bit
errors.
Cyclic Redundancy Check (CRC):
o CRC is a powerful error detection technique used to detect changes to raw data.
o It treats data as a polynomial and divides it by a fixed generator polynomial. The
remainder is appended to the data, and the receiver divides it again to check for
errors.
o Commonly used in Ethernet and other communication protocols.
Flow Control:
o Flow control manages the pace of data transmission between sender and receiver
to prevent overflow.
o Example: XON/XOFF and hardware flow control mechanisms like RTS/CTS.
Error Control:
o Error control protocols ensure reliable data delivery, handling errors such as
lost, duplicated, or corrupted frames.
Stop and Wait Protocol:
o The sender sends one frame at a time and waits for an acknowledgment (ACK)
before sending the next.
o Simple but inefficient due to idle time while waiting for ACK.
Go-Back-N ARQ (Automatic Repeat reQuest):
o In Go-Back-N ARQ, the sender can send multiple frames before receiving an
ACK, but if an error occurs in any frame, all subsequent frames are retransmitted.
o The receiver sends an ACK for the last correctly received frame.
Selective Repeat ARQ:
o Selective Repeat ARQ is more efficient than Go-Back-N ARQ. Here, only the
specific erroneous frame is retransmitted, rather than all frames after it.
o The receiver buffers the out-of-order frames until the missing ones are received.
Sliding Window Protocol:
o The sliding window technique allows a sender to send multiple frames before
needing an acknowledgment.
o The sender and receiver maintain a "window" of frames that are eligible to be sent
or acknowledged.
o Window size determines how many frames can be sent before waiting for an
acknowledgment.
Piggybacking:
o In piggybacking, the receiver acknowledges the received frame by combining the
acknowledgment (ACK) with the data in the reverse direction, rather than sending
separate ACK frames.
Steps:
The Network Layer is the third layer in the OSI model. Its primary responsibilities
include:
o Routing: Decides the best path for data to travel from source to destination across
multiple networks.
o Logical Addressing: Ensures data reaches the correct destination by assigning
logical addresses (e.g., IP addresses).
o Packet Forwarding: Moves packets from one router to the next until they reach
their destination.
o Fragmentation and Reassembly: Splits large packets into smaller ones to
accommodate the transmission medium and reassembles them at the destination.
2. Switching:
Switching in the network layer refers to the method by which data is transferred from
one device to another in a network, often through routers. Key types of switching
include:
o Circuit Switching: A dedicated communication path is established for the entire
duration of the communication. Example: Telephone networks.
o Packet Switching: Data is broken into small packets and sent independently
across the network. Each packet may take a different path to the destination.
Example: The Internet.
o Message Switching: Entire messages are transmitted and stored temporarily at
intermediate switches until the next available link is ready.
4. Address Mapping:
Type of
Protocol Description Key Features
Addressing
32-bit address scheme widely used on 32-bit (IPv4
IPv4 Dotted decimal notation
the internet. addresses)
128-bit address scheme to address IPv4 128-bit (IPv6 Hexadecimal notation,
IPv6
address exhaustion. addresses) huge address space
Maps IPv4 address to MAC address in Local network
ARP IPv4 to MAC
a local network. communication
Maps MAC address to IPv4 address, Now obsolete (replaced by
RARP MAC to IPv4
used for diskless computers. DHCP)
Assigns IP addresses and other Dynamic IP
BOOTP Used before DHCP
configuration info to diskless devices. assignment
Dynamically assigns IP addresses and Dynamic IP Efficient, lease-based IP
DHCP
provides network configuration. assignment assignment
7. Routing Protocols:
Module-4
Here's a comprehensive breakdown of Transport Layer concepts, which will aid you in your
exam preparation:
The Transport Layer is the fourth layer in the OSI model. It is responsible for providing
reliable data transfer services to the application layer above it and ensures the process-to-process
communication between devices on a network. It manages the data flow between two systems
and provides services like error control, flow control, and multiplexing.
SCTP is a transport-layer protocol that combines features of both UDP and TCP. It is
designed for applications requiring high reliability and data integrity, but it also supports
multi-homing (using multiple IP addresses for redundancy) and message-oriented
communication.
Key Features of SCTP:
o Message-based communication: Unlike TCP, which is byte-stream-based, SCTP
preserves message boundaries.
o Multi-homing: SCTP supports multiple network paths between endpoints,
improving reliability in case of a path failure.
o Ordered delivery: Ensures that the data is delivered in the correct sequence, like
TCP.
o Congestion control and flow control: Like TCP, SCTP implements flow and
congestion control mechanisms.
Use Cases:
o Telecommunication networks (used in signaling)
o Web services where high availability and reliability are crucial.
6. Congestion Control:
Congestion control is crucial to prevent network congestion, which occurs when too
many packets are injected into the network, leading to packet loss, delays, and
performance degradation.
TCP Congestion Control Mechanisms:
1. Slow Start: TCP starts with a small congestion window and increases it
exponentially as it successfully transmits data.
2. Congestion Avoidance: Once the threshold is reached, the congestion window
increases linearly to avoid congestion.
3. Fast Retransmit and Fast Recovery: If packet loss is detected (via duplicate
ACKs), TCP retransmits the lost packet and reduces the congestion window to
alleviate congestion.
o Key terms in TCP Congestion Control:
Congestion Window (cwnd): The amount of data TCP is allowed to send
without receiving an acknowledgment.
Slow Start Threshold (ssthresh): The point at which TCP switches from
exponential to linear growth.
Quality of Service (QoS) refers to techniques that manage network resources to ensure
the efficient and reliable transmission of data, especially for applications that require
consistent delivery (e.g., real-time applications like VoIP and video conferencing).
Key QoS parameters:
o Latency: The time it takes for data to travel from source to destination.
o Jitter: Variability in latency, which can affect real-time applications.
o Bandwidth: The amount of data that can be transmitted per unit of time.
o Packet loss: The percentage of packets lost during transmission.
o Throughput: The actual rate at which data is delivered to the application.
Two common algorithms used to improve QoS are Leaky Bucket and Token Bucket.
Fast, no guarantee of
Connectionless, unreliable transport
UDP delivery, no flow Streaming, VoIP, DNS
protocol.
control
Leaky Traffic shaping algorithm ensuring Constant output rate, Preventing traffic
Bucket smooth traffic flow. excess traffic discarded bursts in networks
Token Allows bursty traffic with a limit on Burst traffic allowed, Managing traffic for
Bucket average rate. tokens control flow rate multimedia apps
Module-5
Here’s a detailed breakdown of Application Layer protocols and concepts to help you prepare
for your exam:
3. TELNET:
4. Email:
The Email system is a core component of the application layer, enabling users to send
and receive messages across networks.
o SMTP (Simple Mail Transfer Protocol): Used for sending emails between
servers.
o POP3 (Post Office Protocol version 3): Used by email clients to retrieve emails
from the server.
o IMAP (Internet Message Access Protocol): Allows access to email on a remote
server, enabling more advanced features like folder management.
Key Concepts:
o Mail Servers: Email systems rely on servers to send, receive, and store messages.
o Mail Clients: Software like Outlook, Thunderbird, or web-based services like
Gmail that users interact with to manage their emails.
SNMP is used for monitoring and managing network devices such as routers, switches,
servers, and printers.
o Key Features:
Management Information Base (MIB): A database of network objects
that can be monitored and controlled using SNMP.
SNMP Manager and Agent: The manager queries and controls network
devices, while the agent resides on devices and reports status or accepts
commands.
o Versions:
SNMPv1 and SNMPv2c (less secure)
SNMPv3 (secure, with authentication and encryption)
8. Bluetooth:
9. Firewalls:
Firewalls are network security devices or software that monitor and control incoming
and outgoing network traffic based on predetermined security rules.
o Types of Firewalls:
Packet-Filtering Firewalls: Inspect packets at the transport layer and
filter traffic based on predefined rules (e.g., IP addresses, ports).
Stateful Firewalls: Track the state of active connections and make
decisions based on the context of traffic.
Proxy Firewalls: Act as intermediaries between the user and the target
server, hiding the user's network details and controlling access.
Key Concepts:
o Access Control List (ACL): A list of rules used to filter traffic based on IP
address, port, and protocol.
o Network Address Translation (NAT): Hides internal network addresses from
external networks.
10. Cryptography: