Unit 2: Physical and Data Link Layers - Subjective Questions
CSE306 — Computer Networks • Practice Questions with Detailed Answers
20 questions
Define data communication. Explain its basic components and the characteristics of an effective data communication system.
Data communication is the exchange of data between two or more devices through a transmission medium such as a cable, optical fiber, or wireless channel.
Basic components:
- Message: The information being communicated, such as text, numbers, images, audio, or video.
- Sender: The device that generates and transmits the message.
- Receiver: The device that receives the message.
- Transmission medium: The physical or wireless path through which the message travels.
- Protocol: A set of rules governing communication, including data format, timing, sequencing, and error handling.
Characteristics of effective communication:
- Delivery: Data must reach the correct destination.
- Accuracy: Data must be delivered without alteration or errors.
- Timeliness: Data must arrive within an acceptable time, especially for real-time applications.
- Low jitter: Variation in packet arrival time should be small, particularly for audio and video communication.
Explain simplex, half-duplex, and full-duplex modes of data communication with suitable examples.
Data flow between communicating devices can occur in the following modes:
-
Simplex: Communication takes place in only one direction. One device always acts as the sender and the other as the receiver. Examples include a keyboard sending input to a computer and traditional television broadcasting.
-
Half-duplex: Both devices can transmit and receive, but not simultaneously. When one device transmits, the other must wait. Walkie-talkies are a common example.
-
Full-duplex: Both devices can transmit and receive at the same time. This can be achieved using separate channels or by dividing channel capacity. A telephone conversation is an example.
Comparison:
- Simplex has one-way utilization of the medium.
- Half-duplex provides two-way communication but requires turn-taking.
- Full-duplex provides simultaneous two-way communication and generally offers the highest effective performance.
State and explain the Nyquist and Shannon capacity formulas. A channel has a bandwidth of and an SNR of . Determine its maximum capacity according to Shannon's theorem and the maximum binary data rate according to Nyquist's formula.
Nyquist formula: For a noiseless channel of bandwidth using discrete signal levels, the maximum bit rate is
It shows that the data rate can be increased by increasing bandwidth or the number of signal levels.
Shannon capacity formula: For a noisy channel,
where is the signal-to-noise ratio expressed as an ordinary ratio.
Given:
Convert SNR from decibels:
Therefore,
Thus, Shannon's maximum capacity is approximately 29.9 kbps.
For binary signaling, :
Hence, the Nyquist binary data rate is 6 kbps. Nyquist addresses intersymbol limitations in a noiseless channel, whereas Shannon gives the theoretical limit in the presence of noise.
Compare twisted-pair cable, coaxial cable, and optical fiber as guided transmission media.
Guided media confine signals to a physical path. The three major types are:
| Feature | Twisted Pair | Coaxial Cable | Optical Fiber |
|---|---|---|---|
| Construction | Two insulated copper wires twisted together | Central conductor, insulation, metallic shield, and jacket | Glass or plastic core surrounded by cladding |
| Signal type | Electrical | Electrical | Light |
| Bandwidth | Low to moderate | Moderate to high | Very high |
| Interference | More susceptible to noise | Better shielding than twisted pair | Immune to electromagnetic interference |
| Attenuation | Relatively high | Lower than twisted pair | Very low |
| Security | Low to moderate | Moderate | High; tapping is difficult |
| Cost | Low | Moderate | Higher installation cost |
| Applications | Telephone lines and Ethernet LANs | Cable television and broadband | Network backbones and long-distance links |
Twisted pair is inexpensive and easy to install, but it has limited range and noise immunity. Coaxial cable offers improved shielding and bandwidth. Optical fiber provides the greatest bandwidth, longest distance, and best resistance to interference, but installation and repair require specialized equipment.
Describe the construction and working of optical fiber. Distinguish between single-mode and multimode fiber.
An optical fiber carries data in the form of light pulses.
Construction:
- Core: The central glass or plastic region through which light propagates.
- Cladding: A layer with a lower refractive index surrounding the core.
- Buffer coating: Protects the fiber from moisture and physical damage.
- Outer jacket: Provides mechanical strength and protection.
Working principle: Optical fiber operates using total internal reflection. When light enters the core at a suitable angle, it is repeatedly reflected at the core-cladding boundary. Since the core has a higher refractive index than the cladding, light remains confined within the core.
Single-mode fiber:
- Has a very small core.
- Carries one primary light path or mode.
- Has low modal dispersion.
- Supports high bandwidth and long-distance communication.
- Commonly uses laser sources.
Multimode fiber:
- Has a larger core.
- Carries multiple light paths.
- Experiences greater modal dispersion.
- Is suitable for shorter distances.
- Commonly uses LEDs or lower-cost laser sources.
Single-mode fiber is preferred for telecommunications and long-distance backbones, while multimode fiber is often used inside buildings and data centers.
Explain the construction, categories, advantages, and limitations of twisted-pair cable.
A twisted-pair cable consists of two insulated copper conductors twisted around each other. Twisting reduces electromagnetic interference and crosstalk because external noise tends to affect both wires similarly.
Categories:
- Unshielded Twisted Pair (UTP): Does not contain metallic shielding. It is inexpensive, flexible, and widely used in Ethernet LANs.
- Shielded Twisted Pair (STP): Contains a metallic foil or braided shield. It provides better protection against interference but is more expensive and difficult to install.
Twisted-pair cables are also classified into performance categories such as Cat 5e, Cat 6, Cat 6a, and Cat 8. Higher categories generally support higher frequencies and data rates.
Advantages:
- Low cost
- Easy installation and maintenance
- Flexible and lightweight
- Widely available
- Suitable for telephone and LAN connections
Limitations:
- Higher attenuation than coaxial cable and optical fiber
- Limited transmission distance
- Susceptibility to noise and crosstalk, especially in UTP
- Lower bandwidth than optical fiber
Classify unguided transmission media and compare radio waves, terrestrial microwaves, satellite microwaves, and infrared communication.
Unguided media transmit electromagnetic signals through air, vacuum, or space without using a physical conductor.
Radio waves:
- Usually propagate in multiple directions.
- Can penetrate walls depending on frequency.
- Often support omnidirectional antennas.
- Used in radio broadcasting, mobile communication, and wireless LANs.
- Are susceptible to interference and unauthorized reception.
Terrestrial microwaves:
- Use directional antennas and line-of-sight transmission.
- Offer high bandwidth.
- Require towers or repeaters because of Earth's curvature and obstacles.
- Are used for point-to-point links and cellular backhaul.
Satellite microwaves:
- A ground station sends an uplink signal to a satellite, which retransmits it through a downlink.
- Provide very wide geographic coverage.
- Are used in television distribution, navigation, Internet access, and remote communication.
- Geostationary satellites introduce noticeable propagation delay.
Infrared:
- Operates over short distances.
- Usually requires line-of-sight or reflection from indoor surfaces.
- Cannot easily penetrate walls, reducing interference between rooms.
- Is used in remote controls and short-range device communication.
The choice depends on required range, bandwidth, directionality, cost, mobility, and environmental conditions.
Explain ground-wave, sky-wave, and line-of-sight propagation in wireless communication.
Electromagnetic waves may propagate using different mechanisms depending mainly on their frequency.
-
Ground-wave propagation: Waves follow the curvature of Earth and travel close to its surface. It is effective at lower frequencies and is used in applications such as AM broadcasting and maritime communication. Its range depends on frequency, transmitter power, and ground conductivity.
-
Sky-wave propagation: Waves are transmitted toward the upper atmosphere and are refracted or reflected back toward Earth by ionized atmospheric layers. This permits communication beyond the horizon. It is commonly associated with high-frequency radio communication.
-
Line-of-sight propagation: The transmitting and receiving antennas must be able to see each other without major obstacles. It is commonly used for very high frequency, microwave, satellite, and infrared communication. Taller antennas increase the radio horizon.
Line-of-sight links can be affected by buildings, terrain, atmospheric conditions, and multipath propagation. Repeaters or satellites are used when direct visibility cannot be maintained.
What are transmission impairments? Explain attenuation, distortion, and noise.
Transmission impairment refers to any undesirable change that occurs when a signal travels through a transmission medium.
- Attenuation: It is the loss of signal strength with distance. Amplifiers or repeaters may be used to compensate for it. Attenuation in decibels can be written as
A negative value indicates a power loss.
-
Distortion: A composite signal contains multiple frequency components. If these components experience different delays or attenuation, the received waveform differs from the transmitted waveform. Delay distortion can cause adjacent symbols to overlap.
-
Noise: Noise is unwanted energy added to a signal. Important forms include:
- Thermal noise: Random electron motion in conductors.
- Induced noise: Interference from electrical devices.
- Crosstalk: Unwanted coupling between nearby channels.
- Impulse noise: Short, high-energy disturbances caused by switching or lightning.
These impairments reduce signal quality and may cause bit errors at the receiver.
Explain bandwidth, throughput, latency, transmission delay, and propagation delay. Calculate the minimum delay for transmitting a -byte frame over a link of length if the propagation speed is .
- Bandwidth: The theoretical capacity or frequency range of a communication channel.
- Throughput: The actual rate at which useful data is successfully delivered.
- Latency: The total time required for data to travel from source to destination.
- Transmission delay: Time required to place all bits of a frame onto the link:
- Propagation delay: Time required for a signal to travel through the medium:
Frame size:
Transmission delay:
Distance:
Propagation delay:
Ignoring processing, queuing, and acknowledgment delays:
Therefore, the minimum one-way delay is . In practical networks, throughput is usually lower than bandwidth because of overhead, congestion, errors, and retransmissions.
Describe the major functions of the data link layer, including framing, flow control, error control, and access control.
The data link layer provides node-to-node delivery over a single link. Its major functions are:
- Framing: It divides the network-layer bit stream into manageable units called frames. Headers and trailers may identify frame boundaries and carry control information.
- Physical addressing: It inserts source and destination link-layer addresses, such as MAC addresses.
- Flow control: It prevents a fast sender from overwhelming a slow receiver.
- Error detection and correction: It detects damaged or lost frames and may correct errors or request retransmission.
- Access control: When multiple devices share a common medium, it determines which device may transmit at a given time.
- Sequencing: Sequence numbers help identify duplicate frames and restore the proper order.
- Acknowledgment: The receiver may send positive or negative acknowledgments to report delivery status.
These functions make communication over a physical link more reliable and organized.
Explain the elementary data link protocols for an ideal noiseless channel. Compare the unrestricted simplex protocol with the simplex stop-and-wait protocol.
Unrestricted simplex protocol:
- Communication occurs only from sender to receiver.
- The channel is assumed to be error-free.
- The receiver is always ready to accept data.
- The sender continuously obtains packets, places them in frames, and transmits them.
- No acknowledgment, sequence number, flow control, or retransmission is required.
This protocol is simple but unrealistic because actual receivers have limited processing speed and buffer capacity.
Simplex stop-and-wait protocol:
- The channel is still assumed to be error-free.
- The sender transmits one frame and then waits for an acknowledgment or permission before sending the next frame.
- The receiver processes the frame and returns a control message.
- It provides flow control, ensuring that the sender cannot overrun the receiver.
Comparison:
- The unrestricted protocol assumes an infinitely fast receiver, whereas stop-and-wait accommodates a slower receiver.
- The unrestricted protocol can transmit continuously, whereas stop-and-wait permits only one outstanding frame.
- Stop-and-wait is safer but may have low utilization on links with a large propagation delay.
Describe the Stop-and-Wait ARQ protocol for a noisy channel. Explain the roles of sequence numbers, acknowledgments, and timers.
Stop-and-Wait Automatic Repeat reQuest (ARQ) provides flow and error control over a noisy channel.
Operation:
- The sender transmits one frame and starts a timer.
- The receiver checks the frame for errors.
- If the frame is correct and has the expected sequence number, the receiver delivers it and sends an acknowledgment.
- When the acknowledgment arrives, the sender transmits the next frame.
- If the frame or acknowledgment is lost, the timer expires and the sender retransmits the frame.
Sequence numbers: Usually one-bit sequence numbers, and , are sufficient because only one frame can be outstanding. They allow the receiver to identify and discard duplicate frames.
Acknowledgments: An ACK confirms successful reception. Depending on the design, a NAK may explicitly indicate a damaged frame.
Timer: The timer detects missing frames or acknowledgments. Its timeout must be long enough to allow normal frame transmission, propagation, processing, and acknowledgment.
For a frame transmission time and one-way propagation time , ideal utilization without considering ACK transmission time is approximately
where . Thus, Stop-and-Wait ARQ is inefficient when propagation delay is large.
Distinguish between single-bit errors and burst errors. Explain the concepts of redundancy and minimum Hamming distance.
- A single-bit error occurs when exactly one bit in a data unit changes from to or from to .
- A burst error affects two or more bits within a span. The burst length is measured from the first corrupted bit to the last corrupted bit, including any unchanged bits between them.
Redundancy means adding extra check bits to the original data. These bits do not represent new user information; they allow the receiver to detect or correct transmission errors.
The Hamming distance between two equal-length bit strings is the number of bit positions in which they differ. For example, the distance between and is .
If a code has minimum Hamming distance :
- It can detect up to bit errors.
- It can correct up to
bit errors.
Therefore, a code requires to detect one error and to correct one error.
Explain even parity, odd parity, and two-dimensional parity. Discuss their error-detection capabilities and limitations.
Parity adds one or more redundant bits to data.
- Even parity: The parity bit is selected so that the total number of s in the codeword is even. For example, data contains three s, so the even-parity bit is .
- Odd parity: The parity bit is selected so that the total number of s is odd. For data , the odd-parity bit is .
A single parity bit detects every error involving an odd number of changed bits. However, it fails when an even number of bits are inverted.
Two-dimensional parity:
- Data bits are arranged in rows and columns.
- A parity bit is generated for every row and every column.
- The receiver checks both row and column parity.
- A single-bit error can be located at the intersection of the incorrect row and column and may therefore be corrected.
- It detects many burst and multiple-bit errors more effectively than simple parity.
Its limitation is that certain rectangular patterns of errors can leave all row and column parity values unchanged. It also requires more redundant bits than one-dimensional parity.
Explain the one's-complement checksum method. Calculate the 8-bit checksum for the data words and .
In the one's-complement checksum method, data is divided into fixed-size words. The sender adds all words using one's-complement arithmetic, in which an overflow carry is wrapped around and added to the least significant bit. The complement of the final sum is transmitted as the checksum.
Given words:
Add them:
The lower 8 bits are , and the end-around carry is :
Binary form:
Take the one's complement:
At the receiver, the data words and checksum are added using the same arithmetic. Here, the folded result is
A result consisting entirely of s indicates that no error has been detected. Checksums are simple and efficient but generally detect errors less reliably than a well-designed CRC.
Explain the Cyclic Redundancy Check algorithm. Using data and generator , determine the CRC remainder and transmitted codeword.
A Cyclic Redundancy Check (CRC) treats a bit string as a polynomial over modulo- arithmetic. Addition and subtraction are both performed using XOR, so there are no carries or borrows.
Given:
- Data:
- Generator:
- Generator degree:
Append three zeros to the data:
Now divide by using modulo- division. The XOR division produces the remainder
Thus, the CRC bits are . Replace the appended zeros with this remainder:
The sender transmits . The receiver divides the complete codeword by the same generator. If the remainder is , the frame is accepted as having no detected error. A nonzero remainder indicates corruption.
A CRC with generator polynomial detects all error patterns that are not divisible by . Properly selected generators can detect all single-bit errors, many multiple-bit errors, and all burst errors shorter than the generator degree.
Derive the condition for the number of parity bits required in a Hamming code. Explain how Hamming code locates a single-bit error.
Suppose a Hamming code contains data bits and parity bits. The total codeword length is
The receiver must distinguish between all possible single-bit error positions and the no-error condition. Therefore, parity bits must represent at least states:
This is the condition used to determine the required number of parity bits.
Placement of parity bits: Parity bits are placed at positions that are powers of two:
The remaining positions contain data bits.
Each parity bit checks positions whose binary position numbers contain a in a particular bit location. For example:
- checks positions
- checks positions
- checks positions
At the receiver, the parity-check results form a syndrome. A zero syndrome means no error is detected. A nonzero syndrome gives the binary position of the corrupted bit, which is corrected by inverting that bit.
A standard Hamming code has minimum distance , so it can correct one-bit errors. Adding an overall parity bit produces an extended Hamming code capable of single-error correction and double-error detection, known as SECDED.
Construct a Hamming code for data using even parity. If bit position is inverted during transmission, show how the receiver detects and corrects the error.
In a Hamming code, parity bits are placed at positions , , and . Data bits are placed at positions , , , and .
Place data in order:
| Position | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| Content |
Using even parity:
- checks positions . Since positions contain , set .
- checks positions . Since positions contain , set .
- checks positions . Since positions contain , set .
Therefore, the codeword is
If position is inverted, the received word becomes
Parity checks give:
- for positions
- for positions
- for positions
The syndrome is
Thus, the error is at position . The receiver flips bit , recovering
The original data bits at positions are therefore .
Compare parity, checksum, CRC, and Hamming code as techniques for error detection and correction.
| Technique | Basic principle | Detection capability | Correction capability | Typical use |
|---|---|---|---|---|
| Parity | Adds a bit to make the number of s even or odd | Detects all odd numbers of bit errors | Simple parity cannot correct errors | Simple links and memory checks |
| Checksum | Adds fixed-size words using one's-complement arithmetic | Detects many common error patterns | Normally no correction | Internet and transport protocols |
| CRC | Divides the data polynomial by a generator polynomial | Excellent detection of burst and multiple-bit errors | Normally no correction | Data link protocols, storage, and Ethernet frames |
| Hamming code | Adds parity bits at power-of-two positions | Detects and locates single-bit errors | Corrects one-bit errors; extended Hamming also detects two-bit errors | Memory systems and forward error correction |
Summary:
- Parity is the simplest technique but has limited reliability.
- A checksum is efficient in software and suitable for large protocol messages.
- CRC offers strong error detection, particularly for burst errors.
- Hamming code introduces enough structured redundancy to locate and correct a single-bit error without retransmission.
The appropriate method depends on error characteristics, required reliability, processing cost, redundancy, and whether retransmission is possible.
Define data communication. Explain its basic components and the characteristics of an effective data communication system.
Data communication is the exchange of data between two or more devices through a transmission medium such as a cable, optical fiber, or wireless channel.
Basic components:
- Message: The information being communicated, such as text, numbers, images, audio, or video.
- Sender: The device that generates and transmits the message.
- Receiver: The device that receives the message.
- Transmission medium: The physical or wireless path through which the message travels.
- Protocol: A set of rules governing communication, including data format, timing, sequencing, and error handling.
Characteristics of effective communication:
- Delivery: Data must reach the correct destination.
- Accuracy: Data must be delivered without alteration or errors.
- Timeliness: Data must arrive within an acceptable time, especially for real-time applications.
- Low jitter: Variation in packet arrival time should be small, particularly for audio and video communication.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →