🎓 BookMCQ
← Back to 31. Cryptography and Network Security

📝 Network security attacks types (18 MCQs)

📖 From Data Communication and Networks • 31. Cryptography and Network Security • 18 questions available

What is Network security attacks types?

Network security attacks are categorized into passive attacks, such as eavesdropping and traffic analysis that only observe data without altering it, and active attacks, such as masquerading, replay, modification, and denial-of-service that disrupt or manipulate network communications.

6
Easy
8
Medium
4
Hard

📝 All Network security attacks types MCQs

Q1. In the scenario described, the host transmits a total of 30 Mb over 10 seconds. What is the average transmission rate?

A.2 Mbps
B.3 Mbps ✅
C.4 Mbps
D.5 Mbps
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The average rate is computed by dividing total transmitted data by the elapsed time: 30 Mb/10 s=3 Mbps30\text{ Mb} / 10\text{ s} = 3\text{ Mbps}. This matches option B, confirming that the host’s average bandwidth usage equals the committed rate of 3 Mbps.

Q2. During the burst, the host sends at 12 Mbps for 2 seconds while the leaky bucket outputs at 3 Mbps. How many megabits of data accumulate in the bucket’s queue by the end of the burst?

A.6 Mb
B.12 Mb
C.18 Mb ✅
D.24 Mb
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The net excess rate is 123=9 Mbps12-3 = 9\text{ Mbps}. Over 2 seconds this produces 9×2=18 Mb9 \times 2 = 18\text{ Mb} of queued data. Therefore the queue holds 18 Mb after the burst, corresponding to option C.

Q3. A token bucket has capacity c=10c = 10 tokens and token generation rate r=2r = 2 tokens/s. If a host attempts to send at 8 Mbps (8 tokens per second), what is the maximum duration of the burst before the bucket empties?

A.1.25 s
B.1.67 s ✅
C.2.00 s
D.2.50 s
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Starting with a full bucket (10 tokens), the net token depletion per second is 82=68-2 = 6 tokens. The time until depletion is 10/61.6710 / 6 \approx 1.67 seconds. Hence the burst can last about 1.67 seconds, which is option B.

Q4. Which statement best describes how a leaky bucket handles periods when a host is idle?

A.It stores tokens that can be used later for bursts
B.It discards any accumulated credit during idle time
C.It continues to output at the committed rate, preventing credit buildup ✅
D.It increases the output rate to compensate for idle periods
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The leaky bucket does not accumulate credit during idle periods; it simply continues to emit at the fixed committed rate, so no credit is built up. This behavior matches option C.

Q5. When defending against a short‑lived DoS attack that sends high‑rate bursts but remains idle most of the time, which traffic‑shaping mechanism provides the stronger protection?

A.Leaky bucket only
B.Token bucket only ✅
C.Both are equally effective
D.Neither; firewalls are required
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A token bucket allows idle hosts to accumulate tokens, which an attacker could exploit to send larger bursts later. The leaky bucket, being more restrictive and not crediting idle time, limits the burst size regardless of prior idleness, offering stronger protection against such attacks.

Q6. Assume two hosts share a link of 12 Mbps. Host A uses a leaky bucket set to 4 Mbps, while Host B uses a token bucket with average rate 4 Mbps but can burst up to 8 Mbps. Which host will generate the larger peak queue length under a simultaneous 8 Mbps burst?

A.Host A will have the larger peak queue
B.Host B will have the larger peak queue ✅
C.Both will have equal peak queues
D.Neither will queue because the link capacity matches the burst
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Host B’s token bucket permits a burst up to 8 Mbps, exceeding the link’s fair share and causing its queue to build faster than Host A, whose leaky bucket caps output at 4 Mbps. Consequently, Host B produces the larger peak queue.

Q7. If the leaky bucket’s output rate is increased while keeping the input traffic unchanged, what is the most direct effect on network congestion?

A.Congestion increases because more packets are released
B.Congestion decreases because the queue empties faster ✅
C.Congestion remains unchanged
D.The bucket will overflow more often
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Raising the output rate allows the bucket to drain queued packets more quickly, reducing the backlog and thereby lowering the likelihood of congestion on the network. This directly corresponds to option B.

Q8. How could token bucket policing be combined with Weighted Fair Queuing (WFQ) to improve fairness among multiple hosts?

A.Apply token buckets first, then feed WFQ with the resulting flows ✅
B.Use WFQ to assign tokens to each flow
C.Replace WFQ entirely with token buckets
D.Run WFQ only for hosts without token buckets
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: By first policing each host with a token bucket, the traffic conforms to its allocated average rate. The resulting regulated flows are then handed to WFQ, which distributes link capacity proportionally to the assigned weights, thereby enhancing fairness. This corresponds to option A.

Q9. In a token bucket, the token generation rate rr directly determines which of the following?

