Docsity

CS6250 COMPUTER NETWORKS EXAM, Assignments of Computer Networks

Partial preview of the text

Download CS6250 COMPUTER NETWORKS EXAM and more Assignments Computer Networks in PDF only on Docsity!

CS6250 (Computer Networks) &Computer Networking:

A Top-Down Approach Exam

Topic 1: Introduction & Internet Structure

Q1. What is the primary difference between the network edge and the network core?

  • A) Edge is fiber; core is wireless
  • B) Edge contains end systems/hosts; core is the mesh of routers connecting them
  • C) Edge runs only UDP; core runs only TCP
  • D) They are the same thing Answer: B Rationale: End systems (hosts) sit at the edge; the core is the interconnected router mesh. A and C are factually wrong; D is false. Q2. Which delay component depends on the number of packets queued ahead of a packet?
  • A) Transmission delay
  • B) Propagation delay
  • C) Queuing delay
  • D) Processing delay Answer: C Rationale: Queuing delay = time waiting in buffer. Transmission = L/R (packet length / link rate). Propagation = d/s (distance / speed). Processing is router lookup time. Q3. A 1,000-byte packet is sent over a 10 Mbps link. What is the transmission delay?
  • A) 0.1 ms
  • B) 0.8 ms
  • C) 8 ms
  • D) 80 ms
  • C) A transport-layer protocol
  • D) Connectionless at the transport layer Answer: B Rationale: HTTP is stateless; cookies add state. HTTP runs over TCP (connection- oriented), so D is wrong. It's an application-layer protocol, so C is wrong. Q7. In HTTP/1.1 with persistent connections and pipelining:
  • A) Each object needs a new TCP connection
  • B) Multiple requests can be sent without waiting for responses
  • C) The server must close the connection after each response
  • D) Only one object per connection Answer: B Rationale: Pipelining lets clients send multiple requests back-to-back on one persistent connection. A and D describe non-persistent; C is false. Q8. DNS primarily uses which transport protocol and port?
  • A) TCP, port 53
  • B) UDP, port 53
  • C) TCP, port 80
  • D) UDP, port 25 Answer: B Rationale: DNS queries use UDP/53 by default. TCP/53 is used for zone transfers and large responses, but the standard query is UDP. Q9. In a pure P2P file distribution, as the number of peers N grows, the distribution time:
  • A) Grows linearly
  • B) Grows logarithmically
  • C) Stays roughly constant (bounded)
  • D) Grows quadratically Answer: C Rationale: In P2P, each peer uploads as well as downloads, so capacity scales with N. Client-server grows linearly with N; P2P is bounded by the initial seeder's upload and the slowest peer. Q10. Which socket type is connection-oriented and provides reliable, ordered byte-stream delivery?
  • A) UDP socket
  • B) TCP socket
  • C) Raw socket
  • D) ICMP socket Answer: B Rationale: TCP provides reliable, ordered byte-stream service. UDP is unreliable datagrams. Q11. A CDN improves performance primarily by:
  • A) Increasing server CPU speed
  • B) Caching content closer to users
  • C) Using only UDP
  • D) Eliminating DNS Answer: B Rationale: CDNs replicate content at edge servers near users, reducing latency and origin load. DNS is actually used to direct users to nearby CDN nodes (so D is wrong).

Q15. In TCP, the sequence number in a segment refers to:

  • A) The segment number
  • B) The byte number of the first byte in the segment's data
  • C) The packet number
  • D) The ACK number Answer: B Rationale: TCP is byte-oriented; sequence numbers count bytes, not segments. Q16. TCP congestion control's slow start phase:
  • A) Increases cwnd by 1 MSS per RTT
  • B) Doubles cwnd every RTT
  • C) Keeps cwnd constant
  • D) Decreases cwnd exponentially Answer: B Rationale: In slow start, cwnd increases by 1 MSS per ACK, effectively doubling each RTT. Congestion avoidance increases by 1 MSS per RTT (A). Q17. After a timeout, TCP Tahoe sets:
  • A) cwnd = 1 MSS, ssthresh = cwnd/
  • B) cwnd = cwnd/
  • C) cwnd = ssthresh
  • D) cwnd unchanged Answer: A Rationale: Tahoe resets cwnd to 1 MSS and sets ssthresh to half the cwnd at loss. Reno (fast recovery) sets cwnd = ssthresh (B/C).

