## Introduction

The OSI Layered Model's Data Link Layer is the second layer. This layer is one of the most difficult to understand, with several functionalities and risks. The data connection layer hides the underlying hardware features and represents itself to the upper layer as a communication medium.

The data link layer connects two hosts that are in some way directly connected. This direct link could be a point-to-point or a broadcast connection. On a broadcast network, systems are said to be on the same connection. When dealing with several hosts on a single collision domain, the data connection layer's job becomes more complicated.

## Questions

**1. Determine the maximum cable length (in kilometers) for transferring data at a rate of 500 Mbps in an Ethernet LAN with 10,000-bit frames. Assume a signal speed of 2,00,000 km/s in the wire.**

- 1
- 2
- 2.5
- 3

**Solution: b. 2**

Data should be sent at a rate of 500 megabits per second (Mbps).

Transmission Time >= 2*Propagation Time

=> 10000/(500*1000000) <= 2*length/200000

=> length = 2km (max)

so, answer will be: (B) 2km

**2. The generating polynomial used for CRC checking is G(x). What condition must G(x) meet in order for it to detect an odd number of bits in error?**

- There are more than two terms in G(x).
- For any k less than the frame length, G(x) does not divide 1+xk.
- 1+x is a G factor (x)
- The number of terms in G(x) is odd.

**Solution: c. 1+x is a factor of G(x)**

If G(x) contains (x+1) as a factor, an odd number of bit errors can be discovered. For proof, look at this.

**3.**** 1000-bit frames are exchanged between two sites across a 106-bps duplex link. It will take 25 milliseconds for the signal to propagate. Frames must be sent to this site to multiply and pack them in transit (within the link). What is the minimal amount of bits "I" required to express the sequence numbers clearly? Assume that no time delay between the transmission of two frames is needed.**

- i = 2
- i = 3
- i = 4
- i = 5

**Solution: d. 5**

For one frame, the transmission delay is 1000/(106) = 1 ms—time to propagate = 25 milliseconds. Before the first frame reaches the destination, the sender can only transfer a maximum of 25 frames. The amount of bits required to represent 25 different frames is 5 bits.

**4. Take a look at the information from the preceding question. Assume you're using the sliding window protocol with a sender window size of 2i, where is the number of bits found in the previous question, and acknowledgments are always piggybacked. What is the minimum time the sender must wait after sending 2i frames before initiating transmission of the next frame? (Ignore the frame processing time and choose the closest option.)**

- 16ms
- 18ms
- 20ms
- 22ms

**Solution: c. 20ms**

Sliding window size = 2^5 = 32 A frame's transmission time is 1 millisecond. 32ms = total time taken for 32 frames 2tx + 2tp = 2+50 = 52ms total time The minimum time the sender must wait before transmitting the next frame after delivering 32 frames is 52 – 32 = 20.

**5. When Manchester encoding is used on Ethernet, the bit rate is:**

- Half the baud rate.
- Twice the baud rate.
- Same as the baud rate.
- None of the above.

**Solution: a. Half the baud rate.**

The bitrate in Manchester encoding is half that of the baud rate.

**6.**** In a slotted LAN, there are n stations. Each station tries to transmit in each time slot with a probability of p. What is the likelihood that only one station transmits in a particular time slot?**

- (1-p)^(n-1)
- np(1-p)^(n-1)
- p(1-p)^(n-1)
- 1-(1-p)^(n-1)

**Solution: b. np(1-p)^(n-1)**

P(X) = Chances of station X transmitting = P P (-X) = Chances of Station X not transmitting = 1-P It's a must: Only one station transmits probability = y.

**7. The transmission speed in a token ring network is 107 bits per second, while the propagation speed is 200 meters per microsecond. In this network, a 1-bit delay is equal to**

- 500 meters of cable.
- 200 meters of cable.
- 20 meters of cable.
- 50 meters of cable.

**Solution: c. 20 meters of cable.**

Tp = 200 m/μs

In 1-sec distance covered 200×106 meter

1 bit delay = (1 ÷ BW) × v = (1 ÷ 107 )× 200×106 = 20 meters cable

**8. To secure the message 11001001 from errors, it will be transmitted using the CRC polynomial x3 + 1. The following is the message that should be sent:**

- 11001001000
- 11001001011
- 11001010
- 110010010011

**Solution: b. 11001001011**

message: 11001001

