πŸŽ“ BookMCQ
← Back to 29. Peer to Peer Paradigm

πŸ“ K-buckets in Kademlia explained (10 MCQs)

πŸ“– From Data Communication and Networks β€’ 29. Peer to Peer Paradigm β€’ 10 questions available

What is K-buckets in Kademlia explained?

K-buckets in Kademlia are lists that store up to k nodes for each possible XOR distance range, prioritizing recently seen nodes and automatically replacing stale entries to maintain an accurate and responsive view of nearby peers.

3
Easy
5
Medium
2
Hard

πŸ“ All K-buckets in Kademlia explained MCQs

Q1. In the RTP packet header, what is the size of the Version (Ver) field?

A.2 bits βœ…
B.4 bits
C.8 bits
D.1 bit
πŸ’‘ Difficulty: easy | βœ… Correct: A

πŸ“– Explanation: The Version field occupies exactly two bits, allowing values 0‑3. RTP currently defines version 2, which fits within this 2‑bit space. The small size keeps the header compact while still permitting future version extensions. Hence, the correct answer is the 2‑bit option.

Q2. If the Padding (P) bit is set to 1, how must the receiver compute the actual RTP payload length?

A.Add the padding length to the UDP length
B.Use the Sequence number to infer length
C.Subtract the value of the last byte from the UDP length βœ…
D.Ignore the padding and use the UDP length directly
πŸ’‘ Difficulty: easy | βœ… Correct: C

πŸ“– Explanation: When P=1, the last byte of the packet indicates how many padding bytes were added. The receiver subtracts this value from the total UDP length (minus the RTP header) to obtain the true payload length. This subtraction yields the correct payload size.

Q3. When the Extension (X) bit equals 1, what additional structure appears in the RTP header?

A.A CSRC list is appended
B.An extension header follows the basic header βœ…
C.The payload type field is expanded
D.A new timestamp field is inserted
πŸ’‘ Difficulty: easy | βœ… Correct: B

πŸ“– Explanation: Setting X=1 signals that an optional extension header is present immediately after the fixed RTP header. This extension can carry extra information defined by the application. No other fields are altered, making the extension header the sole addition when X is set.

Q4. How does setting the Marker (M) bit affect stream synchronization compared to leaving it cleared?

A.It causes the packet to be encrypted
B.It indicates that the packet carries a control message
C.It has no effect on synchronization
D.It signals the end of a frame, allowing the decoder to know frame boundaries βœ…
πŸ’‘ Difficulty: medium | βœ… Correct: D

πŸ“– Explanation: The Marker bit is used by many codecs to mark significant events, such as the end of a video frame. When set, the decoder can recognize frame boundaries, improving synchronization and reducing jitter. Leaving it cleared provides no such cue, potentially causing misalignment.

Q5. If the Contributor Count field is set to its maximum value, how does the RTP header size change?

A.Header grows by 60 bytes (15 CSRC entries) βœ…
B.Header size remains unchanged
C.Header grows by 4 bytes
D.Header grows by 15 bits
πŸ’‘ Difficulty: medium | βœ… Correct: A

πŸ“– Explanation: A maximum contributor count of 15 means fifteen 32‑bit CSRC identifiers are appended. Each CSRC adds 4 bytes, so the header expands by 15Γ—4=6015 \times 4 = 60 bytes. No other fields change size, making the 60‑byte increase the correct effect.

Q6. In what way does the Timestamp field assist a jitter buffer in handling variable network delay?

A.It encodes the codec type
B.It provides the sampling instant, enabling proper playout timing βœ…
C.It indicates packet loss
D.It determines the packet size
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: The Timestamp conveys the sampling instant of the first byte in the payload. A jitter buffer uses this value to schedule playback at the correct moment, compensating for network delay variability. By aligning packets according to their timestamps, smooth media delivery is achieved.

Q7. When transmitting encrypted RTP payloads that require padding, which fields must be configured and how does the receiver recover the original payload length?

A.Set P=0 and X=1; receiver uses extension header length
B.Set P=1 and M=1; receiver ignores padding
C.Set P=1; receiver reads last padding byte to subtract from UDP length βœ…
D.Set X=0 and M=0; receiver uses sequence number
πŸ’‘ Difficulty: hard | βœ… Correct: C

πŸ“– Explanation: For encrypted data, padding is added and indicated by setting P=1. The last byte of the packet contains the padding length. The receiver subtracts this value from the total UDP length (after removing the RTP header) to obtain the true payload size, ensuring correct decryption.

Q8. If the 16‑bit Sequence Number wraps after 2162^{16} packets, what is the consequence for detecting packet loss?

A.Loss detection becomes impossible after wrap
B.Wrap causes duplicate packets
C.Receiver must compare relative ordering using modulo arithmetic
D.Sequence numbers are ignored βœ…
πŸ’‘ Difficulty: hard | βœ… Correct: D

πŸ“– Explanation: When the sequence number reaches its maximum (6553565535) and wraps to zero, the receiver must interpret numbers modulo 2162^{16}. By comparing the difference between successive numbers, it can still identify gaps that indicate packet loss, despite the wraparound.

Q9. How does RTP differ from TCP regarding out‑of‑order delivery, and which RTP header field enables the receiver to reorder packets?

A.RTP allows out‑of‑order packets and uses the Sequence Number field to reorder βœ…
B.RTP guarantees in‑order delivery like TCP
C.RTP uses the Timestamp field for reordering
D.RTP relies on the Payload Type field
πŸ’‘ Difficulty: medium | βœ… Correct: A

πŸ“– Explanation: RTP does not enforce reliable, in‑order delivery; packets may arrive out of sequence. The 16‑bit Sequence Number field provides a logical order, enabling the receiver to reorder packets before decoding. TCP, by contrast, ensures ordered delivery at the transport layer.

Q10. What is the relationship between the Payload Type field and codec negotiation in RTP streams?

A.Payload Type directly carries the codec name
B.Payload Type value maps to a codec agreed upon in SDP, enabling dynamic codec selection βœ…
C.Payload Type indicates packet size
D.Payload Type is unrelated to codec
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: During session setup, the SDP exchange assigns specific Payload Type numbers to codecs. The RTP header then carries this numeric value, allowing the receiver to select the correct codec for decoding. Thus, the Payload Type serves as a reference to the negotiated codec, not the codec itself.

πŸ”— Related Topics (MCQs)