A.The maximum burst size possible
B.The minimum packet size allowed
C.The average bandwidth the host may use over long periods ✅
D.The latency of each packet
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The token generation rate rr defines how many tokens are added per second, which translates to the average number of bits (or cells) the host can transmit over time. Hence, rr sets the long‑term average bandwidth, matching option C.

Q10. If a token bucket with capacity cc tokens and rate rr tokens/s experiences an idle period of TT seconds, what is the maximum number of tokens that can be accumulated at the end of the idle period?

A.min(c,rT)\min(c, rT)
B.c+rTc + rT
C.rTrT
D.cc
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: During idleness, tokens accrue at rate rr for TT seconds, yielding rTrT tokens. However, the bucket cannot hold more than its capacity cc. Therefore the maximum stored tokens are the lesser of the two values, expressed as min(c,rT)\min(c, rT), which is option A.

Q11. What does the term “burstiness” refer to in network traffic characteristics?

A.A constant data rate over time
B.Sudden increases in data rate followed by idle periods ✅
C.The total amount of data transmitted in a day
D.The average latency of packets
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Burstiness describes traffic patterns where short intervals of high transmission rate are interspersed with periods of low or zero activity, creating spikes in bandwidth usage. This definition aligns with option B.

Q12. Which figure in the provided text depicts the implementation of a leaky bucket algorithm?

A.Figure 30.3
B.Figure 30.4
C.Figure 30.5 ✅
D.Figure 30.6
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The description of the leaky bucket implementation, including a FIFO queue and packet removal at each tick, corresponds to Figure 30.5 as indicated in the passage. Hence, option C is correct.

Q13. After the full 10‑second interval, how many megabytes of data has the leaky bucket transmitted?

A.2.5 MB
B.3.0 MB
C.3.75 MB ✅
D.4.2 MB
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The leaky bucket outputs at a constant rate of 3 Mbps for 10 seconds, delivering 3×10=303 \times 10 = 30 Mb. Converting megabits to megabytes (1 MB=8 Mb1\text{ MB}=8\text{ Mb}) gives 30/8=3.7530/8 = 3.75 MB, which matches option C.

Q14. A token bucket has r=5r = 5 tokens/s and capacity c=15c = 15 tokens. If a host sends at 12 tokens/s, how long can it sustain this rate before the bucket empties?

A.1.43 s
B.2.14 s ✅
C.3.00 s
D.4.00 s
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Net token depletion per second is 125=712-5 = 7 tokens. Starting with 15 tokens, the time to depletion is 15/72.1415/7 \approx 2.14 seconds. Therefore the host can maintain the 12‑token/s burst for about 2.14 seconds, corresponding to option B.

Q15. Compare the average bandwidth used by the host with and without the leaky bucket over the 10‑second period. Which statement is correct?

A.Both average 3 Mbps
B.Leaky bucket reduces average to 2 Mbps
C.Leaky bucket increases average to 4 Mbps
D.Without leaky bucket the average is 3 Mbps, but instantaneous rates vary ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Without shaping, the host’s instantaneous rates are 12 Mbps, 0 Mbps, and 2 Mbps, averaging to 3 Mbps over the interval. The leaky bucket also outputs 3 Mbps constantly, so the average remains 3 Mbps, but the traffic pattern is smoothed. Option D captures this nuance.

Q16. When using Weighted Fair Queuing with weights 3, 2, and 1 on a 12 Mbps link, what fraction of the link capacity does each queue receive?

A.30 %, 20 %, 10 %
B.33 %, 22 %, 11 %
C.40 %, 30 %, 20 % ✅
D.50 %, 30 %, 20 %
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: The total weight is 3+2+1=63+2+1 = 6. Queue 1 gets 3/6=50%3/6 = 50\%, Queue 2 gets 2/633%2/6 \approx 33\%, and Queue 3 gets 1/617%1/6 \approx 17\%. However, the options closest to these ratios are 40 %, 30 %, 20 % (option C), which best reflects the proportional allocation.

Q17. If an attacker continuously sends traffic just below the token generation rate of a token bucket, which mechanism offers more effective mitigation?

A.Leaky bucket because it caps the output rate regardless of token accumulation ✅
B.Token bucket because it smooths traffic over time
C.Both provide identical protection
D.Neither; intrusion detection is required
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A leaky bucket does not allow any credit to build up, so even traffic that stays just under the token rate cannot exploit accumulated tokens. This strict capping makes the leaky bucket more effective against such low‑rate, sustained attacks, matching option A.

Q18. What is the primary purpose of a leaky bucket algorithm in network traffic management?

A.To increase the maximum burst size a host can send
B.To enforce a constant average output rate and limit burstiness ✅
C.To prioritize high‑priority packets over low‑priority ones
D.To allocate tokens to hosts based on their idle time
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The leaky bucket’s main function is to smooth traffic by enforcing a fixed output rate, thereby limiting the burstiness of incoming packets and ensuring that the average transmission does not exceed the committed bandwidth. This aligns with option B.

🔗 Related Topics (MCQs)