Q18. What does TCP's fast retransmit trigger on?

  • A) Timeout
  • B) Three duplicate ACKs
  • C) One duplicate ACK
  • D) Receiving a FIN Answer: B Rationale: Three duplicate ACKs indicate a lost segment; retransmit without waiting for timeout.

Topic 4: Reliable Data Transfer (rdt)

Q19. In rdt 2.0, what problem does the checksum address?

  • A) Lost packets
  • B) Bit errors
  • C) Duplicate packets
  • D) Reordering Answer: B Rationale: rdt 2.0 adds checksums to detect bit errors. Lost packets are handled in rdt 3.0 (timeouts); duplicates via sequence numbers. Q20. Why does rdt 2.1 need sequence numbers?
  • A) To detect bit errors
  • B) To detect duplicate packets caused by retransmissions
  • C) To route packets
  • D) To compress data

Rationale: SR buffers out-of-order segments and ACKs each individually. Window size must be ≤ half the sequence number space to avoid ambiguity.

Topic 5: Network Layer Intro

Q24. The primary function of a router's forwarding table is:

  • A) Store web content
  • B) Map destination prefixes to output links
  • C) Assign IP addresses
  • D) Encrypt packets Answer: B Rationale: Forwarding uses the FIB to match destination prefix → outgoing interface. Routing protocols build these tables. Q25. Longest prefix matching means:
  • A) Match the shortest prefix
  • B) Match the most specific (longest) prefix
  • C) Match any prefix
  • D) Match the default route first Answer: B Rationale: If multiple prefixes match, the longest (most specific) wins. Q26. Which is NOT a network-layer function?
  • A) Forwarding
  • B) Routing
  • C) Congestion control at the transport layer
  • D) Addressing Answer: C Rationale: TCP congestion control is transport-layer. Forwarding, routing, and addressing are network-layer. Q27. An IP address is 32 bits. How many addresses are possible?
  • A) 2³² ≈ 4.3 billion
  • B) 2¹⁶
  • C) 2⁶⁴
  • D) 2⁸ Answer: A Rationale: IPv4 is 32-bit → 2³² ≈ 4.29×10⁹ addresses. IPv6 is 128-bit.

Quick Reference: Key Formulas

  • Transmission delay: L / R (bits / bps)
  • Propagation delay: d / s (distance / propagation speed ≈ 2×10⁸ m/s)
  • End-to-end delay: Σ (processing + queuing + transmission + propagation)
  • Throughput: min(R₁ … Rₙ)
  • Stop-and-wait utilization: (L/R) / (RTT + L/R)
  • Pipelining utilization: N × (L/R) / (RTT + L/R)
  • TCP cwnd growth: slow start doubles per RTT; congestion avoidance + MSS/RTT
  • TCP throughput ≈ (0.75 × W) / RTT (for loss-based steady state)

Rationale: d = 2.5×10⁶ m, s = 2.5×10⁸ m/s. d/s = 2.5×10⁶ / 2.5×10⁸ = 0.01 s = 10 ms. Q29. Traffic intensity (La/R) approaching 1 means:

  • A) No queuing delay
  • B) Average queuing delay grows without bound
  • C) Packets are dropped immediately
  • D) Transmission delay is zero Answer: B Rationale: When arrival rate L·a approaches link rate R, the queue grows large and average queuing delay → ∞. If La/R > 1, the queue grows unbounded (in theory). Q30. A 5 MB file is sent over a 2 Mbps link. Ignoring headers and propagation, how long does transmission take?
  • A) 10 s
  • B) 20 s
  • C) 40 s
  • D) 2.5 s Answer: B Rationale: 5 MB = 5×10⁶ bytes = 40×10⁶ bits. 40×10⁶ / 2×10⁶ = 20 s. (If using 5×2²⁰ bytes, answer ≈ 21 s; exam convention matters.) Q31. Which of the following is NOT a source of packet delay in a router?
  • A) Processing delay
  • B) Queuing delay
  • C) Transmission delay
  • D) Encryption delay

Answer: D Rationale: The four nodal delays are processing, queuing, transmission, propagation. Encryption is not one of them. Q32. Traceroute exploits which protocol feature?

  • A) TCP SYN packets
  • B) ICMP Time Exceeded messages with incrementing TTL
  • C) UDP checksums
  • D) DNS recursion Answer: B Rationale: Traceroute sends packets with TTL = 1, 2, 3… Each router that decrements TTL to 0 returns ICMP Time Exceeded, revealing the path.

Topic 7: Application Layer (Advanced)

