0% found this document useful (0 votes)
8 views2 pages

compnetecxam2ct

The document covers the Data Link Layer, detailing design issues, services, framing methods, error control strategies, and elementary data link protocols. It discusses various protocols like Stop-and-Wait ARQ, Sliding Window, HDLC, and PPP, highlighting their functionalities and efficiency in communication. Additionally, it addresses channel allocation problems and multiple access protocols, including ALOHA, CSMA, and CDMA, emphasizing their application in network environments.

Uploaded by

theglitch236
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

compnetecxam2ct

The document covers the Data Link Layer, detailing design issues, services, framing methods, error control strategies, and elementary data link protocols. It discusses various protocols like Stop-and-Wait ARQ, Sliding Window, HDLC, and PPP, highlighting their functionalities and efficiency in communication. Additionally, it addresses channel allocation problems and multiple access protocols, including ALOHA, CSMA, and CDMA, emphasizing their application in network environments.

Uploaded by

theglitch236
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Data Link Layer (Slides 5–29) | (Slides 5–6) Design Issues – Reliable, efficient communication between adjacent machines

on wire-like channels. Key: provide service to Network Layer, framing, error


control, flow control | (Slides 8–14) Services – 1) Unacknowledged Connectionless: no ACKs/retries, used in LANs, real-time traffic. 2) Acknowledged Connectionless: each frame ACKed, used in wireless,
may cause duplicates if ACK lost. 3) Acknowledged Connection-Oriented: connection setup required, frames numbered, reliable & ordered delivery | (Slides 15–16) Framing – Encapsulate packets into
frames for error localization. Frame = header + payload + (optional) trailer. Main task: mark frame boundaries | (Slide 17) Byte Count – Header includes length. Error in count causes loss of sync. Rarely
used | (Slides 19–21) Byte Stuffing – FLAG=01111110, ESC=00011011. ESC inserted before FLAG/ESC in data. Receiver removes 1st ESC of every ESC pair | (Slides 22–23) Bit Stuffing –
FLAG=01111110 used to mark frame. After 5 consecutive 1s in data, insert 0. Receiver removes stuffed 0s. Encoding-independent | (Slides 27–28) PHY Encoding – e.g., Manchester: 1=high→low,
0=low→high, invalid transitions (high-high, low-low) used to detect frame ends. Doubles bandwidth | (Slide 29) Framing Methods – 1) Byte Count 2) Byte Stuffing 3) Bit Stuffing 4) PHY Encoding
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
Error Control: Error Detection and Correction (Slide 32 - 64) | (Slides 32–33) Types of Errors – Isolated (single-bit, random) vs Bursty (multiple adjacent bits). Bursty errors are localized but harder to
correct | (Slides 33–34) Two Strategies – Error Correction: add redundancy to reconstruct data (e.g., Hamming, convolutional, RS, LDPC). Error Detection: detect error, request retransmission (e.g., parity,
CRC) | (Slides 35–36) Hamming Distance – Number of differing bit positions. Code's min Hamming distance H determines error detection/correction capability: correct d errors → H ≥ 2d+1; detect d errors
→ H ≥ d+1 | (Slide 38) Example – Code with H=5 can correct up to 2 errors. If more errors occur, wrong correction may happen | (Slide 39) Minimum r for m-bit Hamming Code – To correct 1-bit errors:
m+r+1 ≤ 2^r | (Slide 40–41) Hamming Code – Optimal single-error correcting code. For m=7, r=4 → total bits = 11 | (Slides 42–43) Hamming Code Construction – r-bits at 2^positions (1,2,4,8...), others are
data. Each r-bit checks parity over bits where its bit is 1 in position's binary | (Slide 44) Example – m=4 data 1011 → with even parity, final code is 0110011 | (Slide 45) Error Syndrome – Detect error
location by recomputing parity bits. If parity results = 101 → error at position 5 | (Slide 46) Convolutional Codes – Continuous stream flows through registers; parity bits generated from overlapping
positions. Stronger but harder to decode | (Slide 47) RS and LDPC – RS uses polynomial interpolation; LDPC is sparse and efficient for large blocks | (Slide 48–49) Error Detection – Used in low-error
channels (e.g., fiber). Detection sufficient if errors are rare. Codes: parity, checksum, CRC | (Slide 51) Parity Bit – Adds 1 bit to make total 1s even/odd. Detects single-bit errors. Distance = 2. Can miss
even-numbered burst errors | (Slides 54–55) 2D Parity – Adds parity per row and column. Detects bursts ≤ n bits. Probability of undetected error ≤ 2^(-n) | (Slides 57–58) CRC – Data treated as binary
polynomial. Divide by generator polynomial; remainder is CRC. Sent in trailer. Receiver checks if remainder is 0 | (Slide 61) CRC Power – CRC with r bits detects all bursts ≤ r and most longer ones. IEEE
standards: CRC-8, CRC-16, CRC-32 | (Slide 64) CRC in Trailer – Allows CRC to be computed while transmitting. If in header, would require preprocessing the entire frame first | (Slide 65) Summary –
Correction for noisy links; detection for clean ones. Use Hamming, RS, CRC, parity depending on scenario
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
Elementary Data Links Protocols (Slide 66 – 116) | (66–68) Overview of Data Link Protocols: Data link protocols include Stop-and-Wait ARQ, Sliding Window (Go-Back-N and Selective Repeat), HDLC,
PPP, and protocol verification via FSMs and Petri Nets. | (69–71) Stop-and-Wait ARQ Basics: Stop-and-Wait ARQ sends one frame at a time and waits for an ACK before sending the next. It handles loss
using timeouts and retransmissions. 1-bit sequence numbers prevent duplicates. | (72–75) Handling Losses in Stop-and-Wait: Stop-and-Wait ARQ handles normal delivery, lost frames, lost ACKs, and
delayed ACKs. The protocol is designed to self-recover from these situations using timeouts and sequence checking. | (82–84) Bidirectional Flow & Piggybacking: Bidirectional communication supports
full-duplex. Piggybacking: ACK is sent along with the next outgoing data frame. A piggyback timeout is used to avoid waiting too long to send ACKs. | (85–86) ACK Format and Timeout Handling: ACKs are
fields in the header, not standalone frames. If there's no data to piggyback on, a standalone ACK must be sent after timeout. | (88–89) Timeout Duration Formula: Timeout formula to prevent premature
retransmissions: T > 2F/C + 2P + R + Tp. F: frame size, C: channel rate, P: propagation delay, R: processing time, Tp: piggyback timeout. | (90–91) Stop-and-Wait Efficiency Issues: Stop-and-Wait suffers
low efficiency on long-delay links. Efficiency formula: Efficiency = L / (L + B·R). Pipelining improves channel utilization. | (92) Pipelining Concept: Pipelining involves sending multiple frames before waiting
for ACKs. Frames in flight fill the pipeline delay. | (93–95) Sliding Window Protocol Overview: Sliding Window: sender and receiver use windows to track sent and expected frames. Window slides forward
as ACKs are received. Sequence numbers are modulo M. Sender window: unacknowledged frames. Receiver window: accepted in-order frames. | (96–99) Window Control Variables: Sender and receiver
windows move based on control variables: S = last frame sent, R = next expected frame, SF = first unacknowledged frame, SL = last frame in window. | (100) Error Recovery Approaches: Errors during
pipelining are handled using Go-Back-N or Selective Repeat. | (101–102) Go-Back-N ARQ: Go-Back-N: receiver only accepts in-order frames. On error, sender retransmits all frames from the missing one
onward. | (103–104) Selective Repeat ARQ: Selective Repeat: receiver buffers out-of-order frames and sends NACKs for missing ones. Only erroneous frames are retransmitted. | (108–109) Comparison:
GBN vs Selective Repeat: Go-Back-N: lower receiver memory, more retransmissions. Selective Repeat: better efficiency, more buffer needed. To avoid ambiguity, window size ≤ half of sequence number
space. | (110–113) Protocol Verification with FSMs: Finite State Machines (FSMs) verify protocol correctness. States represent sender/receiver/line status. FSM transitions help catch design flaws (e.g.,
incorrect delivery order). | (114–116) Protocol Verification with Petri Nets: Petri Nets represent states (places), events (transitions), and conditions (tokens). They model concurrent actions and validate
protocols like Stop-and-Wait ARQ.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
Data Links Protocols In Practice (Slide 117 - 137) | (117–118) Practical Protocols: Theoretical protocols are simple, but real protocols like HDLC and PPP add features such as framing, control signaling,
error detection, and sometimes flow control. HDLC is bit-oriented; PPP is byte-oriented. | (119–120) HDLC Frame Format: HDLC uses bit-oriented framing. Frame structure: Flag (01111110), Address
(destination), Control (seq. numbers + ACK), Payload, FCS (CRC). Bit stuffing is used to avoid flag imitation in data. | (121) Bit Stuffing: Sender inserts a 0 after every five consecutive 1s in the data.
Receiver removes the 0 after seeing five 1s. Prevents flag duplication. | (122) HDLC Field Summary: Standard HDLC format (Flag–Address–Control–Data–FCS–Flag) enables reliable, full-duplex
transmission. | (123–124) HDLC Frame Types: I-frames (data + sequence numbers), S-frames (ACKs and flow control: RR, RNR, REJ, SREJ), U-frames (control: reset, setup, teardown). Each type uses
different control fields. | (125–127) Control Field Details: I-frames have N(S), N(R) for sequencing. S-frames acknowledge using N(R) and type bits. U-frames use 6-bit control codes for management (e.g.,
disconnection). | (128) HDLC in Practice: Used in synchronous point-to-point links. Provides reliability with CRC and ACK-based recovery. | (129) Data Link Layer in the Internet: Internet links vary;
Ethernet is used in LANs, PPP on serial links. Each link handles its own framing and delivery. | (130) Introduction to PPP: PPP is simpler than HDLC, supports many protocols (IP, IPX, etc.). Includes
framing, CRC, and option negotiation, but no reliable delivery (no sequence numbers). | (131–132) PPP Frame Format: Similar to HDLC but uses byte stuffing. Frame: Flag, Address, Control, Protocol,
Payload, FCS. Byte stuffing adds ESC before FLAG or ESC in payload. | (133–134) PPP Protocol Field: Protocol field identifies packet type (e.g., IP, LCP, NCP). Allows multiplexing many protocols over
one link. | (135–136) PPP Link Control: LCP handles link setup and teardown. Negotiates options (auth, compression), manages the link, and supports error detection. | (137) PPP Operation Example:
PPP phases: 1) Link Establishment, 2) Authentication, 3) Network Layer Setup (NCP), 4) Data Transfer, 5) Termination.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
The Channel Allocation Problem (Slide 6-20) | Channel Allocation Problem (6–7): Channel allocation is about how to fairly and efficiently share a single broadcast channel among multiple users. Static
methods like FDM and TDM allocate fixed resources regardless of actual usage, while dynamic methods adjust access based on current demand, which is better for bursty or unpredictable traffic. | Static
Allocation – FDM & Voice Example (8–10): FDM splits the total channel bandwidth into N equal subchannels. Each user gets one, eliminating collisions but wasting bandwidth when users are idle. In voice
applications, signals are shifted into different frequency bands before being combined. FDM is inefficient when user count is variable or traffic is bursty. | FDM Performance – Delay (11–13): In a single
shared queue, delay is T = 1 / (μC - λ). Example: 100 Mbps channel, 10,000-bit frames, λ = 5000 frames/sec → T = 200 µs. With N queues (each user gets C/N), delay becomes T_FDM = N / (μC - λ), which
is significantly worse than shared access. | Static Allocation – TDM (14): TDM gives each user a recurring time slot. Slots are wasted if users are idle. Like FDM, it performs poorly with bursty traffic. |
Dynamic Allocation Intro (15): Dynamic channel allocation is the foundation of MAC protocols. Unlike static methods, MAC protocols adapt based on traffic conditions and station behavior. Their design is
based on several key assumptions. | MAC Assumptions (16–20): (1) Station Model: N independent stations generate frames at random times and block until transmission. (2) Single Channel: All stations
use the same shared channel. (3) Collision Model: Overlapping transmissions result in collisions and data loss. (4) Time: Can be continuous (transmit anytime) or slotted (transmit only at slot boundaries).
Slotted time reduces collisions. (5) Carrier Sense: Some protocols allow stations to listen before transmitting (common in wired links); others do not (common in wireless).
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
Multiple Access Protocols (MAC Protocols) (Slide 21 - 74) | Multiple Access Protocols (21–22): Introduces MAC protocols for controlling access to a shared channel. These include random access,
collision-free, and limited-contention approaches. | ALOHA Protocol (23–32): Pure ALOHA sends whenever a frame is ready, which leads to many collisions. Its efficiency is only 18%. Slotted ALOHA
improves this by aligning transmissions to time slots, halving the vulnerable period and increasing efficiency to 37%. | Carrier Sense Multiple Access (37–45): CSMA improves on ALOHA by sensing the
channel before sending. Variants include persistent, non-persistent, and p-persistent CSMA. Propagation delay can still cause collisions. CSMA achieves higher throughput but may introduce delays. | CSMA
with Collision Detection – CSMA/CD (46–50): Adds the ability to detect collisions and abort transmission immediately. Reduces wasted bandwidth. Widely used in Ethernet. Effective but less applicable in
wireless networks due to detection limitations. | Collision-Free Protocols (52–55): Bit-Map protocol reserves slots by sending a 1-bit signal in order. Eliminates collisions but may cause delay. Used where
deterministic access is needed. | Binary Countdown (59–61): Stations send address bits simultaneously. Higher-numbered stations have priority. Efficient and scalable with address reuse. Provides 100%
efficiency if implemented correctly. | Limited-Contention Protocols (62–65): Combine random access (low delay at low load) and collision-free methods (better at high load). Adaptive protocols adjust
contention dynamically to optimize performance. | Adaptive Tree Walk Protocol (66–67): Uses a binary tree structure to limit contention. On collision, only subgroups compete in the next slot. Reduces
retries and improves channel usage. | MAC in Wireless Networks – Problems & MACA (68–74): CSMA techniques fail in wireless due to hidden/exposed terminal issues. MACA solves this by using
RTS/CTS signaling to inform nearby nodes and avoid collisions. Random backoff is used after failed attempts.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
Mac In Practice: Ethernet (Slide 76 - 100) | Channel Allocation Using CDMA (76–78): CDMA allows multiple users to transmit over the same channel using orthogonal codes. Each sender encodes data
with a unique chip sequence. Receivers use the same code to decode intended messages. | CDMA Example (79–81): In a 3-user example, binary data is spread using unique codes (e.g., [1 1 1 1], [1 -1 1 -
1]). The sum of all transmissions is received. The receiver extracts each user’s data by correlating with their code. | CDMA Advantages & Properties (82–85): Supports many users with minimal interference
if codes are orthogonal. Decentralized access, robust against interference, and no central coordination needed. However, code design and synchronization are complex. | LAN Protocols – Ethernet (86–
88): Ethernet is a popular LAN protocol using CSMA/CD. Standard frame format includes destination, source, type, data, and CRC. Operates at 10 Mbps over coaxial cable originally, now mostly twisted pair.
| Ethernet Cabling (89–90): Modern Ethernet uses twisted-pair cabling (Cat 5e/6). Common topologies include star (via switches) and bus (older). Maximum cable lengths vary by standard. | Fast Ethernet
and Gigabit Ethernet (91–94): Fast Ethernet (100 Mbps) and Gigabit Ethernet (1000 Mbps) improved throughput. Gigabit Ethernet uses full duplex and switches, eliminating CSMA/CD. | MAC Sublayer
Responsibilities (95–97): The MAC sublayer handles addressing, channel access (e.g., CSMA/CD), and frame encapsulation. Works below the LLC (Logical Link Control) which provides reliability and flow
control. | Manchester Encoding (98–99): A clock is embedded in the data stream. 1 = high to low, 0 = low to high. Ensures regular transitions for synchronization. Doubles bandwidth requirements. |
Summary of MAC Protocols (100): Covers ALOHA, CSMA, CSMA/CD, token-based protocols, collision-free and limited-contention protocols, CDMA, and Ethernet. Each suits different network conditions.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
Wireless Lans (Slide 101 - 114) | Wireless LANs (101–102): Wireless LANs (WLANs) allow mobile users to connect without cables. Challenges include interference, fading, and collisions. Common
standards: IEEE 802.11. | 802.11 Protocol Stack (103): Similar to OSI but tailored for wireless. Includes physical layer (PHY), MAC sublayer, and LLC. The MAC handles access control; PHY deals with
modulation and transmission. | 802.11 MAC Protocol Basics (104–107): Uses CSMA/CA (Collision Avoidance) instead of CSMA/CD due to difficulty in detecting collisions. Implements DIFS, backoff timers,
and optional RTS/CTS to reduce hidden terminal issues. | Fragmentation (108): Breaks large frames into smaller pieces to reduce retransmission cost due to interference. Each fragment is acknowledged
separately. | MAC Protocol Continued (109): Adds NAV (Network Allocation Vector) to block other transmissions during ongoing communication. Helps prevent collisions. | 802.11 Frame Structure (110):
Frame includes fields like Frame Control, Duration, Addresses, Sequence Control, Payload, and FCS. Designed for efficient wireless delivery. | Frame Fields (111–112): Control fields specify frame type,
to/from distribution system, retry, power management, etc. Sequence control helps with ordering and avoiding duplication. | 802.11 Services (113–114): Includes association, disassociation, authentication,
deauthentication, and roaming. These services maintain connectivity and manage user mobility.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
Bluetooth (Slide 115 - 122) | Bluetooth Overview (115–117): Bluetooth is a short-range wireless technology designed for low-power communication. It operates in the 2.4 GHz ISM band using frequency
hopping (FHSS). Used for connecting personal devices like headsets, keyboards, and more. | Bluetooth Applications (118): Applications include wireless headsets, file exchange, input devices, IoT
gadgets, and personal area networks. Designed for low bandwidth and energy-efficient communication. | Bluetooth Architecture (119): Devices form a piconet: one master, up to seven active slaves.
Multiple piconets can interconnect as a scatternet. Master manages timing and frequency hopping. | Bluetooth Protocol Stack (120): Stack includes radio layer, baseband, LMP (Link Manager), L2CAP,
and application protocols. Provides services like device discovery, link setup, and secure data transport. | Radio Layer (121): Defines modulation (GFSK), transmission power levels, and frequency hopping
over 79 1-MHz channels to reduce interference. | Bluetooth 5 Features (122): Bluetooth 5 increases range, speed (up to 2 Mbps), and broadcasting capacity. Supports mesh networking and improved
reliability for IoT applications.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------Lan Networking: Data Link Layer Switching (Slide 123 - 138) | Data Link Layer Switching (123–124): Switches forward frames at the Data Link Layer based on MAC addresses. Offer
better performance than hubs by reducing collisions and isolating traffic. | Learning Bridges (125–128): Bridges learn MAC address locations by examining source addresses of incoming frames. They build
a forwarding table dynamically. Unknown destination → broadcast. | Forwarding Table Logic (129): When a frame arrives, lookup destination MAC in table. If found, forward only to corresponding port. If
not, broadcast. Learning continues from new traffic. | Spanning Tree Protocol – Motivation (130): Prevent loops in bridged networks. Without control, loops cause broadcast storms. Spanning Tree disables
certain links to ensure a loop-free topology. | Spanning Tree Protocol Operation (131–133): Builds a tree rooted at one switch (root bridge). Switches exchange BPDUs to decide on designated ports. Ports
not on the tree are disabled. Tree adapts to topology changes. | Network Devices Overview (134–137): Repeaters regenerate signals, hubs broadcast to all ports. Bridges and switches operate at Data Link
Layer using MAC addresses. Routers work at the Network Layer, using IP addresses. Gateways translate protocols between different layers or architectures. | LAN Summary (138): LAN internetworking
uses bridges and switches to connect segments. Spanning Tree ensures loop-free operation. Devices operate at different layers for performance and compatibility.
Basic Ideas about Data Link Layer and MAC Sublayer
The Data Link Layer ensures reliable, efficient communication between machines over a physical channel. It offers services to the Network Layer like framing, error detection/correction, and flow control.
The MAC Sublayer (part of the Data Link Layer) handles channel access in shared mediums and varies in implementation for wired vs wireless networks.
Error Correction/Detection, Hamming Code:
Error handling at the Data Link Layer uses either error detection or error correction. Error detection (e.g., parity, checksums, CRC) is used on reliable links where retransmission is possible. Error correction,
like Hamming Code, adds redundancy so the receiver can correct errors without needing a retransmission—important for noisy channels like wireless. The Hamming Distance between two codewords is the
number of bit positions in which they differ. To detect d errors: H ≥ d + 1. To correct d errors: H ≥ 2d + 1. To determine the minimum number of check bits r for m data bits: 2^r ≥ m + r + 1. A typical Hamming
(7,4) code uses 4 data bits and 3 parity bits to correct any single-bit error.
Data Link Protocols:
Stop-and-Wait ARQ is the simplest reliable protocol. It sends one frame at a time and waits for an ACK before sending the next. It uses a 1-bit sequence number to distinguish between old and new frames. If
the ACK is lost or delayed, a timeout triggers retransmission. This method is reliable but inefficient on long-delay channels. Efficiency = L / (L + B·R), where L = frame size in bits, B = bandwidth, and R =
round-trip propagation delay. Sliding Window Protocols improve efficiency by allowing multiple frames in-flight. Go-Back-N retransmits from the error onward, while Selective Repeat retransmits only missing
frames. If n bits are used for sequence numbers, the sequence space is M = 2^n. For Selective Repeat, the window size must be W ≤ floor(M / 2).
MAC Protocols:
ALOHA allows stations to transmit whenever they have data. For Pure ALOHA: S = G·e^(-2G), with max efficiency ~18%. For Slotted ALOHA: S = G·e^(-G), with max efficiency ~37%. CSMA improves on
ALOHA by sensing the channel before sending. Variants include 1-persistent, non-persistent, and p-persistent. CSMA/CD (used in Ethernet) adds collision detection and aborts transmission on collision. To
avoid repeated collisions, Ethernet uses Binary Exponential Backoff: after i collisions, wait for a random number of slots from [0, 2^i - 1], up to 16 attempts. Collision-free protocols like Bit-Map and Binary
Countdown avoid collisions altogether but require coordination or favor high address numbers.
MAC in Wireless Networks:
Collision detection in wireless is unreliable due to signal strength variation. Instead, MACA (Multiple Access with Collision Avoidance) is used. A sender first sends an RTS (Request to Send), the receiver
replies with a CTS (Clear to Send), and only then the data is transmitted. This mechanism helps avoid hidden terminal (e.g., A and C can't hear each other but both send to B) and exposed terminal
problems.
MAC in Practice:
Ethernet frames contain a preamble, destination and source MAC addresses, type/length, payload (46–1500 bytes), and a 32-bit CRC. To ensure collisions are detected, minimum Ethernet frame size ≥ 2
× Propagation Time × Bandwidth. In practice, this is set to 64 bytes (512 bits). Ethernet uses CSMA/CD with Binary Exponential Backoff to reduce the likelihood of repeated collisions.
LAN Internetworking:
Spanning Tree Protocol (STP) prevents loops in switched networks by computing a loop-free subset of links. Switches exchange BPDUs to elect a root bridge. All paths to the root are calculated, and
redundant paths are blocked. This maintains a loop-free topology that adapts when links fail or are added.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------
Q1. (Bit Stuffing) What is the destuffed version of the bitstream 011001111100111101111101?
To destuff a bitstream, search for every sequence of five consecutive 1s and remove the 0 that follows it. This 0 was inserted to prevent confusion with frame delimiters like 01111110. After scanning the
stream and removing those bits, you get the original data without the stuffed bits.
Q2. (No Error Control) An upper-layer packet is split into 10 frames, each with an 80% chance of arriving undamaged. If there's no error control, how many times must the message be sent on
average?
We use the formula: P(success) = 0.8^10 ≈ 0.107, so the number of transmissions needed on average is 1 / 0.107 ≈ 9.35 times.
Q3. (Hamming Code) Encode 8-bit binary 10101111 using even-parity Hamming Code.
We need to add r parity bits such that: 2^r ≥ m + r + 1 → For m=8, r=4 works (2^4 = 16 ≥ 13). Place parity bits at positions 1, 2, 4, and 8. Then calculate each parity bit using even parity over the positions
they cover. This results in a 12-bit Hamming code that can correct single-bit errors. 101001001111.
Q4. (Stop-and-Wait Efficiency) What is the minimum frame size to achieve ≥50% efficiency on a 4 kbps channel with a 20ms one-way delay?
Efficiency η = L / (L + 2RB) Given R = 0.02s, B = 4000 bps Set η = 0.5 → 0.5 = L / (L + 160) Solving: 0.5(L + 160) = L → 0.5L + 80 = L → L = 160 bits minimum
Q5. (Go-Back-N vs Selective Repeat) What is the major difference between Go-Back-N and Selective Repeat protocols?
Go-Back-N: Receiver only accepts the expected frame. Discards all frames after a missing one. Sender resends all frames after a loss. Selective Repeat: Receiver buffers out-of-order frames. Sends
NACKs for specific lost frames. Only the bad frame is resent, improving efficiency. SR requires more memory but offers higher throughput.
Q6. (ALOHA) N stations share a 56 kbps ALOHA channel. Each sends a 1000-bit frame every 100s. What's the maximum N?
With pure ALOHA, the usable bandwidth is 0.184 × 56 kbps = 10.3 kbps. Each station requires 10 bps, so N = 10300/10 = 1030 stations.
Q7. (Ethernet) Why does Fast Ethernet keep the 64-byte minimum frame size even though it's 10x faster?
In Fast Ethernet, the bit time is 1/10th, so wire length (delay) is reduced by the same factor. That keeps the minimum frame size the same (64 bytes), ensuring collisions can still be detected in time.
Q8. (Gaming Network) Which is better for interactive gaming: CSMA or Token Ring?
Token Ring is preferred under high load, as it guarantees bounded access times and avoids collisions. Nonpersistent CSMA suffers under congestion because of collisions and retry delays, which are
bad for real-time games.
Q9. (Hidden Station Problem) In a scenario with A, B, C, and D, who is the hidden station if ACKs to A are lost when D transmits?
D is the hidden station. It's close enough to interfere with A’s reception but not with the sender, making it hidden from the ongoing transmission.
Q10. (Spanning Tree in Ethernet LANs) Seven bridges are connected in a topology. Most traffic goes through Bridge 2. What STP structure would reduce latency?
In the spanning tree found by the Ethernet protocol, bridge 0 is selected as the root, bridges 1 and 2 use only their ports to bridge 0, and bridges 3, 4, 5, and 6 only use their ports to bridge 1. If the vast
majority of traffic goes to bridge 2, letting bridges 3, 4, 5, and 6 use their port connected to bridge 2 instead will reduce the average frame latency.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

You might also like