CRC polynomial: x^3 +1 = 1.x^3 + 0.x^2 + 0.x^1 + 1.x^0

1001 is a CRC (cyclic redundancy check) generator.

Add 3 0's at the end of the message because the polynomial is of order 3.

**9. ****Consider a 2 km token ring network with ten stations, one of which is a monitoring station. The signal propagation speed is 2 108 m/s, and the token transmission time is not taken into account. The monitoring station's minimum time to wait before assuming the token is lost is if each station is allowed to hold the token for 2 seconds:-**

- 28 to 30
- 20 to 22
- 0 to 2
- 31 to 33

**Solution: a. 28 to 30**

2 kilometers in length

Token Holding Time = 2 micro sec Propagation Speed v = 2*108 m/s

Waiting for time = length/speed + (number of stations - 1)*(token holding time) to length/speed + (number of stations)*(token holding time) = 28 to 30 minutes.

**10. Consider a selective repeat sliding window protocol with a one-way delay of 50 msec and a frame size of 1 KB that transfers data over a 1.5 Mbps channel. The minimal number of bits required to indicate the sequence number field in order to achieve a link utilization of 60% is:-**

- 3
- 4
- 5
- 6

**Solution: c. 5**

Transmission latency = Frame Size/Bandwidth = (1*8*1024)/(1.5 * 10^6)=5.33 milliseconds

50ms propagation delay

a = Propagation delay/Transmission delay = Efficiency = Window Size/(1+2a) =.6

So, in Min sequence number = log2, window size = 11.856(approx) and min sequence number = 2*window size = 23.712 bits are required (23.712)

Ceil(4.56) = 5 is the answer.

**11. An 8-****bit-stuffing-based framing system uses an 8-bit delimiter pattern of 01111110. The input bit-string is 01111100101 if the output bit-string after stuffing is 01111100101**

- 0111110100
- 0111110101
- 0111111101
- 0111111111

**Solution: b. 0111110101**

Bit Stuffing is used to create framing.

The 8-bit delimiter pattern is 01111110.

The output bit-string after stuffing is 01111100101.

The above-highlighted bit is a stuffed bit.

So the input bit-string must be 0111110101.

**12. Station A sends communications to Station B using a SLIDING WINDOW PROTOCOL and 32-byte packets. On the path between A and B, the bottleneck bandwidth is 128 kbps, while the round trip time between A and B is 80 milliseconds. What is the most appropriate window size for A to use?**

- 20
- 40
- 160
- 320

**Solution: b. 40**

80ms propagation delay round trip

32*8 bit frame size

128kbps bandwidth

Time to transmit = 32*8/(128) ms = 2 ms

Let n be the size of the window.

UtiliZation = n/(1+2a) where an is the propagation time / transmission time = n/(1+80/2)

n = 41, which is near to choice, for maximum use (B)

**13.** **Assume a 10 Mbps Ethernet with a 48-bit jamming signal has a round trip propagation latency of 46.4 milliseconds. The smallest possible frame size is**

- 94
- 416
- 464
- 512

**Solution: d. 512**

We're given a 48-bit jamming signal.

46.4 ps propagation delay round trip

Now deduct the transmission time of 48 bits to get the real round propagation time, which is 51.2 seconds.

Now, the frame length must be such that it takes longer than 51.2 seconds to transmit, so the minimum frame length is 51.2 * 10–6 10–6 = 512 bits.

**14.** **How many 8-bit characters can be communicated per second utilizing the asynchronous transmission mode with one start bit, eight data bits, two stop bits, and one parity bit over a 9600 baud serial communication link?**

- 600
- 800
- 876
- 1200

**Solution: b. 800**

A physical Layer in the OSI Stack is required as a background. In serial communications, data is sent or received one bit at a time. The baud rate determines how quickly data is transmitted across a serial line. It's commonly measured in bits per second (bps) (bps). Each block of data (typically a byte) is transmitted in a packet or frame of bits. By inserting synchronization and parity bits into our data, frames are generated.

**15.** **There are just two stations on an Ethernet: A and B. Each of them has a steady stream of frames to send out. The initial backoff race is won by A after both A and B attempt to transfer a frame and collide. Both A and B try to communicate, and they clash at the end of A's successful transmission. A's chances of winning the second backoff race are**

- 0.5
- 0.625
- 0.75
- 1.0

**Solution: b. 0.625**