Q33. In HTTP/2, the main improvement over HTTP/1.1 is:

  • A) Statelessness
  • B) Multiplexing multiple streams over one TCP connection
  • C) Replacing TCP with UDP
  • D) Eliminating headers Answer: B Rationale: HTTP/2 introduces binary framing and stream multiplexing over a single TCP connection, reducing head-of-line blocking at the HTTP layer (though TCP HOL remains). Q34. HTTP/3 differs from HTTP/2 primarily by:
  • A) Using TCP

- C) PATCH

- D) CONNECT

Answer: B Rationale: PUT is idempotent (repeating it yields the same state). POST is not. GET, HEAD, PUT, DELETE are idempotent; POST and PATCH generally are not. Q38. In BitTorrent, the "rarest first" policy:

  • A) Prioritizes the most common chunks
  • B) Prioritizes the least replicated chunks to improve availability
  • C) Randomly selects chunks
  • D) Downloads sequentially Answer: B Rationale: Rarest first improves chunk availability and swarm health. Tit-for-tat governs who to upload to. Q39. SMTP is used for:
  • A) Retrieving mail from a server
  • B) Sending/pushing mail between servers and from clients
  • C) Encrypting mail
  • D) Filtering spam Answer: B Rationale: SMTP pushes mail. Retrieval uses POP3, IMAP, or HTTP. Q40. A cookie is:
  • A) A server-side file
  • B) A small piece of data stored client-side, sent in HTTP headers
  • C) A DNS record
  • D) A TCP option Answer: B Rationale: Cookies are stored by the browser and sent via the Cookie header. The server may also store a matching record. Q41. In a client-server architecture, the primary scalability bottleneck is:
  • A) Client bandwidth
  • B) Server upload bandwidth and processing
  • C) DNS
  • D) The link layer Answer: B Rationale: As N grows, server must serve N clients; upload bandwidth and CPU become bottlenecks. P2P distributes this. Q42. Non-persistent HTTP with 10 embedded objects requires approximately how many RTTs (ignoring transmission)?
  • A) 1
  • B) 2 + 2×10 = 22
  • C) 10
  • D) 2 Answer: B Rationale: 2 RTTs for base HTML (TCP + request/response), then 2 RTTs per object. Total ≈ 2 + 2×10 = 22 RTTs. Persistent with pipelining ≈ 2 RTTs + small.

Topic 8: Transport Layer (Advanced)

  • A) Each byte is ACKed individually
  • B) ACK n acknowledges all bytes up to n−
  • C) ACKs are optional
  • D) ACKs are sent for every other packet Answer: B Rationale: TCP uses cumulative ACKs: ACK number n means "next expected byte is n," so all bytes < n are acknowledged. Q47. Nagle's algorithm:
  • A) Increases latency by batching small sends
  • B) Reduces small-packet overhead by coalescing
  • C) Disables congestion control
  • D) Increases throughput at all times Answer: B Rationale: Nagle's algorithm buffers small sends until an ACK arrives or MSS is reached, reducing tinygram overhead. Can increase latency for interactive apps (often disabled with TCP_NODELAY). Q48. TCP's delayed ACK:
  • A) Sends ACK immediately
  • B) Waits up to ~500 ms or until 2 segments arrive
  • C) Never sends ACK
  • D) Sends ACK every 10 segments Answer: B Rationale: Delayed ACK waits up to 500 ms (typ. 200 ms) or until a second segment arrives, reducing ACK overhead. Can interact badly with Nagle.

Q49. In TCP, ssthresh is set to what value after a triple-duplicate-ACK loss in Reno?

  • A) cwnd/
  • B) 2×cwnd
  • C) 1 MSS
  • D) Unchanged Answer: A Rationale: ssthresh = cwnd/2; cwnd = ssthresh (fast recovery) in Reno. Tahoe sets cwnd = 1. Q50. TCP CUBIC and BBR are:
  • A) Routing protocols
  • B) Alternative congestion control algorithms
  • C) Transport-layer security protocols
  • D) Application-layer protocols Answer: B Rationale: CUBIC uses a cubic function of time since last loss; BBR models bottleneck bandwidth and RTT. Both replace/ augment loss-based AIMD. Q51. TCP's TIME_WAIT state:
  • A) Is optional
  • B) Lasts 2×MSL to ensure late packets are handled
  • C) Lasts 1 RTT
  • D) Is the same as CLOSE_WAIT Answer: B Rationale: TIME_WAIT lasts 2× Maximum Segment Lifetime (~2 min) to allow retransmitted FINs and stale packets to die. CLOSE_WAIT is a different state.