CN Complete Notes
CN Complete Notes
Q.1) Briefly discuss about different guided media that are used in computer networks ?
Guided media in computer networks refers to the physical pathways that guide data signals from one device to another.
There are several types of guided media commonly used, each with its own characteristics and applications:
• Unshielded Twisted Pair (UTP): This is the most common type of twisted pair cable used in computer
networks, particularly in Ethernet networks. It consists of pairs of insulated copper wires twisted
together to reduce electromagnetic interference (EMI). Categories include Cat5, Cat5e, Cat6, Cat6a,
Cat7, and Cat8, with higher categories supporting faster data rates and greater distances.
• Shielded Twisted Pair (STP): Similar to UTP, but with additional shielding to provide better protection
against EMI. STP is more expensive and bulkier than UTP, making it less common in typical installations
but useful in environments with high interference.
2. Coaxial Cable:
• Coaxial cable consists of a central conductor, an insulating layer, a metallic shield, and an outer insulating
layer. It is used for cable television, internet services, and older Ethernet standards like 10Base2 (Thin
Ethernet) and 10Base5 (Thick Ethernet). Coaxial cable provides good protection against EMI and can
support longer distances than twisted pair cables.
• Single-Mode Fiber (SMF): Uses a single light path (mode) to transmit data, allowing for very high-speed
data transmission over long distances with minimal signal loss. SMF is typically used for long-distance
telecommunication networks and high-speed internet backbones.
• Multi-Mode Fiber (MMF): Uses multiple light paths to transmit data, which makes it suitable for shorter
distances compared to SMF. MMF is commonly used within buildings and data centers for network
connections. It is less expensive than SMF and easier to install.
Each type of guided media has its specific applications and advantages, making it suitable for different network
environments and requirements. The choice of media depends on factors such as data rate, distance, installation cost,
and susceptibility to interference.
The OSI (Open Systems Interconnection) Model is a conceptual framework used to understand and implement network
protocols in seven distinct layers. Each layer serves a specific function and communicates with the layers directly above
and below it. Here’s a brief overview of each layer:
1. Physical Layer:
• Function: Deals with the physical connection between devices and the transmission and reception of
raw binary data over a communication medium.
• Examples: Cables (twisted pair, fiber optic, coaxial), hubs, repeaters, and network adapters.
• Function: Responsible for node-to-node data transfer and error detection and correction. It ensures that
data sent from the physical layer is free from errors.
• Examples: Ethernet, Wi-Fi (IEEE 802.11), MAC addresses, switches, and bridges.
SK IMTIAJ UDDIN
3. Network Layer:
• Function: Manages the routing of data packets between devices across different networks. It handles
logical addressing and path determination.
4. Transport Layer:
• Function: Provides end-to-end communication services for applications. It ensures complete data
transfer with error recovery, flow control, and retransmission.
5. Session Layer:
6. Presentation Layer:
• Function: Translates data between the application layer and the network format. It handles data
encryption, decryption, compression, and translation.
7. Application Layer:
• Function: Provides network services directly to end-users and applications. It interacts with software
applications to implement a communication component.
The OSI Model is essential for understanding how different networking protocols interact and ensuring interoperability
between different systems and technologies. It helps network engineers and developers design and troubleshoot
complex networks by providing a clear structure and standardization.
The TCP/IP Model, also known as the Internet Protocol Suite, is a conceptual framework used to understand and design
the functions of a network. It is simpler and more practical than the OSI Model and consists of four layers that
correspond closely to certain layers of the OSI Model. Here's a brief overview of each layer:
• Function: Handles the physical connection between network devices, including how data is physically
transmitted over the network hardware. It corresponds to the OSI Model’s Physical and Data Link layers.
• Examples: Ethernet, Wi-Fi (IEEE 802.11), ARP (Address Resolution Protocol), and network interface cards
(NICs).
2. Internet Layer:
• Function: Manages logical addressing and routing of data packets between devices across different
networks. It ensures that packets are sent from the source network to the destination network.
• Examples: IP (Internet Protocol), ICMP (Internet Control Message Protocol), IGMP (Internet Group
Management Protocol).
SK IMTIAJ UDDIN
3. Transport Layer:
• Function: Provides end-to-end communication services for applications, ensuring complete data transfer
with reliability, error detection, and correction. It aligns with the OSI Model’s Transport layer.
4. Application Layer:
• Function: Contains protocols that provide network services directly to end-user applications. It
corresponds to the OSI Model’s Application, Presentation, and Session layers.
The TCP/IP Model provides a more streamlined and practical approach to understanding and designing network
protocols, focusing on real-world internet communication standards. It is essential for understanding how data is
transmitted across the internet and how different networking protocols interact.
Number of Layers 7 4
1. Physical
2. Data Link
1. Network Interface (Link)
3. Network
2. Internet
Layers 4. Transport
3. Transport
5. Session
4. Application
6. Presentation
7. Application
Development Purpose Theoretical framework for standardization Practical framework for real-world protocols
Protocol Specifications Framework, no specific protocols Specifies standard protocols (IP, TCP, UDP)
Flexibility Rigid, clear distinctions between layers Flexible, merges certain OSI layer functions
Application Layer Provides network services to end-users Provides network services to end-users
Examples of Protocols Theoretical protocols IP, TCP, UDP, HTTP, FTP, SMTP, DNS
SK IMTIAJ UDDIN
Q.5) State Difference between TCP and UDP model ?
Here is a table comparing the TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) models:
Reliability Provides reliable data transfer with error Provides unreliable data transfer without error
checking and recovery checking and recovery
Data Transmission Ensures data is received in the same order it Data can be received out of order
was sent
Flow Control Implements flow control to manage data Does not implement flow control
rate between sender and receiver
Congestion Uses congestion control mechanisms Does not use congestion control
Control
Header Size Larger header size (20-60 bytes) Smaller header size (8 bytes)
Speed Slower due to overhead from error checking Faster due to minimal overhead
and recovery
Use Cases Suitable for applications where reliability is Suitable for applications where speed is crucial
crucial, such as web browsing (HTTP), email and some data loss is acceptable, such as video
(SMTP), file transfer (FTP) streaming, online gaming, VoIP
Error Detection Checks for errors and retransmits lost Basic error detection without retransmission
packets
Examples HTTP, HTTPS, FTP, SMTP, Telnet DNS, DHCP, TFTP, SNMP, RIP, VoIP
Q.6) What do you mean by Line coding ? State disadvantage of using NRZ encoding ? How RZ encoding solves this ?
Line coding is a technique used in digital communication systems to convert digital data into a form suitable for
transmission over a communication medium. It involves mapping binary data (sequences of 0s and 1s) onto signals that
can be physically transmitted over a channel, such as an electrical or optical medium.
The primary purposes of line coding are to ensure efficient and reliable data transmission, to facilitate synchronization
between transmitter and receiver, and to control bandwidth and error rates.
• Signal Representation: Converts binary data into physical signals for transmission.
SK IMTIAJ UDDIN
• Synchronization: Provides a timing reference to maintain synchronization between transmitter and receiver.
• Bandwidth Efficiency: Impacts the bandwidth of the transmitted signal, aiming for efficient use of the frequency
spectrum.
• Lack of Synchronization: Long sequences of identical bits (0s or 1s) can cause a loss of synchronization between
the transmitter and receiver because there are no transitions to indicate bit boundaries.
• DC Component: NRZ can have a significant DC component, which is undesirable for many transmission media
that require a zero-average voltage level.
• Baseline Wander: The lack of transitions can cause baseline wander, making it difficult to maintain a stable
reference voltage, leading to potential errors in data interpretation.
Return-to-Zero (RZ) encoding addresses some of the disadvantages of NRZ encoding as follows:
• Improved Synchronization: In RZ encoding, each bit period is divided into two halves. For a binary '1', the signal
transitions to a high level during the first half of the bit period and returns to zero during the second half. For a
binary '0', the signal stays at zero for the entire bit period. This ensures there is always a transition at least once
per bit period, providing better synchronization between the transmitter and receiver.
• No DC Component: RZ encoding ensures the signal returns to zero between each bit, thereby reducing the DC
component. This helps in maintaining a zero-average voltage level, making it more suitable for transmission
media that require no DC component.
• Baseline Wander Reduction: The frequent transitions in RZ encoding reduce baseline wander, as the signal
consistently returns to a known reference level (zero), helping maintain a stable reference voltage and improving
the reliability of data interpretation.
However, it's important to note that RZ encoding requires a higher bandwidth compared to NRZ, as it effectively doubles
the number of transitions per unit of time.
Q.7) Define band width of a media ? Define Baseband and Broadband transmission ?
Bandwidth of a media refers to the maximum rate at which data can be transmitted over a communication channel
within a specified period. It is typically measured in bits per second (bps) or its higher multiples like Kbps, Mbps, Gbps,
etc. Bandwidth indicates the capacity of the medium to carry information and is a critical factor in determining the
performance and efficiency of a network.
• Types of Bandwidth:
• Theoretical Bandwidth: The maximum possible data rate under ideal conditions.
• Actual Bandwidth: The data rate that can be achieved in real-world conditions, often lower due to
factors like interference, noise, and network congestion.
In summary, bandwidth is a crucial metric in communications, defining the data-carrying capacity of a medium and
influencing the speed and quality of data transmission in a network.
Baseband and broadband transmission are two fundamental methods for transmitting data over communication
channels, each with distinct characteristics and applications.
Baseband Transmission:
Baseband transmission involves sending a single data signal over a communication medium without modulating it onto a
higher frequency carrier wave. The entire bandwidth of the medium is used for this single signal.
• Characteristics:
• Typically uses digital signals.
SK IMTIAJ UDDIN
• Utilizes the entire bandwidth of the medium for one communication channel.
• Suitable for short to medium distances due to signal attenuation and lack of frequency multiplexing.
• Often used in wired networks like Ethernet, where a single channel carries the data directly.
• Example: Ethernet networks, where data packets are sent directly over twisted pair or fiber optic cables
without frequency modulation.
• Advantages:
• Simplicity and cost-effectiveness for short-distance communication.
• Efficient for transmitting large volumes of data without the need for modulation.
• Disadvantages:
• Limited to single-channel communication, making it less suitable for long distances or environments
requiring multiple simultaneous transmissions.
Broadband Transmission:
Broadband transmission involves sending multiple data signals simultaneously over the same medium, each modulated
onto different frequency carrier waves. This allows for multiple channels of data to be transmitted concurrently.
• Characteristics:
• Typically uses analog signals for modulating data onto carrier frequencies.
• The medium’s bandwidth is divided into multiple frequency bands, each carrying a separate data
channel.
• Suitable for long distances due to the ability to multiplex multiple signals and the use of higher
frequency bands.
• Used in cable television networks, DSL, and wireless communication systems.
• Example: Cable TV networks, where multiple television channels are transmitted over the same coaxial
cable using different frequency bands.
• Advantages:
• Supports multiple channels of data simultaneously, making it ideal for high-capacity communication.
• Suitable for long-distance communication and environments requiring multiple simultaneous
transmissions.
• Disadvantages:
• More complex and costly due to the need for modulation and demodulation equipment.
• Susceptible to interference and requires careful frequency management to avoid signal overlap.
Summary:
Baseband transmission is simple and efficient for single-channel, short-distance communication, typically using digital
signals. In contrast, broadband transmission is more complex, supporting multiple channels and long-distance
communication by utilizing frequency multiplexing, making it suitable for applications like cable TV and internet services.
Multiplexing is a technique used in communication systems to combine multiple signals or data streams into a single
transmission medium or channel. This allows for more efficient use of the available bandwidth, enabling multiple
communications to take place simultaneously over the same physical medium. Multiplexing can be done in various ways,
depending on the nature of the signals and the requirements of the communication system.
Types of Multiplexing:
2. Time Division Multiplexing (TDM): T1 and E1 lines, GSM(Global System for Mobile Communications) etc.
SK IMTIAJ UDDIN
3. Wavelength Division Multiplexing (WDM): DWDM, CWDM etc.
Advantages of Multiplexing:
• Efficient Use of Bandwidth: Maximizes the use of the available bandwidth by allowing multiple signals to share
the same medium.
• Cost-Effective: Reduces the need for multiple physical channels, lowering infrastructure costs.
TDM (Time Division Multiplexing) switching is applied in various communication systems to efficiently manage multiple
data streams over a single transmission medium. Here are some key applications:
• Telecommunications:
• Digital Telephony: Used in traditional T1 and E1 lines to multiplex multiple voice calls over a single
transmission line.
• Cellular Networks: Early cellular networks (e.g., 2G GSM) used TDM to allocate time slots to different
users on the same frequency.
• Data Networks:
• Integrated Services Digital Network (ISDN): Combines voice and data transmission using TDM to
provide multiple communication channels over a single line.
• DSL (Digital Subscriber Line): Uses TDM to separate voice and data signals, allowing both to be
transmitted simultaneously over the same copper line.
• Broadcasting:
• Digital TV and Radio: TDM is used to multiplex multiple channels of audio and video signals into a single
transmission stream.
• Satellite Communications:
• Satellite Links: Utilizes TDM to manage multiple communication channels over the same satellite
transponder, enabling efficient use of satellite bandwidth.
• Computer Networks:
• Network Routers and Switches: Use TDM techniques to manage data packets from multiple sources and
ensure efficient data flow through the network.
• Emergency Services: TDM is used in radio systems for police, fire, and emergency medical services to
provide reliable and timely communication.
• Communication Systems: TDM is used for ground-to-air and train-to-ground communication systems to
ensure safe and coordinated operations.
SK IMTIAJ UDDIN
Q.9) Discuss about various transmission impairments ? What is inverse TDM ?
Transmission impairments refer to various factors that can degrade the quality and integrity of signals as they travel
through a communication medium. These impairments can cause data errors, reduce transmission efficiency, and affect
overall communication performance. Here are the main types of transmission impairments:
2. Noise: Unwanted electrical or electromagnetic energy that interferes with the signal.
• Types: Thermal Noise, Intermodulation Noise, Crosstalk, Impulse Noise.
• Impact: Can cause errors in data transmission, leading to data corruption.
• Solution: Implement shielding, use error detection and correction techniques, and maintain proper grounding.
4. Signal Loss: Loss of signal energy as it travels through the transmission medium.
• Cause: Poor-quality transmission media, long distances, or inadequate infrastructure.
• Impact: Reduces the effective transmission range and signal clarity.
• Solution: Use high-quality transmission media and ensure proper maintenance of infrastructure.
Inverse Time Division Multiplexing (Inverse TDM) is a technique used to combine multiple low-bandwidth channels into a
single high-bandwidth channel. This is effectively the opposite of traditional Time Division Multiplexing (TDM), where a
single high-bandwidth channel is divided into multiple time slots to carry multiple signals simultaneously. Inverse TDM is
often used in scenarios where multiple low-speed connections are aggregated to create a higher-speed link.
SK IMTIAJ UDDIN
Key Concepts of Inverse TDM:
• Channel Aggregation: Multiple low-speed data streams are combined to form a single high-speed stream.
• Bandwidth Utilization: Maximizes the use of available low-bandwidth channels to create a higher overall
bandwidth.
• Applications: Often used in network links where high-speed connectivity is required, but only multiple low-
speed connections are available.
• Internet Access Aggregation: Used by ISPs to combine multiple low-speed DSL or dial-up connections to provide
higher-speed internet access.
• WAN Connections: Employed in Wide Area Networks (WANs) to combine multiple T1/E1 lines into a higher-
bandwidth connection.
• Backup and Redundancy: Provides a method for creating a backup high-speed link by aggregating multiple
slower links.
• Bonding Multiple T1 Lines: If an organization has several T1 lines (each offering 1.544 Mbps), inverse TDM can
be used to combine these lines into a single higher-speed link. For instance, bonding four T1 lines would create a
6.176 Mbps connection, which can be used for higher-bandwidth applications.
Circuit switching is a method of communication where a dedicated communication path is established between two
nodes for the duration of the communication session. This path is reserved exclusively for the entire duration of the call
or data transfer, ensuring a constant connection between the endpoints.
• Fixed Bandwidth: A fixed amount of bandwidth is reserved for the entire duration of the connection, ensuring
consistent performance but potentially leading to inefficiency if the bandwidth is not fully utilized.
• Low Latency: Once the circuit is established, data can be transmitted with very low latency because the path is
dedicated.
• Reliability: Provides a reliable connection as long as the circuit is maintained, with minimal interference or
congestion from other users.
• Consistent Connection Quality: Provides a stable and constant connection with dedicated resources, ensuring
high-quality communication.
• Predictable Performance: Guaranteed bandwidth and low latency since the path is dedicated.
• Inefficient Use of Resources: Bandwidth is reserved for the entire duration of the connection, even if no data is
being transmitted, leading to potential wastage of resources.
• Setup Delay: Establishing the connection can introduce initial delay before communication begins.
• Scalability Issues: Less scalable compared to packet-switched networks, especially for data communications, as
it requires maintaining dedicated circuits for each connection.
SK IMTIAJ UDDIN
Q.11) Short note on message switching ?
Message switching is a method of data communication in which messages are sent in their entirety from the sender to
the receiver through intermediary nodes (switches or routers). Each node stores the complete message before
forwarding it to the next node. This process continues until the message reaches its final destination. Unlike circuit
switching, message switching does not require a dedicated path between the sender and the receiver.
• Intermediate Storage: Each switch must have enough storage capacity to store complete messages before
forwarding them.
• Routing: Messages are routed based on the destination address and network conditions.
• Delay: Can introduce significant delays because each switch must store and forward the entire message, which
can take time, especially if the message size is large.
• No Need for Dedicated Path: More efficient use of network resources compared to circuit switching, as no
dedicated path is reserved.
• Flexibility: Can handle variable message sizes and different types of data.
• Error Handling: Messages can be stored and retransmitted if errors occur, providing a level of reliability.
• Delay: The store-and-forward mechanism can introduce significant delays, especially for large messages.
• Storage Requirements: Requires substantial storage capacity at each switch to handle potentially large
messages.
Packet switching is a method of data transmission in which data is broken into smaller, manageable packets before being
sent over a network. Each packet is transmitted independently and can take different routes to reach the destination.
Upon arrival, the packets are reassembled to form the original data.
• Efficiency: Maximizes the use of available bandwidth by allowing multiple communications to share the same
network resources.
• Reliability: Uses error detection and correction techniques to ensure data integrity.
• Efficient Use of Network Resources: Bandwidth is dynamically allocated based on current network demand,
minimizing waste.
• Fault Tolerance: If a particular path fails or is congested, packets can be rerouted through alternate paths.
• Reduced Latency: Allows for the interleaving of packets from different sources, reducing the time packets spend
waiting for transmission.
• Better Error Handling: Error checking is performed on each packet, and only erroneous packets need to be
retransmitted.
SK IMTIAJ UDDIN
Disadvantages of Packet Switching:
• Variable Latency and Jitter: Packets may arrive out of order or experience varying delays due to different paths
taken.
• Complexity in Reassembly: Requires mechanisms at the destination to reorder and reassemble packets
correctly.
• Overhead: Each packet contains header information, which adds overhead and reduces the effective data rate.
Each switching method has its strengths and is suited to different types of communication needs. Packet switching is the
most widely used today due to its efficiency and adaptability in handling diverse and dynamic data traffic.
Dedicated path is established for No dedicated path; messages are No dedicated path; data is divided into
the entire duration of the sent hop-by-hop and stored at each packets that are routed independently.
communication session. intermediate node.
Continuous transmission after path Store-and-forward approach; each Packets are transmitted independently
setup message is stored entirely at each and may take different paths to the
node before forwarding. destination.
Low, once the connection is High, due to storage and Variable, can be low but affected by
established forwarding at each node network congestion and routing.
Inefficient; resources are reserved More efficient than circuit Highly efficient; resources are used as
for the entire duration, even if not switching but still involves storage needed, and packets share network
in use. at each node. paths.
High; dedicated path ensures Moderate; message integrity is High; uses error detection and correction,
consistent quality. maintained, but delays can be and rerouting for reliability.
significant.
Traditional telephone networks Early telegraph systems, some Internet (IP), VoIP, online streaming,
(PSTN), ISDN email systems cloud services, LANs
Fixed bandwidth reserved Variable bandwidth, but involves Dynamic bandwidth allocation,
entire message storage. maximizing utilization.
Less scalable; requires dedicated More scalable than circuit Highly scalable; easily accommodates
paths for each communication. switching, but limited by storage growth in network size and traffic
and delay. volume.
Minimal; errors handled through Intermediate nodes can store and Robust; error detection and correction at
end-to-end retransmission if retransmit messages. the packet level, with retransmission of
needed. lost packets.
Consistent, low latency after setup High latency due to store-and- Variable latency and jitter; depends on
forward mechanism network conditions.
High, with minimal errors once the High, but with potential delays High, with effective error handling
circuit is established mechanisms
SK IMTIAJ UDDIN
Q.14) Short note on virtual circuit switching ?
Virtual circuit switching is a method of data transmission that combines features of both circuit switching and packet
switching. In virtual circuit switching, a logical connection, known as a virtual circuit, is established between the sender
and receiver before data transmission begins. Although the data is transmitted in packets, the packets follow the same
pre-established path (virtual circuit) through the network, maintaining the order of delivery.
• Connection Setup: Involves establishing a virtual circuit before any data is transmitted. This setup includes
determining the path and reserving resources if necessary.
• Data Transfer: Packets are sent sequentially over the established virtual circuit, maintaining the order of
transmission.
• Connection Teardown: After the data transfer is complete, the virtual circuit is terminated, and resources are
released.
• Orderly Delivery: Packets arrive in the correct order, simplifying data reassembly at the destination.
• Resource Efficiency: More efficient than traditional circuit switching as it uses packet-based transmission.
• Quality of Service (QoS): Can provide guaranteed levels of service and bandwidth by reserving resources along
the virtual circuit.
• Reduced Overhead: Once the virtual circuit is established, packets do not need to carry full routing information,
reducing overhead.
• Setup Delay: Establishing the virtual circuit can introduce initial delays before data transmission begins.
• Resource Reservation: Resources are reserved along the path, which can lead to inefficiencies if the path is
underutilized.
• Complexity: Managing virtual circuits and ensuring consistent QoS can add complexity to the network
infrastructure.
Examples of virtual circuit switching – Frame Relay, Asynchronous Transfer Mode(ATM) etc.
Bit stuffing is a technique used in data communication to ensure that special bit patterns, used to mark the beginning or
end of a frame, do not appear in the data portion of the frame. It involves inserting non-informative bits into the data
stream to prevent accidental occurrences of these special patterns.
1. Sender Side:
• Transparency: Ensures that data can contain any bit pattern without interfering with frame delimiters or other
control information.
• Simplicity: Relatively straightforward to implement at both the sender and receiver ends.
Disadvantages of Bit Stuffing:
• Overhead: Adds extra bits to the data stream, which can increase the overall transmission size and reduce
effective data rate.
• Processing: Requires additional processing to monitor and modify the bit stream, both at the sender and
receiver ends.
Applications of Bit Stuffing:
• HDLC (High-Level Data Link Control): A protocol used for transmitting data over point-to-point and multipoint
links.
• PPP (Point-to-Point Protocol): Often used for establishing direct connections between two network nodes.
• CAN (Controller Area Network): Used in automotive and industrial systems for reliable and efficient data
transmission.
Character stuffing, also known as byte stuffing, is a technique used in data communication to ensure that special control
characters, which have specific meanings (such as frame delimiters), do not appear within the data portion of a frame.
This is achieved by inserting additional characters (escape characters) into the data stream whenever these special
characters appear in the data.
1. Sender Side:
• The sender scans the data to be transmitted for occurrences of the special control characters.
• When a control character is found in the data, the sender inserts an escape character before it.
• The same process is applied if the escape character itself appears in the data.
2. Receiver Side:
• The receiver scans the incoming data stream for escape characters.
• When an escape character is found, it is removed, and the following character is interpreted as data, not
as a control character.
Advantages of Character Stuffing:
• Transparency: Ensures that the data can include any characters without being misinterpreted as control
information.
• Compatibility: Easy to implement and compatible with protocols that operate on a byte-by-byte basis.
Disadvantages of Character Stuffing:
• Overhead: Adds extra characters to the data stream, increasing the overall size of the transmission.
• Processing Complexity: Requires additional processing to insert and remove escape characters, both at the
sender and receiver ends.
Applications of Character Stuffing:
• PPP (Point-to-Point Protocol): Commonly used in establishing internet connections over serial links.
• SLIP (Serial Line Internet Protocol): An older protocol for connecting devices to the internet over serial
interfaces.
• Modem Communication: Used in protocols for transmitting data over telephone lines.
SK IMTIAJ UDDIN
Q.16) Distinguish between bit stuffing and character stuffing ?
Inserting non-informative bits into data to avoid Inserting escape characters into data to avoid special control
special bit patterns. characters.
Prevents special bit patterns (like frame delimiters) Prevents special control characters from appearing in the data.
from appearing in the data.
Applied when a specific bit pattern (e.g., five Applied when a specific control character is detected in the
consecutive 1s) is detected. data.
HDLC (High-Level Data Link Control) with the PPP (Point-to-Point Protocol) with the delimiter 0x7E.
delimiter 01111110.
The receiver removes the stuffed bits and The receiver removes the escape character and interprets the
interprets the remaining data. following character as data.
Requires bit-level manipulation and detection of Requires character-level manipulation and detection of specific
specific bit patterns. control characters.
Adds extra bits, which may minimally affect the Adds extra characters, which can increase the overall size of the
data size. data more significantly than bit stuffing.
Suitable for protocols that operate on a bit-level Suitable for protocols that operate on a byte or character basis.
basis.
HDLC, CAN (Controller Area Network) PPP, SLIP (Serial Line Internet Protocol)
Q.17) Discuss about data transparency and bit stuffing in case of HDLC ?
In High-Level Data Link Control (HDLC), data transparency refers to the ability of the protocol to transmit data without
confusion between control characters and the actual data. Bit stuffing is a technique used in HDLC to achieve data
transparency by preventing special bit patterns, such as the frame delimiter, from appearing in the data portion of the
frame.
In HDLC, data transparency ensures that the frame delimiters and other control characters used for framing do not
conflict with the actual data being transmitted. HDLC achieves data transparency by using bit stuffing, which inserts extra
bits into the data stream to ensure that the frame delimiter pattern does not appear accidentally within the data.
• Data Integrity: Bit stuffing ensures that the data payload remains intact and unaffected by the framing
mechanism used in HDLC.
• Transparency: By preventing the accidental appearance of the frame delimiter pattern in the data, bit stuffing
ensures that the actual data content is transmitted without confusion.
• Compatibility: Enables interoperability between different HDLC implementations by ensuring consistent framing
and data transparency.
In HDLC, data transparency is crucial for accurate data transmission. Bit stuffing is a key mechanism used to achieve data
transparency by preventing special control characters, such as the frame delimiter, from interfering with the actual data
content. By inserting extra bits into the data stream, bit stuffing ensures that the framing mechanism operates effectively
without corrupting the transmitted data.
SK IMTIAJ UDDIN
Q.18) What is polling ? State the advantage of 2D parity over simple parity ? Give example.
Polling is a method used in computer networks to control and manage communication between devices. It involves a
central node, often referred to as the "master" or "controller," actively querying multiple peripheral devices, known as
"slaves" or "clients," to determine their status or to request data transmission. Polling allows the central node to manage
and coordinate communication with multiple devices efficiently.
• In a polling setup, there is typically one central node (master) that initiates communication with multiple
peripheral devices (slaves).
• The master node controls when and how each slave device can transmit data. It sequentially polls each device to
determine if it has data to send or if it requires attention.
• The master node cycles through each slave device, querying them in a predetermined sequence.
• Each slave device responds to the polling request from the master, providing status information or data if
available.
Advantages of 2D parity over simple parity – The advantage of 2D parity over simple parity lies in its ability to detect
and correct errors in two dimensions, providing enhanced error detection capabilities compared to simple parity.
• Simple parity only detects errors in a single dimension (e.g., across rows or columns), whereas 2D parity
checks for errors both horizontally and vertically.
• With 2D parity, errors occurring in both rows and columns can be detected, providing a higher level of
error detection capability.
• While simple parity can detect errors, it cannot correct them. On the other hand, 2D parity can identify
the location of errors in both rows and columns, enabling some level of error correction.
• By identifying the row and column where errors occur, 2D parity allows for more targeted error
correction techniques, such as retransmission or data reconstruction.
• With 2D parity, the probability of undetected errors is lower compared to simple parity, especially for
errors affecting multiple bits in different dimensions.
• By performing checks in two dimensions, 2D parity increases the likelihood of detecting errors that
might go unnoticed by simple parity.
4. Increased Reliability:
• The enhanced error detection and potential error correction capabilities of 2D parity contribute to
overall system reliability.
• Systems employing 2D parity are better equipped to identify and mitigate errors, leading to improved
data integrity and reliability.
• It allows for efficient error detection and correction within such complex data structures, ensuring data
integrity across rows and columns.
SK IMTIAJ UDDIN
Q.19) Compare Repeater, Router, Bridge and Gateway functionally as well as coverage of various layers for operational
aspect in OSI / ISO reference model ?
1. Repeater:
• Amplifies or regenerates signals to extend the reach of a network segment. It does not modify the data
or manage traffic.
• Operates purely on a physical level, without understanding the data being transmitted.
• It is used for extending the distance of a LAN by boosting the signal strength, typically used in long cable
runs.
• OSI Layer: Physical Layer (Layer 1).
2. Bridge:
• Connects two or more LAN segments, filtering traffic based on MAC addresses to reduce collisions and
improve efficiency.
• Uses MAC addresses to forward data only to the segment where the destination device resides.
• Used for splitting a large network into smaller, more manageable segments to reduce network traffic.
• OSI Layer: Data Link Layer (Layer 2).
3. Router:
• Routes data packets between different networks by using IP addresses. It determines the best path for
data to travel to reach its destination.
• Routers can also provide additional functions like NAT, DHCP, and firewall protection.
• Used for connecting different LANs or connecting a LAN to a WAN (e.g., the internet), managing traffic
between different IP networks.
• OSI Layer: Network Layer (Layer 3).
4. Gateway:
• Translates data between different network protocols or architectures, enabling communication between
networks that use different protocols.
• Gateways can provide more complex functions, such as protocol conversion, data translation, and
application-level services.
• Used for connecting different types of networks, such as a LAN with an enterprise network, or
converting protocols (e.g., email gateways converting SMTP to another protocol).
• OSI Layers: Depending on the type of gateway, it can operate from the Transport Layer (Layer 4) to the
Application Layer (Layer 7). In some cases, it may cover lower layers.
Q.20) Why acknowledgement is numbered in stop and wait protocol ? Discuss a situation when unnumbered
acknowledgement can create confusion in sender and receiver end ?
In the Stop-and-Wait protocol, acknowledgements are numbered to ensure reliable communication and to help
the sender distinguish between different packets and acknowledgements, preventing confusion and ensuring the correct
sequence of data.
Why Numbered Acknowledgements are Used:
1. Uniqueness:
• Numbering each acknowledgement uniquely (often using sequence numbers) ensures that each
acknowledgement corresponds to a specific data packet.
SK IMTIAJ UDDIN
• This helps in distinguishing between acknowledgements for different packets, especially when
retransmissions occur due to lost or corrupted packets.
2. Reliability:
• Numbered acknowledgements help in detecting and handling packet loss. If a sender does not receive
an acknowledgement with the expected sequence number, it can retransmit the packet.
• This ensures that all packets are correctly received and acknowledged.
3. Order Preservation:
• Sequence numbers help in maintaining the correct order of packets. Even if packets arrive out of order,
the receiver can use sequence numbers to reorder them correctly.
Q.21) Discuss the concept of sliding window ? How does HDLC perform control flow ?
The sliding window protocol is a method used in networking to control the flow of data packets between two
devices, ensuring efficient and reliable data transfer. The concept involves a "window" that moves or "slides" over a
sequence of data packets, allowing multiple packets to be sent before needing an acknowledgement for the first packet.
Key Concepts:
1. Window Size:
• The window size determines the maximum number of unacknowledged packets that can be in transit at
any given time.
• Both sender and receiver maintain their own windows, typically of the same size.
SK IMTIAJ UDDIN
2. Sender Window:
• The sender can transmit multiple packets (up to the window size) without waiting for an
acknowledgement for each one.
• As acknowledgements are received, the sender window slides forward, allowing more packets to be
sent.
3. Receiver Window:
• The receiver window determines which packets are expected next and can be acknowledged.
• It helps the receiver to manage and buffer incoming packets, allowing for orderly processing and
handling of out-of-order packets.
4. Acknowledgements (ACKs):
• Cumulative ACKs acknowledge all packets up to a certain point.
• Selective ACKs specifically acknowledge individual packets, providing more precise control.
SK IMTIAJ UDDIN
Q.22) Discuss stop and wait ARQ with suitable diagram ? Discuss the operations performed on the following situations :
a) Lost or damaged frame, b) Lost Acknowledgement, c) Delayed Acknowledgement
Stop and Wait ARQ:
b) Lost Acknowledgement
1. Initial Transmission:
• The sender transmits Frame 0.
• The receiver successfully receives Frame 0 and sends an ACK.
2. Lost ACK:
• The ACK gets lost in transit.
3. Timeout and Retransmission:
• The sender does not receive the ACK within the timeout period
and retransmits Frame 0.
• The receiver, recognizing it has already received Frame 0 (possibly using sequence numbers), discards
the duplicate frame but sends another ACK.
Delayed Acknowledgement
1. Initial Transmission:
• The sender transmits Frame 0.
• The receiver successfully receives Frame 0 and sends an ACK.
2. Delayed ACK:
• The ACK is delayed in transit, taking longer than the sender's
timeout period.
SK IMTIAJ UDDIN
3. Timeout and Retransmission:
• The sender does not receive the ACK within the timeout period and retransmits Frame 0.
• The delayed ACK from the first transmission arrives.
• The receiver, recognizing it has already received Frame 0, discards the duplicate frame but may or may
not send another ACK, depending on the implementation.
Q.23) How does Go-back-N-ARQ differ from Selective Repeat ARQ ? What is minimum window requirement for Selective
Repeat ARQ ?
Go-Back-N ARQ:
1. Window Size:
• The sender can send several frames (up to a window size 𝑁N)
before needing an acknowledgement.
• The receiver can only receive frames in sequence. If a frame is
received out of order, it is discarded.
2. Retransmission:
• If a frame is lost or an error is detected, the sender must
retransmit that frame and all subsequent frames in the window.
• This can lead to inefficiencies, especially if only one frame is lost
but several frames are retransmitted.
3. Acknowledgement:
• Cumulative acknowledgements are used. An ACK for frame 𝑘k
implies that all frames up to 𝑘k have been received correctly.
4. Buffering:
• The receiver does not buffer out-of-order frames; it discards them and waits for the retransmission of
the missing frame.
SK IMTIAJ UDDIN
Minimum Window Requirement for Selective Repeat ARQ:
The minimum window size for Selective Repeat ARQ is determined by the sequence number space used to uniquely
identify packets. For Selective Repeat ARQ to function correctly without ambiguity, the minimum window size must be:
where 𝑁 is the total number of unique sequence numbers available in the protocol. This ensures that the sender and
receiver can correctly distinguish between new data and retransmissions of old data.
Q.24) In Go-back ARQ show why window size should be < 2M ? What does the number on NAK Frame mean in Selective
Repeat ARQ ?
In Go-Back-N ARQ, the window size should be less than 2𝑀, where 𝑀 is the number of bits used for the
sequence number. This constraint ensures that the sequence numbers used by the protocol remain unambiguous.
Explanation:
1. Sequence Number Space: If 𝑀 bits are used for the sequence number, the total number of unique sequence
numbers is 2𝑀.
2. Window Size Constraint: The window size (denoted as 𝑁) must be less than 2𝑀 to avoid ambiguities in the
sequence numbers. If the window size were equal to or greater than 2𝑀, it would be impossible to distinguish
between new packets and old packets that are being retransmitted.
3. Ambiguity Issue:
• If the window size 𝑁 were 8 (equal to 23), after sending 8 packets, the sequence numbers would wrap
around, leading to potential confusion between old and new frames.
• Hence, to maintain clarity and avoid ambiguity, the window size should be less than 2𝑀.
In Selective Repeat ARQ, a NAK (Negative Acknowledgement) frame is used to indicate that a specific frame was
received incorrectly (lost or corrupted) and needs to be retransmitted. The number on the NAK frame indicates the
sequence number of the frame that needs to be retransmitted.
Explanation:
• Unlike Go-Back-N ARQ, where a single error leads to the retransmission of all subsequent frames,
Selective Repeat ARQ allows for the retransmission of only the erroneous or lost frames.
2. NAK Frame:
• When the receiver detects an error in a particular frame, it sends a NAK frame back to the sender.
• The number on the NAK frame specifies the sequence number of the frame that needs to be
retransmitted.
• This allows the sender to retransmit only the indicated frame, not affecting the correctly received
frames.
SK IMTIAJ UDDIN
Q.25) What are LLC and MAC ? Why Medium access control techniques are required ?
The Logical Link Control (LLC) is the upper sublayer of the Data Link Layer (Layer 2) in the OSI model. It is
responsible for managing communications between devices over a single link of a network. LLC provides a way to ensure
that data is successfully transmitted and received without errors.
1. Multiplexing: LLC allows multiple network protocols (such as IP, IPX) to coexist within a multipoint network and
be transported over the same network medium.
2. Error Control: LLC ensures that frames are transmitted and received without errors through error detection
mechanisms.
3. Flow Control: LLC manages the rate of data transmission between devices to prevent buffer overflow and ensure
efficient data transfer.
4. Service Access Points (SAPs): LLC uses Service Access Points (SAPs) to identify different network layer protocols
and facilitate multiplexing.
5. Connection-oriented and Connectionless Services: LLC provides both connection-oriented (type 2) and
connectionless (type 1) services. Connection-oriented services ensure reliable communication through
acknowledgements and retransmissions.
The Media Access Control (MAC) is the lower sublayer of the Data Link Layer (Layer 2) in the OSI model. It is
responsible for controlling how devices on a network gain access to the medium and permission to transmit data. MAC
addresses the physical addressing and access control mechanisms of network devices.
Key Functions of MAC:
1. Addressing: MAC uses unique MAC addresses (hardware addresses) to identify devices on a network. Each
network interface card (NIC) has a unique MAC address.
2. Frame Delimiting: MAC defines the frame format, including frame delimiting and addressing, ensuring that
frames are properly formed and interpreted by devices on the network.
3. Media Access Control: MAC determines how data is placed on and taken off the network medium,
implementing protocols such as CSMA/CD (Carrier Sense Multiple Access with Collision Detection) for Ethernet
networks or CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) for wireless networks.
4. Error Detection: MAC includes mechanisms for detecting errors in transmitted frames using techniques such as
cyclic redundancy check (CRC).
5. Control of Data Transmission: MAC manages data transmission over the network, including handling collisions
and retransmissions when necessary.
Medium Access Control (MAC) techniques are essential in network communications for several critical reasons. They
ensure efficient, reliable, and orderly access to the shared transmission medium in networks, preventing conflicts and
ensuring data integrity.
1. Collision Avoidance:
• In networks where multiple devices share the same communication medium (like Ethernet or Wi-Fi),
simultaneous data transmissions can collide, causing data corruption.
• MAC techniques prevent or minimize collisions by coordinating when devices can transmit data.
SK IMTIAJ UDDIN
2. Efficient Utilization of the Medium:
• Without MAC protocols, the medium could be underutilized due to frequent collisions or overutilized
due to uncontrolled access.
• MAC techniques optimize the use of the medium, ensuring that it is used efficiently and effectively.
3. Fair Access:
• MAC ensures that all devices on a network have a fair chance to transmit their data.
• This prevents any single device from monopolizing the medium, ensuring equitable access for all
devices.
4. Data Integrity and Reliability:
• By managing when and how devices access the medium, MAC techniques help maintain data integrity.
• They reduce the likelihood of data collisions and errors, ensuring reliable communication.
5. Scalability:
• MAC techniques allow networks to scale by managing access efficiently as the number of connected
devices increases.
• They support the addition of new devices without significantly degrading network performance.
6. QoS (Quality of Service):
• MAC techniques can prioritize certain types of traffic (e.g., voice or video) to ensure that they receive
the necessary bandwidth and low latency required for proper function.
• This is critical in networks that support multimedia and time-sensitive applications.
7. Support for Different Network Topologies:
• MAC techniques are adaptable to various network topologies such as bus, ring, star, and mesh.
• They ensure that communication protocols work effectively regardless of the physical layout of the
network.
Q.26) Explain ALOHA and Slotted ALOHA ? Analyze the performance of Pure ALOHA ? How does Slotted ALOHA improve
performance over Pure ALOHA ? Compare them ?
ALOHA:
ALOHA is a simple, pioneering protocol for medium access control (MAC) in wireless and wired networks. It was
developed at the University of Hawaii for use in a wireless packet radio network.
Pure ALOHA:
1. Basic Concept:
• A device transmits whenever it has data to send.
• After sending a packet, the device waits for an acknowledgment (ACK) from the receiver.
• If an ACK is received, the transmission is successful.
• If no ACK is received (due to a collision or other reason), the device waits for a random amount of time
before retransmitting the packet.
2. Collisions:
• Collisions occur when two or more devices transmit simultaneously, causing their packets to interfere
with each other.
• Collided packets are lost and must be retransmitted.
SK IMTIAJ UDDIN
3. Efficiency:
• The probability of successful transmission (throughput) is relatively low.
• Maximum throughput is achieved when devices retransmit at a certain optimal rate, resulting in a
maximum throughput of about 18.4% of the channel capacity.
Slotted ALOHA:
Slotted ALOHA improves upon the basic ALOHA protocol by dividing the time into discrete slots, each equal to
the time required to send one packet. This reduces the probability of collisions and improves overall efficiency.
Key Characteristics:
1. Time Slots:
• Time is divided into slots of fixed duration.
• Devices can only begin transmission at the start of a time slot.
2. Collision Reduction:
• By aligning transmissions to start at the beginning of time slots, Slotted ALOHA reduces the chance of
collisions.
• Collisions still occur if two or more devices choose the same time slot to transmit.
3. Efficiency:
• Slotted ALOHA doubles the maximum throughput compared to Pure ALOHA.
• Maximum throughput is about 36.8% of the channel capacity, achieved under optimal conditions where
devices retransmit packets at the best possible rate.
SK IMTIAJ UDDIN
Performance Analysis of Pure ALOHA:
Pure ALOHA is a simple, decentralized MAC protocol used to manage access to a shared communication
medium. It allows devices to transmit whenever they have data, leading to potential collisions when two or more
devices transmit simultaneously.
Throughput and Efficiency:
• The throughput 𝑆 of Pure ALOHA can be analysed by considering the probability of successful
transmission.
• If 𝐺 is the average number of frames generated by the system in one frame time, then
Throughput 𝑆 is given by: 𝑆 = 𝐺 × 𝑒 −2𝐺
• The maximum throughput occurs when 𝐺=0.5, giving:
𝑆max = 0.5 × 𝑒 −1 ≈ 0.184
• This means the maximum throughput is about 18.4% of the channel capacity.
SK IMTIAJ UDDIN
Q.27) Discuss CSMA / CA with the help of flowchart ? Explain CSMA / CD with example ? Distinguish them ?
CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance):
CSMA/CA is a network protocol used to avoid collisions in networks, particularly in wireless LANs (e.g., IEEE
802.11). It works by having devices check the medium for other transmissions before sending their own data.
Key Steps in CSMA/CA:
1. Carrier Sensing:
• A device listens to the channel to check if it is
idle (no other transmissions).
2. Collision Avoidance:
• If the channel is idle, the device waits for a
random backoff period before transmitting to
reduce the chance of collisions.
• If the channel is busy, the device defers its
transmission and waits for another random
backoff period.
3. Acknowledgement:
• After sending a frame, the device waits for an
acknowledgment (ACK) from the receiver.
• If the ACK is received, the transmission is
successful.
• If no ACK is received (indicating a collision or other issue), the device retries after a random backoff
period.
SK IMTIAJ UDDIN
Differences between CSMA/CA and CSMA/CD:
Feature CSMA/CA (Collision Avoidance) CSMA/CD (Collision Detection)
Primary Use Wireless networks (e.g., Wi-Fi, IEEE Wired networks (e.g., Ethernet, IEEE 802.3)
802.11)
Collision Avoids collisions by using random backoff Detects collisions during transmission and stops
Management periods before transmitting and checking transmission upon detection
for idle channel
Efficiency in High More efficient in wireless environments More efficient in wired environments where
Traffic where detecting collisions is challenging collisions can be easily detected
Vulnerability Reduced by dividing time into slots and One frame time (shorter than CSMA/CA because
Period using backoff periods (higher than collisions are detected quickly)
CSMA/CD due to no collision detection)
Retransmission If no acknowledgement is received Retransmits after waiting for a random backoff
(indicating potential collision), waits for period following a collision detection
random backoff period before
retransmitting
Acknowledgement Uses explicit acknowledgements (ACK) to Does not use explicit acknowledgements; relies on
confirm successful receipt of data the absence of collision to assume success
Suitability Suitable for wireless networks where Suitable for wired networks where collisions can
collision detection is impractical due to be easily detected and managed
propagation delay and hidden node
problem
Example Protocols IEEE 802.11 (Wi-Fi) IEEE 802.3 (Ethernet)
Complexity More complex due to the need for Simpler in terms of collision management, but
collision avoidance and acknowledgement requires hardware capable of detecting collisions
mechanisms
Q.28) Why CSMA / CD is not implemented in WLAN ? Describe 802.3 header format ? Why padding is required ?
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is not implemented in WLAN (Wireless Local
Area Networks) for several key reasons related to the physical and operational characteristics of wireless
communication:
Key Reasons Why CSMA/CD is Not Used in WLAN:
1. Hidden Node Problem:
• In wireless networks, two devices that are out of range of each other may both be able to communicate
with a common access point. However, they cannot detect each other's signals directly, leading to
potential collisions at the access point.
• This "hidden node" problem makes collision detection ineffective because a device might not sense a
transmission from another device that is too far away.
2. Signal Attenuation and Interference:
• Wireless signals are subject to significant attenuation and interference from physical obstacles, other
electronic devices, and environmental factors.
• These issues can prevent a device from accurately detecting whether the medium is busy, leading to
unreliable collision detection.
3. Duplex Communication:
SK IMTIAJ UDDIN
• Wireless communication typically uses half-duplex mode, meaning a device cannot transmit and receive
simultaneously.
• CSMA/CD requires the ability to detect collisions while transmitting, which is not feasible in a half-duplex
system where the device cannot listen to the channel during its own transmission.
4. Collision Detection Challenges:
• The nature of wireless communication involves varying signal strengths and potential multi-path effects,
making it difficult to reliably detect collisions based on signal amplitudes.
• This unreliability makes CSMA/CD less effective for ensuring collision-free transmissions.
SK IMTIAJ UDDIN
Q.29) Write short notes on: a) CDMA b) Virtual Private Network (VPN)
CDMA (Code Division Multiple Access):
CDMA is a channel access method used by various radio communication technologies. It allows multiple users to
share the same frequency band by assigning a unique code to each user. This technology is widely used in cellular
networks and other wireless communication systems.
Key Features:
• CDMA uses spread spectrum techniques to spread the data signal over a wide bandwidth. Each user's signal is
spread across the entire bandwidth using a unique spreading code.
• Unique orthogonal codes (such as Walsh codes) are assigned to each user, ensuring that the signals can be
separated at the receiver end without interference.
• CDMA provides high spectral efficiency and can support a large number of users simultaneously on the same
frequency band.
• CDMA inherently manages interference by using unique codes, which helps in distinguishing between different
users' signals and reduces the impact of interference.
• CDMA offers inherent security features as the signals are spread over a wide frequency range, making it difficult
for unauthorized users to intercept or jam the communication.
Applications:
• Cellular Networks: CDMA is widely used in 3G mobile networks, such as CDMA2000 and WCDMA, providing
voice and data services to mobile users.
• Satellite Communications: CDMA is used in some satellite communication systems to allow multiple users to
share the same satellite channel.
Advantages:
• Improved spectral efficiency
• Better resistance to multipath interference
• Enhanced security due to signal spreading
Disadvantages:
• Requires complex synchronization
• Potential for near-far problem, where signals from nearby users can overpower signals from users further away
SK IMTIAJ UDDIN
Applications:
• Corporate Networks: Businesses use VPNs to provide secure remote access to their internal networks for
employees working remotely or from different locations.
• Personal Privacy: Individuals use VPNs to protect their online privacy, bypass geo-restrictions, and access
blocked content.
• Secure Communication: VPNs are used to ensure secure communication over public Wi-Fi networks, protecting
sensitive data from potential threats.
Advantages:
• Enhanced security and privacy
• Remote access to resources
• Protection from data interception on public networks
Disadvantages:
• Potential for reduced internet speed due to encryption and tunnelling overhead
• Reliance on VPN provider's trustworthiness and security measures
• Possible issues with VPN compatibility with certain websites or services
Q.30) Distinguish internet and intranet ? What is Gateways ? Differentiate between hub and switch ?
Aspect Internet Intranet
Definition A global network connecting millions of private, A private network accessible only to an
public, academic, business, and government organization's members, employees, or others
networks. with authorization.
Access Publicly accessible to anyone with an internet Restricted access, typically requiring login
connection. credentials and permission.
Scope Global, connecting multiple networks worldwide. Localized, usually confined to a specific
organization or company.
Use Cases General public use for browsing, email, social media, Internal communication, sharing resources and
online shopping, and more. data within an organization, internal applications.
Security Security risks are higher due to the public nature; More secure as it is private; security measures
requires robust security measures like firewalls, focus on internal threats and unauthorized access.
encryption, and antivirus.
Content Wide variety of content from different sources Specific to the organization, including internal
worldwide. documents, applications, and communications.
Examples World Wide Web, email, online services. Internal company portals, internal email systems,
shared drives.
A gateway is a network node that serves as an access point to another network. Gateways are essential for
communication between networks that use different protocols. They act as translators, converting data from one
protocol to another to enable communication between disparate networks.
Functions of a Gateway:
• Protocol Conversion: Translates data between different network protocols.
• Data Translation: Ensures that data formatted for one network can be understood by another network.
• Security: Often includes firewall capabilities to protect the internal network from external threats.
• Traffic Management: Manages data flow between different networks.
SK IMTIAJ UDDIN
Feature Hub Switch
Function A hub is a basic networking device that A switch is a more advanced device that connects
connects multiple devices in a network and multiple devices and uses MAC addresses to
forwards data to all connected devices. forward data only to the intended recipient.
Layer of Operates at the physical layer (Layer 1) of the Operates at the data link layer (Layer 2) of the OSI
Operation OSI model. model (some switches also operate at the network
layer, Layer 3).
Data Broadcasts data to all ports, regardless of the Forwards data to the specific port that leads to the
Transmission destination. destination device, reducing unnecessary traffic.
Intelligence Simple, no intelligence; does not differentiate Intelligent, can learn and remember the MAC
between devices. addresses of devices on the network to direct data
efficiently.
Efficiency Less efficient, can cause network congestion More efficient, reduces collisions and improves
due to broadcasting. overall network performance.
Collision One collision domain for all connected Each port on a switch has its own collision domain,
Domain devices, leading to higher chances of reducing the chances of collisions.
collisions.
Cost Generally cheaper due to its simplicity. More expensive compared to hubs, but provides
better performance and efficiency.
Use Case Suitable for small, simple networks with low Suitable for larger networks with higher traffic
traffic demands. demands and a need for better performance and
efficiency.
Q.31) Differentiate between IP Address and MAC Address ? Compare IPv4 and IPv6 ? Advantages of ICMP over IPv4 ?
Difference Between IP Address and MAC Address:
Aspect IP Address MAC Address
Definition A logical address assigned to each device on a A physical address assigned to a network
network for identification and communication. interface card (NIC) for unique identification
on a local network.
Format IPv4: 32-bit address (e.g., 192.168.1.1); 48-bit address (e.g., 00:1A:2B:3C:4D:5E).
Scope Operates at the network layer (Layer 3) of the OSI Operates at the data link layer (Layer 2) of the
model. OSI model.
Purpose Identifies devices on a global network, enabling Identifies devices on a local network,
routing of data across multiple networks. facilitating communication within the same
local area network (LAN).
Assignment Assigned by network administrators or automatically Burned into the NIC by the manufacturer;
via DHCP (Dynamic Host Configuration Protocol). unique and permanent.
Changeability Can be changed/configured by network Typically cannot be changed, though some
administrators. NICs allow reprogramming.
Hierarchy Hierarchical, includes network and host components Flat structure, with no inherent hierarchy.
(subnetting in IPv4, prefixes in IPv6).
Example IPv4: 192.168.1.1 00:1A:2B:3C:4D:5E
SK IMTIAJ UDDIN
Difference between IPv4 and IPv6:
Feature IPv4 IPv6
Address Length 32 bits 128 bits
Address Format Dotted decimal (e.g., Hexadecimal (e.g.,
192.168.1.1) 2001:0db8:85a3:0000:0000:8a2e:0370:7334)
Address Space Approximately 4.3 billion Vast address space (2^128 addresses)
addresses
Header Complexity Simple and shorter header More complex and longer header (40 bytes)
(20-60 bytes)
Address Configuration Manual or DHCP Auto-configuration (stateless address autoconfiguration)
Security Optional (IPsec optional) Mandatory (IPsec mandatory)
Support for QoS Limited Improved with Flow Label field
Fragmentation Done by both routers and Done only by sending host
sending host
Checksum Includes header checksum No header checksum
Broadcast Supports broadcast No broadcast, uses multicast
Multicast and Anycast Supports multicast Supports multicast and anycast
NAT (Network Address Commonly used to extend Not necessary due to large address space
Translation) address space
Transition Mechanism No transition needed Requires transition mechanisms (dual stack, tunnelling,
etc.)
Q.32) What do you mean by classful addressing ? What are the advantages of classless addressing over classful
addressing ? What do you mean by netID and hostID ?
Classful Addressing:
Classful addressing is an IP addressing method used in the early stages of IP networking, where the IP address
space was divided into five classes (A, B, C, D, and E) to simplify the allocation of IP addresses. Each class had a fixed
prefix length, which determined the network and host portions of the address.
Classes of IP Addresses:
• Class A: • Class C:
• Range: 0.0.0.0 to 127.255.255.255 • Range: 192.0.0.0 to 223.255.255.255
• Prefix: 8 bits for the network part • Prefix: 24 bits for the network part
• Address format: N.H.H.H (N = Network, H = Host) • Address format: N.N.N.H
• Number of networks: 128 • Number of networks: ~2.1 million
• Number of hosts per network: ~16.7 million • Number of hosts per network: 254
• Class B: • Class D:
• Range: 128.0.0.0 to 191.255.255.255 • Range: 224.0.0.0 to 239.255.255.255
• Prefix: 16 bits for the network part • Used for multicast groups
• Address format: N.N.H.H • Class E:
• Number of networks: ~16,384 • Range: 240.0.0.0 to 255.255.255.255
• Number of hosts per network: ~65,536 • Reserved for experimental purposes
Example Breakdown:
Consider the IP address 192.168.1.10 with a subnet mask 255.255.255.0:
• NetID: The subnet mask 255.255.255.0 indicates that the first 24 bits are the network part. Thus, the netID is
192.168.1.
• HostID: The remaining 8 bits are for the host part. Thus, the hostID is 10.
SK IMTIAJ UDDIN
Q.33) Explain static, dynamic and distance vector routing with suitable examples ?
Routing is the process of selecting paths in a network along which to send network traffic. There are different
types of routing techniques, including static, dynamic, and distance vector routing. Here’s an explanation of each, along
with suitable examples.
Static Routing:
Static Routing is a type of network routing technique where routes are manually configured and entered into the
routing table by a network administrator. Static routes do not change unless they are manually updated.
Example:
• Suppose we have a network with two routers, Router A and Router B. We want to configure Router A to send
traffic destined for network 192.168.2.0/24 through Router B, which has the IP address 192.168.1.2.
Router A (192.168.1.1) -> Router B (192.168.1.2) -> Network 192.168.2.0/24
• We would enter the following static route on Router A:
ip route 192.168.2.0 255.255.255.0 192.168.1.2
• This command tells Router A that to reach the 192.168.2.0/24 network, it should forward packets to Router B at
192.168.1.2.
Advantages:
• Simplicity and predictability.
• Low overhead, no routing protocol required.
Disadvantages:
• Lack of scalability.
• No automatic adjustment for network changes or failures.
Dynamic Routing:
Dynamic Routing is a type of network routing technique where routes are automatically calculated and updated
by routing protocols. Dynamic routing adjusts to changes in the network topology.
Example:
• In a network with multiple routers, dynamic routing protocols like OSPF (Open Shortest Path First) or EIGRP
(Enhanced Interior Gateway Routing Protocol) can be used. These protocols dynamically update the routing
tables based on the current network state.
Router A (192.168.1.1) <-> Router B (192.168.1.2) <-> Router C (192.168.1.3)
• If you enable OSPF on all routers, they will automatically exchange routing information and update their routing
tables to reflect the best paths.
Advantages:
• Scalability, suitable for larger networks.
• Automatic adaptation to network changes and failures.
Disadvantages:
• Higher complexity.
• Consumes more CPU, memory, and network resources due to the routing protocol overhead.
SK IMTIAJ UDDIN
Distance Vector Routing:
Distance Vector Routing is a type of dynamic routing where routers share information about the entire network
by passing copies of their routing tables to their immediate neighbours. Each router uses algorithms like Bellman-Ford to
determine the best path to each destination based on distance metrics, such as hop count.
Advantages:
• Simple implementation.
• Suitable for smaller networks.
Disadvantages:
• Slow convergence.
• Can suffer from routing loops and count-to-infinity problems.
Q.34) What is the purpose of sequence number in TCP segment ? Why is padding required for TCP segment ?
The sequence number in a TCP segment plays a crucial role in ensuring reliable data transmission over the
network. Here are the key purposes:
1. Data Ordering: TCP is a connection-oriented protocol that ensures data is delivered in the correct order. The
sequence number helps the receiver to place incoming segments in the right order, even if they arrive out of
sequence.
2. Flow Control: Sequence numbers are integral to the sliding window mechanism in TCP, which controls the flow
of data between sender and receiver, ensuring that neither is overwhelmed by too much data at once.
3. Acknowledgment: The sequence number is used in conjunction with acknowledgment numbers. When the
receiver acknowledges receipt of data, it uses the sequence number to specify up to which byte it has
successfully received, allowing the sender to manage its retransmission buffer efficiently.
4. Data Integrity and Reliability:
• Reassembly of Segments: TCP segments can be fragmented into smaller packets. The sequence number
allows the receiver to reassemble these segments into the correct sequence.
• Detecting Missing Data: If a segment is lost during transmission, the sequence number helps the
receiver detect the missing segment, allowing for retransmission requests.
In conclusion, the sequence number in a TCP segment ensures data integrity, correct sequencing, and flow control, while
padding ensures proper alignment and processing efficiency, complying with protocol standards.
SK IMTIAJ UDDIN
Q.35) What is congestion ? Why does congestion occurs ? Explain Leaky Bucket algorithm for congestion control ?
Congestion in a network refers to the situation where the demand for network resources exceeds the available
capacity, leading to a performance degradation. In other words, it occurs when too many packets are present in a part of
the network, causing packet delay and loss. Congestion can severely impact the efficiency and reliability of data
transmission in a network.
Congestion occurs due to a variety of reasons, typically related to the imbalance between the offered load and the
network’s capacity to handle it. Here are the key reasons:
1. Excessive Traffic Load: When the volume of data packets being sent through the network exceeds the network’s
capacity to process and transmit them, congestion occurs. This can happen during peak usage times when many
users are accessing the network simultaneously.
2. Insufficient Bandwidth: If the bandwidth of a network link is not sufficient to handle the traffic load, it can lead
to congestion. For example, a slow link between two fast networks can become a bottleneck.
3. Buffer Overflow: Routers and switches have buffers to store packets temporarily. When these buffers fill up due
to high traffic, incoming packets have nowhere to go and are dropped, leading to packet loss and
retransmissions, which exacerbate congestion.
4. Network Topology Changes: Changes in network topology, such as link failures or routing updates, can cause
temporary congestion as packets are rerouted through alternative paths that may not have enough capacity to
handle the additional load.
5. Traffic Bursts: Sudden bursts of traffic can overwhelm network resources. These bursts can be caused by
activities such as large file downloads, streaming media, or distributed denial-of-service (DDoS) attacks.
6. Unfair Resource Allocation: In some cases, certain types of traffic may consume more than their fair share of
network resources, leading to congestion. For example, a single large file transfer can monopolize bandwidth,
causing other traffic to suffer.
7. Inefficient Routing: Suboptimal routing decisions can lead to certain network paths becoming overloaded while
others are underutilized. This imbalance can create congestion on specific links or nodes.
8. Poor Network Design: Inadequate network design, such as insufficient redundancy, lack of proper load
balancing, or under-provisioned links, can contribute to congestion.
Q.36) Describe Quality of Service (QoS) ? Compare Leaky Bucket with Token Bucket Algorithm ?
Quality of Service (QoS):
Quality of Service (QoS) refers to a set of technologies and techniques used in networking to ensure the efficient
and predictable handling of data traffic. The primary goal of QoS is to provide different priority levels for various types of
network traffic, thereby guaranteeing certain performance metrics such as bandwidth, latency, jitter, and packet loss.
QoS Performance Metrics
1. Bandwidth: The maximum rate at which data can be transferred over the network. QoS ensures that critical
applications receive the necessary bandwidth.
2. Latency: The time taken for a packet to travel from the source to the destination. QoS aims to minimize latency
for real-time applications like VoIP or online gaming.
3. Jitter: The variation in packet arrival times. QoS strives to reduce jitter, ensuring a consistent and smooth data
flow for time-sensitive applications.
4. Packet Loss: The percentage of packets that are lost in transit. QoS mechanisms work to minimize packet loss,
ensuring data integrity and reliable transmission.
Benefits of QoS
• Enhanced User Experience: By prioritizing critical traffic, QoS ensures a better experience for users of latency-
sensitive applications.
• Efficient Resource Utilization: QoS optimizes the use of network resources by managing traffic flows and
preventing congestion.
• Network Reliability: Improved control over traffic helps maintain network stability and reliability, especially
during peak usage times.
Q.37) Discuss the methods of closed loop congestion control ? Compare key agreement with key distribution protocol ?
Closed-loop congestion control refers to a set of techniques used in computer networks to manage and alleviate
congestion based on feedback mechanisms. Here are some methods commonly employed:
1. Explicit Congestion Notification (ECN):
• ECN allows routers to notify the sender of congestion by setting a flag in the packet header.
• Upon receiving an ECN-marked packet, the sender can reduce its transmission rate to alleviate
congestion.
• ECN provides early indications of congestion without requiring packet loss.
2. Random Early Detection (RED):
• RED randomly drops packets when a router's queue exceeds a certain threshold.
• It aims to signal congestion before the queue becomes completely full, helping to prevent packet loss
and alleviate congestion.
• RED parameters, such as minimum and maximum thresholds, determine the drop probability.
3. Active Queue Management (AQM):
• AQM algorithms actively manage router queues to prevent congestion and ensure fair resource
allocation.
• Along with RED, AQM includes algorithms like Random Early Congestion Avoidance (RECA) and Adaptive
RED (ARED).
• AQM monitors queue lengths and adjusts parameters dynamically to maintain stable network
performance.
4. Window-based Congestion Control (e.g., TCP Congestion Control):
• Transport layer protocols like TCP use window-based congestion control mechanisms.
• TCP dynamically adjusts its congestion window size based on network conditions, such as packet loss
and round-trip time.
• TCP congestion control algorithms include Slow Start, Congestion Avoidance, Fast Retransmit, and Fast
Recovery.
SK IMTIAJ UDDIN
Participants Two or more parties involved in establishing Involves a trusted Key Distribution Centre (KDC) or
the shared secret key. Certificate Authority (CA) and multiple entities
requesting keys.
Security Provides forward secrecy; compromising Relies on the security of the trusted entity (KDC or
one session's key does not compromise past CA) to prevent unauthorized key access or
or future keys. manipulation.
Examples Diffie-Hellman (DH), Elliptic Curve Diffie- Kerberos, Public Key Infrastructure (PKI).
Hellman (ECDH).
Use Cases Secure communication between two or Establishment of secure communication channels
more parties without a pre-shared secret. in complex networks with multiple entities.
Cryptographic Involves mathematical operations, such as Relies on encryption, digital signatures, and
Operations exponentiation or elliptic curve point authentication mechanisms.
multiplication.
Dependencies Typically relies on the computational Requires trust in the security and integrity of the
difficulty of mathematical problems (e.g., trusted entity (KDC or CA).
discrete logarithm).
SK IMTIAJ UDDIN
Q.39) Why do we need DNS system ? What is inverse domain ?
The Domain Name System (DNS) is a crucial component of the internet infrastructure that translates human-
readable domain names into IP addresses. Here's why we need the DNS system:
1. Human-Readable Addresses: DNS allows users to access websites and services using easy-to-remember domain
names (e.g., www.example.com) instead of complex IP addresses (e.g., 192.0.2.1).
2. Centralized Management: DNS provides a hierarchical and distributed database system that centralizes the
management of domain names and IP addresses, making it easier to administer the internet's addressing
system.
3. Scalability: With the growth of the internet, the number of domain names and IP addresses has increased
significantly. DNS ensures scalability by efficiently mapping domain names to IP addresses, handling billions of
requests worldwide every day.
4. Redundancy and Load Distribution: DNS supports redundancy and load distribution by allowing multiple servers
to host DNS records for a domain. This redundancy ensures high availability and fault tolerance.
5. Localization and Content Delivery: DNS can be used to route users to geographically closer servers or content
delivery networks (CDNs), optimizing performance and reducing latency for users accessing content from
different locations.
6. Security: DNS plays a crucial role in cybersecurity by providing mechanisms such as DNSSEC (DNS Security
Extensions) to authenticate and verify DNS responses, preventing DNS spoofing and other attacks.
7. Dynamic IP Assignment: DNS enables dynamic IP assignment by associating domain names with dynamic IP
addresses that change over time, allowing services with dynamic IP addresses to remain accessible.
Inverse Domain:
While DNS primarily maps domain names to IP addresses (forward DNS resolution), inverse DNS resolution maps
IP addresses to domain names. The inverse domain is a hierarchical domain structure used for reverse DNS lookups.
For example, given an IP address like 192.0.2.1, reverse DNS resolution would return the corresponding domain name,
such as example.com. Reverse DNS is commonly used for various purposes, including:
• Network troubleshooting and diagnostics: Identifying the domain associated with an IP address can help
diagnose network issues or trace the origin of traffic.
• Spam filtering: Some email servers use reverse DNS to verify the authenticity of email senders, reducing spam
and phishing attempts.
• Security logging: Reverse DNS can be used to log the domain names associated with IP addresses in security
logs, aiding in forensic analysis and incident response.
SK IMTIAJ UDDIN
• Various extensions like MIME (Multipurpose Internet Mail Extensions) for multimedia content and SPF (Sender
Policy Framework) for email authentication enhance the functionality and security of SMTP.
• SMTP ensures the reliable delivery of email messages by implementing mechanisms like message queuing, error
handling, and delivery status notifications (DSN).
• SMTP is widely adopted and interoperable across different email systems and platforms, enabling seamless
communication between diverse email clients and servers.
Cryptography:
Cryptography is the practice and study of techniques for securing communication and data against adversaries.
Cryptography is essential for securing sensitive information, ensuring privacy, and maintaining trust in digital
communication and transactions.
Encryption: Cryptography involves the process of encryption, which transforms plaintext (readable data) into ciphertext
(unreadable data) using algorithms and keys. This ensures confidentiality, meaning only authorized parties can access
the original data.
Decryption: The reverse process of encryption, decryption, transforms ciphertext back into plaintext using the
appropriate decryption key. Decryption allows authorized parties to recover the original data.
• Types of Cryptography:
• Symmetric Cryptography: Uses the same key for both encryption and decryption. Examples include DES
(Data Encryption Standard), AES (Advanced Encryption Standard), and 3DES (Triple DES).
• Asymmetric Cryptography: Uses pairs of public and private keys for encryption and decryption.
Examples include RSA (Rivest-Shamir-Adleman), ECC (Elliptic Curve Cryptography), and Diffie-Hellman
key exchange.
• Hash Functions: Generate fixed-size output (hash) from variable-size input (message). Hash functions
like SHA-256 (Secure Hash Algorithm) are used for data integrity verification and digital signatures.
SK IMTIAJ UDDIN
Applications:
• Secure Communication: Cryptography ensures secure communication over insecure channels, such as the
internet, by encrypting data transmitted between parties.
• Data Integrity: Cryptographic hash functions verify data integrity by generating a hash value for a message. Any
alteration to the message will result in a different hash value, indicating tampering.
• Authentication: Cryptography enables authentication mechanisms like digital signatures, where the sender signs
a message with their private key, allowing the recipient to verify the sender's identity using the corresponding
public key.
• Non-repudiation: Cryptographic mechanisms ensure non-repudiation by providing proof of the origin and
integrity of transmitted data, preventing senders from denying their actions.
SK IMTIAJ UDDIN
ASSIGNMENT-3
Twisted pair cable: As the name suggests these are two twisted pairs of cables or wires
made up of insulated copper. These are twisted together in such a way
that they run parallelly one wire is used for the transmission of data and the other wire
is used for ground. Usually, these wires or cables are 1mm in diameter. The twisted-pair
cable is made up of 2 copper wires (insulated) arranged in a spiral pattern. Noise
interference is more often the problem in these cables but it can be handled by
increasing the number of turns per foot of twisted pair cable.
Working of twisted-pair cables: The twisted-pair cable has an outer jacket that keeps the
wires together, a shield for the protection of the cable, color-
coded plastic insulation to uniquely identify each conductor,
and twisting of wires to cancel the electromagnetic waves that
create noise interferences during the transmission of data.
SK IMTIAJ UDDIN 9
ASSIGNMENT-3
Connectors: The most common UTP connector is RJ45 (Here, RJ stands for registered jack),
(There are two types of RJ45 male and RJ45 female cable). RJ45 is a keyed connector, which
means that the connector can be connected in only one way.
Advantages:
• These cables are cheaper.
• The maintenance cost is low.
• It doesn’t require any ground wire.
Disadvantages:
• The transmission rate of data is slow.
• Noise is high in these cables.
Advantages:
• The transmission rate of data is fast.
• Noise is slow in these cables.
Disadvantages:
• These cables are costlier.
• The maintenance cost is higher.
• It requires ground wire.
Co-axial cable: The most common type of transmission media that is used in various
applications like tv wires and ethernet connection setup also. This is a form of transmission
media that consists of two conductors kept parallel to
each other. It has a central core conductor of a solid
copper wire enclosed in an insulating sheet and the
middle core conductor is made up of copper mesh and
lastly an outer metallic wrap that helps in noise
cancellation. The whole cable is covered and protected
by a plastic cover.
SK IMTIAJ UDDIN 10
ASSIGNMENT-3
Working of Coaxial Cables: Coaxial cables are made up of copper wires for carrying higher
frequency signals this wire is covered with an insulated foil cover whenever current flows it
maintains a constant distance between the conductor and the next layer and then a
shielded wire that prevents the interference of noise in between the transmission and at
last the plastic cover that protects the whole cable from any outer disturbances.
Advantages:
• The cost of coaxial cables is less as compared to fiber optic cables.
• It has a higher data transmission rate.
• It can be used in both analog and digital transmissions.
Disadvantages:
• The size of these cables is usually bulky because of various layers of metal as well as
copper and plastic.
• For long distances, the cost of these cables will be higher.
• The data transmission over long distances is poor.
Fiber-optic cables: Also known as optic fiber cables are highly efficient and advanced data
transmission cables that allow the transfer of data in a
very large volume. Fiber optic cables allow data
transmission with the help of electrical signals. These are
thin pipes made up of glass or plastic known as optic
fibers and data or information flows via light in these
cables. With higher bandwidth and high-quality
performance optic fiber cables are best suited for long- distance data transfer and
communication.
SK IMTIAJ UDDIN 11
ASSIGNMENT-3
Advantages
• Long durability: These have long durability of almost 100 years.
• Low cost: Due to the cheaper cost these cables are in high demand usually of more use.
• Greater bandwidth and speed: Higher speed and great bandwidth help in faster and
even smoother data transmission.
• Light signals: In the same fiber cable light signals of one fiber and the other do not
interfere with each other which is not the case with other cables.
Disadvantages
• Delicacy: Fibre-optic cables are more delicate as compared with copper wires. If bent
too much these cables can be damaged easily.
• Installation Cost: The installation process is cost-effective as it requires machines and a
specialist team for the setup of the fiber cables.
• Low power: Since data flows via light in these cables power supply is limited, and for
high-power emitters cost would be more.
SK IMTIAJ UDDIN 12
ASSIGNMENT - 2
SK IMTIAJ UDDIN 5
ASSIGNMENT - 2
SK IMTIAJ UDDIN 6
ASSIGNMENT - 2
SK IMTIAJ UDDIN 7
ASSIGNMENT - 2
SK IMTIAJ UDDIN 8