The station or node with the shortest backoff time sends the frames first. First try: k=0 or k=1 (0= k = 2n-1; where n=nth attempt). A must-have selected k=0, and B must have chosen k=1 because A won the first race (A wins here with a probability of 0.25). A will choose k=0 or k=1 for its second frame because it won the first round, whereas B will choose k=0,1,2, or three because it failed to submit its first frame in the first round. Let kA= value of k chosen by A and kB= value of k chosen by B on the second attempt. To indicate the possible values, we'll use the notation (kA, kB). For the second try, the sample space is now (kA,kB) = (0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,2), or (1,3), i.e. 8 possible outcomes. kA must be less than kB for A to win (kA kB). As a result, our event space is (kA, kB) = (0,1), (0,2), (0,3), (1,2), (1,3), i.e. 5 outcomes. As a result, the probability of A winning the second backoff race is 5/8 = 0.625.

**16.** **A 2 km broadcast LAN with 107 bps bandwidth and CSMA/CD is used. The signal travels at a speed of 2 108 m/s along the wire. What is the smallest packet size that this network allows?**

- 50 bytes
- 100 bytes
- 200 bytes
- None of these

**Solution: d. None of these**

While transmitting a frame in CSMA/CD, the transmitting node listens for collisions. It assumes that the transmission was successful once it has completed transmitting the final bit without hearing a collision. The time it takes a Node to detect that its frame has collided within this worst-case collision situation is double the propagation delay. As a result, the packet's minimum size is required to ensure that a collision has not happened.

**17.** **Which of the following claims concerning CSMA/CD is TRUE?**

- The CSMA/CD protocol is used in IEEE 802.11 wireless LAN
- The CSMA/CD protocol is not used in Ethernet.
- CSMA/CD is not ideal for a network with a long propagation delay, such as a satellite network.
- In a CSMA/CD network, there is no contention.

**Solution: c. CSMA/CD is not suitable for a high propagation delay network like a satellite network**

According to CSMA/CD, the sender must transmit at least until the first bit reaches the receiver, so that the receiver can identify any collisions. This period grows too long for networks with a significant prorogation delay, and the minimum packet size required becomes too large to be practical.

**18.** **Every byte of data in serial data transfer is padded with a '0' at the start and one or two 'Is' at the conclusion because**

- The receiver is to be synchronized for byte reception.
- The receiver recovers lost '0' and '1's from these padded bits.
- Padded bits are useful in parity computation.
- None of these

**Solution: a. The receiver is to be synchronized for byte reception.**

The sender and receiver in serial communication must be synced with one another.

A start bit of '0' is added to the beginning of the data, and a stop bit of '1' is added to the end. The start signal informs the receiver that data has arrived, while the stop signal prepares the receiver for the arrival of more data.

As a result, the receiver in serial transmission must be synced for byte reception.

If you identify any errors in the above post, please leave a comment below.

**19.** **Take the following LANs into consideration: S1, S2, S3, and S4. A node can only broadcast at the start of a slot because time is divided into fixed-length slots. It is claimed that a collision has occurred when more than one node transmits in the same slot. The chances of S1, S2, S3, and S4 creating a frame in a time slot are 0.1, 0.2, 0.3, and 0.4, respectively. Sending a frame in the first slot without these four stations interacting has a probability of:-**

- 0.462
- 0.711
- 0.5
- 0.652

**Solution: a. 0.462**

P(T) = 0.1 0.8 0.7 0.6 + 0.9 0.2 0.7 0.6 + 0.9 0.8 0.3 0.6 + 0.9 0.8 0.7 0.6 + 0.9 0.8 0.7 0.6

T = 0.4404 P(T) = 0.4404 P(T) = 0.4404 P(

The likelihood of any of these four stations sending a frame in the first slot without colliding is 0.4404.

**20.** **Consider a 100 Mbps (108 bits per second) CSMA/CD network with no repeaters that delivers data across a 1 km (kilometer) wire. What is the signal speed (km/sec) through the cable if the minimum frame size required for this network is 1250 bytes?**

- 8000
- 10000
- 16000
- 20000

**Solution: d. 20000**

Data should be transmitted at the rate of 100 Mbps.

Transmission Time >= 2*Propagation Time

=> 1250*8 / (100 * 106) <= 2*length/signal_speed

=> signal_speed <= (2 * 103 * 100 * 106) / (1250 * 8)

<= 2 * 10 * (103) km/sec

<= 20000