02 - Link Layer-Physical Layer

Problem 1: Short Answer Questions

Problem 2: CRC and Parity-Based Error Detection

Suppose you want to transmit the following 10-bit message “0100101100”.

Problem 3: Checksum and One-Dimensional Parity

Suppose you want to transmit the following 12-bit message “110010011111”.

Problem 4: CRC Polynomial Computation and Error Detection

Suppose you want to transmit the message 11011010 and protect it from errors using the CRC polynomial . Use polynomial long division to determine the message that would be transmitted. Assume no bit errors occur during transmission. How does the receiver know that the frame was received without any errors?

Solution

alt text

Problem 5: CRC Error Detection Mechanism

Suppose you want to transmit the message 11001001 and protect it from errors using the CRC polynomial . Use polynomial long division to determine the message that would be transmitted. Assume no bit errors occur during transmission. How does the receiver know that the frame was received without any errors?

Solution

alt text

Problem 6: CRC Bit Error Detection and Checksum Comparison

Suppose you want to transmit the message 11001001 and protect it from errors using the CRC polynomial

Problem 7: Byte-Counting, Byte-Stuffing, and Bit-Stuffing Framing

Suppose you want to transmit the following 4-byte message “0xfb 0x7e 0x7d 0xff” with 0xfb being transmitted first.

Problem 8: Hub vs Bridge Network Interconnection

Consider a broadcast link L1 containing hosts A and B. Further consider another link L2 containing nodes C and D. Answer the following questions:

Problem 9: Ethernet vs FDDI Network Selection

Some network applications are a better match for an Ethernet, some are a better match for an FDDI (token ring) network. Which network would be better match for a remote terminal application (e.g., Telnet) and which would be better for a file transfer application (e.g., FTP)? Give a general explanation for what it is about each of these applications that suggest that one type of network is better match than the other?

Problem 10: Ethernet Maximum Cable Length with CSMA/CD

Determine the maximum length of an Ethernet cable in kilometers with CSMA/CD for transmitting data at a rate of 500 Mbps with frame size of 10.000 bits. Assume that the signal speed in the cable is 2x105 km/sec. Show your work. (Answer: 2 km)

Solution

In short: CSMA/CD requires collision detection before transmission ends. Maximum cable length equals (signal speed × transmission time) / 2. At 500 Mbps with 10,000-bit frames, transmission time is 20 microseconds, yielding maximum length of 2 km.

Elaboration:

CSMA/CD Requirement:

For CSMA/CD to work, a sending station must detect a collision before finishing transmission of its frame. This requires:

Or equivalently:

The factor of 2 accounts for the signal traveling to the collision point and back.

Step 1: Calculate transmission time

Step 2: Calculate maximum cable length

where = signal speed = km/sec

Answer: Maximum cable length = 2 km

Physical interpretation:

  • A signal can travel 2 km in seconds
  • If a collision occurs at the far end (2 km away), the signal needs to travel back (another 2 km), taking a total of seconds
  • This is longer than the transmission time of seconds
  • Therefore, the sender would finish transmitting before detecting the collision
  • This means 2 km is the maximum safe cable length for CSMA/CD to function properly

Problem 11: Minimum Frame Size for CSMA/CD

A link layer protocol with CSMA/CD in the MAC layer is running at 1 Gbps over a 1km cable. The signal speed in the cable is 2x105 km/sec. What should be the minimum frame size for the link layer? Show your work (Answer: 10.000 bits)

Solution

In short: For CSMA/CD to detect collisions, transmission time must be at least twice the propagation delay (10 microseconds). At 1 Gbps, this requires minimum frame size of 10,000 bits to maintain reliable collision detection.

Elaboration:

CSMA/CD Requirement:

For CSMA/CD to work properly, the transmission time must be at least twice the propagation delay:

Or in terms of frame size:

Step 1: Calculate propagation delay

Step 2: Calculate minimum transmission time

For collision detection to work:

Step 3: Calculate minimum frame size

Answer: Minimum frame size = 10,000 bits = 1,250 bytes

Physical interpretation:

  • Propagation delay: 5 microseconds each way
  • For collision detection: sender must still be transmitting when collision signal returns
  • Return time: 2 × 5 = 10 microseconds
  • At 1 Gbps, 10,000 bits takes exactly 10 microseconds to transmit
  • Therefore, minimum frame size must be 10,000 bits

Note: This is the minimum theoretical size. Ethernet standard specifies 64 bytes (512 bits) minimum, then pads to 64 bytes, which is larger than 10,000 bits in total frame size.

Problem 12: Bridge Forwarding and MAC Learning

Consider the following LAN consisting of 3 links attached by a bridge. For each of the following cases, describe which links does the bridge forward the packet to and show the bridge forwarding table after the packet is sent.

Problem 13: Perlman’s Spanning Tree Algorithm

Consider the following LAN consisting of 8 bridges numbered 1-8 with the given connections. Each interface of each bridge is also labeled starting with 1. Run Perlman’s Spanning Tree Algorithm and for each interface of each bridge write down whether the interface is a “Root port (R)”, a “Designated port (D)” or “Blocking Port (B)” in the tables given below. Finally, show the final spanning tree.

Solution

alt text