DCN Notes
DCN Notes
SWITCHING
1. Circuit-Switched Networks:
Concept:
A dedicated, end-to-end physical connection is established between two parties
before any data transmission begins. This connection remains active for the
duration of the communication.
Example:
The traditional telephone network is a prime example. When a call is made, a
physical circuit is established through various switching centers, and it remains
open until the call is terminated.
Characteristics:
Connection-oriented: A connection is established before data transfer.
Dedicated resources: Resources like bandwidth are reserved for the duration of the
connection, even if there is no data being transmitted.
Guaranteed bandwidth: Once the connection is established, a consistent bandwidth
is available.
Low latency: Minimal delay due to dedicated path.
Less efficient: Can be inefficient if the connection is idle for periods of time.
Example:
Traditional telephone network, ISDN.
2. Datagram Networks:
Concept:
Each packet, or datagram, is treated as an independent unit of data. Packets may
take different routes to reach the destination and can arrive out of order.
Example:
The internet is a datagram network. Each packet sent through the internet may
take a different route depending on network congestion and other factors.
Characteristics:
Connectionless: No dedicated path is established before sending data.
Dynamic routing: Packets are routed dynamically based on available paths.
No guaranteed delivery: Packets may be lost or arrive out of order.
More efficient: Resources are used more efficiently as they are allocated on demand.
Less reliable: Packets may be lost or arrive out of order.
Example:
The Internet.
3. Virtual Circuit Networks:
Concept:
A logical path, or virtual circuit, is established between source and destination
before data transmission. While it appears as a dedicated path to the user, the
underlying network may be packet-switched.
Example:
Frame Relay and ATM (Asynchronous Transfer Mode) networks use virtual
circuits.
Characteristics:
Connection-oriented: A virtual circuit is established before data transfer.
Resource reservation: Resources like bandwidth may be reserved for the duration of
the virtual circuit.
Guaranteed path (for the session): Packets follow the same virtual path within the
network.
Can be more efficient than circuit switching: Resources can be shared between
different virtual circuits.
Example:
Frame Relay, ATM.
In essence:
Circuit switching: is like a dedicated phone line.
Datagram switching: is like sending letters through the postal system, each with
its own address.
Virtual circuit switching: is like making a reservation for a specific route on a
public transport system, with the route being reserved for your use but still shared
with others
Block coding in error detection and correction involves dividing data into blocks
and adding redundant bits (parity bits) to each block for error detection and
potentially correction. Linear block codes are a specific type of block code where
the codeword is a linear combination of the message bits. A key parameter is the
minimum distance (d_min) of the code, which determines its error-correcting
capability. A larger d_min generally indicates better error correction.
Block Coding:
Block coding divides data into fixed-size blocks, each encoded with redundant
bits. The added redundancy enables the receiver to identify discrepancies between
the received data and the expected data, thus detecting errors.
Linear block codes are a subset of block codes where the codewords are generated
by a linear transformation of the message bits. This means that the codeword can
be obtained by multiplying the message vector with a generator matrix.
Key Concepts:
Generator Matrix (G): A matrix used to encode the message bits into
codewords.
Parity Check Matrix (H): A matrix used to check the validity of received
codewords.
Codeword: The encoded block of bits.
Message Vector (M): The original block of bits.
Syndrome: A value calculated from the received codeword using the parity check
matrix; it indicates the presence and pattern of errors.
Minimum Distance (d_min): The smallest Hamming distance between any two
valid codewords. It determines the error-correcting capability of the code.
Example: A Simple Parity Check Code:
A simple parity check code adds a single parity bit to each block of data bits.
Data: Suppose we have a 4-bit message (k=4)
Encoding: We add a parity bit (r=1) which is the XOR of all the data bits. If the
number of 1s in the data bits is even, the parity bit is 0; otherwise, it's 1. The
resulting codeword is 5 bits (n=5).
Example: If the data is 1011, the parity bit would be 1 (since there are three 1s,
which is an odd number), making the codeword 10111.
Error Detection: If a single bit error occurs during transmission, the parity check
will fail at the receiver, indicating an error. For example, if the received codeword
is 10101, the parity check will fail because the parity bit (1) doesn't match the
parity of the received data bits (0).
Limitations: This code can only detect single-bit errors and cannot correct them.
Error Correction Capability:
The error correction capability of a linear block code is related to its minimum
distance. A code with a minimum distance of d_min can detect up to d_min -
1 errors and correct up to (d_min - 1) / 2 errors.
Cyclic codes are a class of linear block codes with the property that if a codeword
is cyclically shifted (rotated), the result is still a valid codeword. They are widely
used in digital communications and storage due to their ease of implementation
and error-detecting capabilities.
🔷 CRC Terminology:
✅ CRC Example:
Data: 1101
Appended zeros (3 zeros for degree-3 polynomial):
→ 1101000
We divide 1101000 by 1011. The division is similar to long division, but with
XOR instead of subtraction.
yaml
CopyEdit
1011 ) 1101000
XOR
------
0110...
...
Continue this XOR process until you get a remainder of 3 bits (since the degree of
G is 3).
Let’s say the remainder is 100 (actual remainder from this division).
Receiver receives 1101100 and divides it by the same generator polynomial 1011.
If remainder = 0, no error.
If remainder ≠ 0, error detected.
🔷 What is a Checksum?
A checksum is a simpler error-detection method. It’s the sum of all data segments
(usually 8- or 16-bit words) using 1's complement arithmetic. The sender
computes this checksum and appends it to the message.
✅ Checksum Example:
Data1: 01010101
Data2: 00110011
→ 01111001
Step 3: Send:
Step 4: At receiver:
1. Framing
Definition:
Framing is the process of dividing the stream of bits received from the network
layer into manageable data units called frames.
Purpose:
2. Flow Control
Definition:
Flow control ensures that the sender does not overwhelm the receiver by sending
data too quickly.
Techniques:
Assume:
Window size = 4
Sender can send frames 0 to 3 without waiting.
Receiver sends an acknowledgment after each successful frame.
Frames sent: 0, 1, 2, 3
Receiver ACKs: 0, 1, 2, 3
Next frames sent: 4, 5, 6, 7
3. Error Control
Definition:
Error control detects and corrects errors that occur during transmission.
Mechanisms:
Error Detection:
o Parity Bit
o Checksum
o Cyclic Redundancy Check (CRC)
Error Correction:
o Automatic Repeat Request (ARQ):
Stop-and-Wait ARQ
Go-Back-N ARQ
Selective Repeat ARQ
1. Overview
The Stop-and-Wait Protocol is one of the simplest data link layer protocols used
in noiseless channels. A noiseless channel means that there are no transmission
errors, so data and acknowledgments are delivered without corruption.
2. Working Steps
3. Example
T3 Receive ACK 0
T7 Receive ACK 1
4. Characteristics
Unit-IV
Overview:
Characteristics:
A small office with a few PCs connected to a switch using 100BASE-TX over
Cat5e cables. Each computer communicates at 100 Mbps.
Overview:
Common Types:
1000BASE-T: 1 Gbps over Cat5e or Cat6 (twisted pair).
1000BASE-SX: Short-range fiber (multimode) up to 550m.
1000BASE-LX: Long-range fiber (single-mode) up to 10 km.
Characteristics:
Steps:
Outcome:
These are hardware components used to connect network devices and manage the
flow of data in a LAN (Local Area Network).
🔸 Definition:
🔹 Characteristics:
No power required
Works like a cable splitter
No signal boosting or regeneration
Cannot extend network range
📘 Example:
You have 3 computers in a small office. You use a passive hub to connect them
with Ethernet cables. When one computer sends a signal, the passive hub simply
splits and sends it to all 3 ports — even if only one device needs the data.
2️⃣ Repeater
🔸 Definition:
🔹 Characteristics:
Needs power
Amplifies and regenerates signals
Used to combat signal degradation over long distances
📘 Example:
🔸 Definition:
An active hub is like a powered version of a passive hub. It not only splits the
signal but also amplifies and regenerates it before forwarding to other devices.
🔹 Characteristics:
Requires power
Improves signal strength
Can work like a repeater with multiple ports
📘 Example:
1. Bridge
🔸 Definition:
A bridge connects and filters traffic between two LAN segments. It operates at
Layer 2 (Data Link Layer) of the OSI model.
🔹 Functions:
📘 Example:
You have two departments (HR and Finance) using Ethernet. A bridge connects
both segments and only forwards data if it's meant for a device on the other side.
🔸 Definition:
🔹 Functions:
Operates at Layer 2
Learns MAC addresses and builds a MAC table
Efficient traffic forwarding within a LAN
📘 Example:
In an office with 20 computers, a Layer 2 switch connects them. It sends data only
to the intended device, improving speed compared to a hub.
3. Router
🔸 Definition:
🔹 Functions:
Example:
Your home router connects your local Wi-Fi network to your ISP. It uses IP
addresses to send your Google search to the correct web server.
🔸 Definition:
🔹 Functions:
📘 Example:
In a university, different departments have VLANs. A Layer 3 switch routes traffic
between VLANs within the same switch, eliminating the need for a separate
router.
5. Gateway
🔸 Definition:
A gateway connects networks that use different protocols. It works at all layers
of the OSI model.
🔹 Functions:
📘 Example:
An email system using SMTP communicates with a legacy system using X.400. A
gateway translates the protocols so the two systems can talk.
The primary protocol used at this layer is the Internet Protocol (IP) —
specifically IPv4 and IPv6.
🔹 Features:
📘 Example:
🔹 Features:
📘 Example:
Since IPv4 addresses are almost exhausted, the world is slowly moving toward
IPv6. But the transition is gradual because many systems still rely on IPv4.
🔁 Transition Mechanisms:
UNIT-V
Delivery in the network layer refers to the mechanism by which packets are
transferred across the physical networks. There are two ways this can happen:
Direct Delivery:
Occurs when the source and destination are on the same physical network. The
sender can directly transmit the packet to the destination using its network
address.
Indirect Delivery:
Happens when the source and destination are on different networks. In this case,
the packet is forwarded from one router to another until it reaches a router
connected to the same network as the destination.
Forwarding is the process within a router that determines the next hop (the next
router or the destination host) for a packet to reach its destination. Routers use
routing tables to make these forwarding decisions. These tables contain
information about network addresses and the corresponding next hop to reach
those addresses.
Function: Physically moves packets from one network interface to another based
on the routing table.
Process: Uses forwarding tables (often derived from routing tables) to quickly
look up the correct outgoing interface for a packet.
Location: Implemented in the data plane of network devices, such as routers.
Analogy: Following the directions on the map to reach a specific location.
Routing:
Function: Determines the best path for data packets across the network.
Process: Uses routing algorithms (like Dijkstra's algorithm or RIP, OSPF) and
protocols (like BGP) to calculate paths and populate routing tables.
Location: Typically implemented in the control plane of network devices, such as
routers.
Analogy: Building a map and providing directions.
Distance Vector Protocols: These protocols exchange routing information with their
neighbors, and routers make routing decisions based on the information
received. Examples include RIP and IGRP (now largely replaced by EIGRP).
RIP (Routing Information Protocol): A simple protocol that uses hop count as a
metric, but it has limitations like a maximum hop count and slow convergence.
EIGRP (Enhanced Interior Gateway Routing Protocol): A Cisco-proprietary
protocol that combines features of both distance vector and link-state protocols,
offering better performance and scalability.
Link-State Protocols: These protocols flood the network with information about the
network topology. Routers then use this information to calculate the shortest path to
each destination. Examples include OSPF and IS-IS.
OSPF (Open Shortest Path First): A widely used protocol known for its scalability
and efficiency in large networks.
IS-IS (Intermediate System to Intermediate System): Similar to OSPF, but uses
different terminology and is often used by Internet Service Providers (ISPs).
Exterior Gateway Protocols (EGPs):
Used for routing between different autonomous systems.
BGP (Border Gateway Protocol): The protocol used on the internet to exchange
routing information between different networks (ASs).
How Unicast Routing Works:
1. 1. Path Calculation:
Routing protocols use algorithms (like Dijkstra's algorithm for link-state
protocols) to determine the best path to a destination based on metrics like hop
count, bandwidth, or delay.
2. 2. Routing Table:
Each router maintains a routing table that lists the best paths to different
networks.
3. 3. Packet Forwarding:
When a router receives a packet, it consults its routing table to find the next hop
(the next router) towards the destination and forwards the packet accordingly.
Key Concepts:
Autonomous System (AS): A collection of networks under a single administrative
authority.
Interior Gateway Protocol (IGP): A routing protocol used within an AS.
Exterior Gateway Protocol (EGP): A routing protocol used between ASs.
Distance Vector: A routing protocol where routers share their routing tables with
their neighbors.
Link State: A routing protocol where routers share information about the network
topology.
Examples of Unicast Routing Protocols in Action:
Within a large enterprise network:
OSPF might be used to manage routing within the company's own network, while
BGP might be used to exchange routing information with other networks or ISPs.
Between networks:
BGP is the primary protocol used to exchange routing information between
different networks on the internet.
Count-to-Infinity Problem:
In some scenarios, distance vector routing can be prone to the "count-to-infinity"
problem, where routes can oscillate and take a long time to stabilize after a
network change.
Examples of distance vector routing protocols:
Routing Information Protocol (RIP): A widely used distance vector protocol,
particularly in smaller networks.
Interior Gateway Routing Protocol (IGRP): A Cisco proprietary distance vector
protocol.
Advantages of distance vector routing:
Simplicity: Distance vector routing is relatively simple to implement and
understand.
Low Resource Requirements: It doesn't require significant resources like
processing power or memory, making it suitable for smaller networks.
Disadvantages of distance vector routing:
Slow Convergence:
As mentioned, convergence can be slow, and the count-to-infinity problem can
occur.
Larger Routing Tables:
Distance vector protocols can lead to larger routing tables compared to link-state
protocols.
Vulnerability to Routing Loops:
The protocol is susceptible to routing loops, where packets can get trapped in
cycles and not reach their destination.
Link-state routing
1. 6G Development
o Target speeds of up to 1 Tbps with ultra-low latency.
o Expected by 2030, enabling real-time holograms, tactile internet, etc.
2. Autonomous Networks
o Self-configuring, self-optimizing, and self-healing networks using AI.
o Driven by large-scale automation and orchestration tools.
3. Terahertz Communication
o High-frequency bands beyond 5G for ultra-fast wireless
communication.
o Suitable for VR/AR and massive data transmission.
4. Network Slicing
o Dedicated virtual networks over shared physical infrastructure.
o Used in 5G and beyond to tailor services for different use cases (e.g.,
healthcare vs. gaming).
5. Space-Based Internet
o Satellite constellations (e.g., Starlink, Kuiper) for global coverage.
o May disrupt traditional telecom in underserved regions.
6. Post-Quantum Cryptography
o Algorithms resistant to quantum attacks.
o Becoming standard as quantum computing evolves.
7. Green Networking
o Energy-efficient protocols and hardware.
o Sustainability becoming a priority due to climate concerns.
8. Blockchain-Based Networking
o Decentralized DNS, secure
5G Network
🔹 Salient Features of 5G
1. High Speed
o Up to 10 Gbps (10x faster than 4G).
2. Ultra-Low Latency
o As low as 1 millisecond, ideal for real-time applications.
3. Massive Device Connectivity
o Supports 1 million devices per square km – perfect for IoT.
4. Improved Reliability
o Near 100% uptime, critical for emergency or industrial use.
5. Enhanced Capacity & Coverage
o Efficient use of spectrum and support for dense urban areas.
6. Energy Efficient
o Optimized for longer battery life and reduced power consumption.
7. Network Slicing
o Enables creation of custom virtual networks for different use cases.
surgery remotely.
✅ Advantages of 5G
Advantage Explanation
🔧 Reliable
Stable and consistent connections for critical services.
Communication
❌ Disadvantages of 5G
Disadvantage Explanation
Use: Short-range wireless internet access in homes, offices, and public places.
Applications:
Applications:
Applications: