This section contains carefully selected MCQs and Previous Year Questions with explanations to help students understand concepts and prepare effectively for examinations, interviews, and competitive tests.
Q: 1Which of the following uses TCP?
Option C
In computer networks, protocols use either TCP or UDP depending on whether they need reliable communication. TCP (Transmission Control Protocol) provides reliable, connection-oriented data transfer with error checking.
SMTP, FTP, and HTTP all use TCP because they require reliable delivery of data. SMTP is used for sending emails, FTP for file transfer, and HTTP for web communication.
On the other hand, DHCP and TFTP use UDP because they need faster communication with less overhead and can tolerate some data loss.
Q: 2What is the ideal TCP window size of a sender to fully utilize a link of bandwidth 8192000bps and latency of 32ms?
Option D
To fully utilize a link, the TCP window size should be equal to the Bandwidth–Delay Product (BDP).
BDP=Bandwidth*Round Trip Time
Bandwidth = 8192000 bps
Latency = 32 ms = 0.032 s
BDP=8192000×0.032
BDP=262144 bits = 262144/8 = 32768 bytes.
Thus, the ideal TCP window size = 32768 bytes.
Q: 3Match TCP/IP layers and protocol –
| Column – I | Column – II |
|---|---|
| (P) Transport Layer | 1. ICMP |
| (Q) Network (Internet) Layer | 2. FTP |
| (R) Application Layer | 3. UDP |
Match Column — I and Column — II.
Option C
In the TCP/IP model, the Transport Layer uses protocols like TCP (Transmission Control Protocol) and UDP (User Datagram Protocol), where UDP (User Datagram Protocol) is connectionless and lightweight. The Network (Internet) Layer is responsible for routing and error reporting, and uses protocols like ICMP (Internet Control Message Protocol).
Finally, the Application layer supports end-user services such as FTP for file transfer, HTTP for web access, and SMTP for email.
Q: 4How many bits for ‘Fragment Offset’ field are there in IPv4 header?
Option C
The Fragment Offset field in the IPv4 header is 13 bits long. In the IPv4 header, the Fragment Offset field is used to indicate the position of a fragment in the original packet when fragmentation occurs.
Q: 5The size of source and destination addresses in IPv6 is?
Option C
In computer networks, an IP address is used to identify devices. In IPv6, the address size is much larger than IPv4 to support a huge number of devices.
An IPv6 address is 128 bits long, and both the source address and destination address fields in the IPv6 header use 128 bits each.
Q: 6The basic protocol used by TCP is
Option D
TCP (Transmission Control Protocol) is a connection-oriented and reliable transport layer protocol. Its main goal is to ensure that data is delivered correctly, in order, and without loss. To achieve this reliability, TCP uses a fundamental mechanism called the Sliding Window Protocol.
The Sliding Window Protocol controls how much data can be sent before receiving an acknowledgment. Instead of sending one packet at a time and waiting, TCP can send multiple packets within a “window,” improving efficiency and throughput while still maintaining reliability. It also helps in flow control and error control.
Q: 7The size of the total length field of IPv4 datagram is–
Option A
The Total Length field in an IPv4 datagram header is 16 bits long. This field specifies the complete size of the IP packet, which includes both the header and the data portion.
Because it is a 16-bit field, it can represent values ranging from a minimum of 20 bytes (when no payload) up to a maximum of 65535 bytes.
| FIELD NAME | SIZE |
|---|---|
| Version | 4 bits |
| IHL (Internet Header Length) | 4 bits |
| DSCP (Differentiated Services Code Point) | 6 bits |
| ECN (Explicit Congestion Notification) | 2 bits |
| Total Length | 16 bits |
| Identification | 16 bits |
| Flags | 3 bits |
| Fragment Offset | 13 bits |
| Time To Live (TTL) | 8 bits |
| Protocol | 8 bits |
| Header Checksum | 16 bits |
| Source IP Address | 32 bits |
| Destination IP Address | 32 bits |
| Options (if present) | Variable |
| Padding (if options present) | Variable |
Q: 8The three-way handshake mechanism in TCP aims to—
Option D
TCP (Transmission Control Protocol) is a connection-oriented protocol, which means it establishes a reliable connection before sending data. The three-way handshake involves three steps, SYN, SYN-ACK, and ACK.
After these three steps, the connection is established and both sides have agreed on initial sequence numbers.
Q: 9Which of the following layer is NOT part of TCP/IP model?
Option B
The TCP/IP model is a networking model that consists of four layers. These layers combine functions from the seven-layer OSI model into a simpler, practical setup.
Unlike the OSI model, the TCP/IP model does not include a separate Session Layer.
Q: 10ICMP protocol is a ________ layer protocol.
Option D
ICMP (Internet Control Message Protocol) is a network layer (Layer 3) protocol in the OSI model. It is used for sending error messages and network status information. For example, commands like ping and traceroute use ICMP to check if a device is reachable.
Q: 11Host C initiates two HTTP sessions to server B using source ports 26145 and 7532. Meanwhile, Host A — choosing source port numbers independently of C — also uses 26145 as the source port for its HTTP session to B. How does Server B correctly distinguish between these connections for communication?
Option C
In the TCP/IP protocol suite, each TCP connection is uniquely identified by a socket, which consists of four elements:
This combination is called a 4-Tuple. It ensures that even if multiple clients use the same source port number, or a single client opens multiple connections to the same server, the server can distinguish each connection uniquely.
Therefore, even though Host C and Host A both use source port 26145 to connect to Server B’s HTTP port, their source IPs differ, making the 4‑tuples unique. The server’s socket table tracks each connection by its 4‑tuple and can distinguish and route data correctly.
Q: 12Which of the following statements is true?
Option D
In computer networks, TCP and UDP are transport layer protocols with different characteristics.
TCP (Transmission Control Protocol) is connection-oriented and reliable, meaning it establishes a connection before data transfer and ensures data is delivered correctly and in order.
UDP (User Datagram Protocol) is connection-less and unreliable. It sends data without establishing a connection and does not guarantee delivery, order, or error correction, making it faster but less reliable.
Q: 13Which of the following statements are true regarding fragmentation and reassembly in IPv6?
A. IPv6 allows for fragmentation and reassembly at intermediate routers.
B. IPv6 allows for fragmentation and reassembly only at the source and destination.
C. IPv6 allows to intermediate routers forward the oversized packets.
D. IPv6 sends ICMP error message for oversized packets to the sender.
Option B
In IPv4, fragmentation could occur at both source and intermediate routers, meaning routers could break large packets into smaller fragments to fit the network’s Maximum Transmission Unit (MTU).
The IPv6 changed the approach to make packet handling faster and simpler. In IPv6, only the source node is allowed to perform fragmentation, and reassembly is done only at the destination, not at intermediate routers.
If a router receives a packet larger than the MTU, it does not fragment the packet. Instead, it drops the packet and sends an ICMPv6 “Packet Too Big” error message back to the sender.
Q: 14____________ protocol combines some aspects of UDP and TCP.
Option B
SCTP (Stream Control Transmission Protocol) is a transport layer protocol that combines features of both TCP and UDP.
UDP offers fast, connectionless message-oriented delivery (no reliability) and better support for real-time data.
TCP provides reliable, connection-oriented byte-stream delivery (ordered, error-checked). SCTP combines UDP message boundaries with TCP reliability features.
Q: 15In the congestion avoidance phase of the TCP congestion control algorithm, the size of the congestion window
Option C
TCP Congestion Control has different phases like Slow Start and Congestion Avoidance. In the congestion avoidance phase, the goal is to increase the transmission rate slowly to avoid network congestion.
In this phase, the congestion window (cwnd) grows linearly, not rapidly. After each RTT (Round Trip Time), the window size increases by 1 segment.
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.