Q: 1 Match 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.
P-2, Q-1, R-3
P-1, Q-2, R-3
P-3, Q-1, R-2
P-3, Q-2, R-1
[ 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: 2 How many bits for ‘Fragment Offset’ field are there in IPv4 header?
10 bits
32 bits
13 bits
16 bits
[ 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: 3 The size of the total length field of IPv4 datagram is–
16 bits
4 bits
8 bits
32 bits
[ 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: 4 The three-way handshake mechanism in TCP aims to—
Secure the communication.
Send bits from one device to another over an optical fibre connection.
Perform error detection and correction.
Establish connection and synchronize sequence numbers.
[ 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: 5 ICMP protocol is a ________ layer protocol.
Data link
Application
Transport
Network
[ 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: 6 Host 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?
Server B identifies each session using only the destination port value.
Server B blocks sessions that reuse any source port across different hosts.
Server B uses all four fields: source IP, source port, destination IP, destination port.
Server B accepts only one connection and rejects the duplicate port requests.
[ 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: 7 Which 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.
A and C
B and D
A and D
A and B
[ 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: 8 Which of the following is not a transport layer protocol in TCP/IP protocol suite?
TCP
SNMP
SCTP
UDP
[ Option B ]
In the TCP/IP Protocol Suite, the Transport Layer (OSI Model Layer 4) is responsible for providing end-to-end communication services for applications. Its main functions include reliable data delivery, flow control, error detection, and multiplexing.
TCP, UDP, and SCTP are transport layer protocols in the TCP/IP suite. TCP is reliable and connection-oriented, UDP is connectionless, SCTP is a message-oriented, reliable transport with multi-homing and multi-streaming.
SNMP (Simple Network Management Protocol) is an application layer protocol used for network management.
| LAYER NAME | COMMONLY USED PROTOCOLS |
|---|---|
| Application | HTTP, HTTPS, FTP, SFTP, SMTP, IMAP, POP3, DNS, DHCP, SNMP, Telnet, SSH, NTP |
| Presentation | TLS/SSL, MIME, JPEG, PNG, GIF, MPEG, ASCII/EBCDIC Conversion |
| Session | RPC, NetBIOS Sessions, PPTP, SMB |
| Transport | TCP, UDP, SCTP, DCCP, QUIC |
| Network | IP (IPv4/IPv6), ICMP, IGMP, ARP/ND, OSPF, RIP, BGP, IS-IS |
| Data Link | Ethernet (IEEE 802.3 MAC), Wi Fi 802.11 MAC, PPP, HDLC, Frame Relay, ATM, MPLS, ARP |
| Physical | Ethernet (IEEE 802.3), Wi Fi (802.11), SONET/SDH, DSL, Fiber, Coax, Bluetooth PHY, USB, ISDN |
Q: 9 In TCP header, if the value of HLEN field is 0111 then how many bytes of options will be included in the segment?
16
8
20
40
[ Option B ]
In the TCP header, the HLEN (Header Length) field indicates the length of the TCP header. The minimum header length is 20 bytes when no options are used. The HLEN field is 4 bits long, and its value tells how many 4-byte words are in the header.
Now,
HLEN = 0111 (binary) = 7 (decimal)
So, total TCP header length = 7 × 4 = 28 bytes
Since the standard TCP header (without options) is 20 bytes, the extra part = 28 – 20 = 8 bytes, which corresponds to the options field.
Q: 10 Which of the following correctly explains why DNS uses both UDP and TCP?
DNS uses UDP only for all types of data transfer.
DNS uses only UDP because it is faster and always reliable.
DNS uses TCP for tasks like zone transfers or large responses.
DNS switches from TCP to UDP when data exceeds 512 bytes.
[ Option C ]
The Domain Name System (DNS) is used to convert domain names (www.surakuacademy.com) into IP addresses that computers can understand. DNS mainly communicates over the Internet using two transport layer protocols:
For most regular DNS queries, UDP is used because it is fast and efficient. Since DNS requests and responses are usually small (less than 512 bytes), using UDP avoids the extra time needed to establish a connection, making it ideal for quick lookups such as finding the IP address of a website.
DNS also uses TCP in specific cases where reliability is required. When a DNS response exceeds 512 bytes, during zone transfers between servers, or if a UDP query fails, TCP provides a reliable, connection-oriented transfer.
In short, DNS uses UDP for speed and TCP for reliability and large data transfers, ensuring both efficiency and accuracy.
Q: 11 In IPv4, packet fragmentation and reassembly is handled by _______________.
using the More Fragments and Fragment Offset Fields
using the Header Checksum
encapsulating packets in larger data frames
using the MAC Header
[ Option A ]
In IPv4, a packet may need to be fragmented if it is larger than the Maximum Transmission Unit (MTU) of the network.
Fragmentation: The large packet is broken into smaller fragments.
Reassembly: The receiver combines the fragments back into the original packet.
IPv4 uses two fields in the IP header to manage this process:
These fields allow the receiver to correctly reassemble all fragments in order.
Q: 12 An IP packet has arrived with the first 8 bits as 01000010. Which of the following is correct?
The number of hops this packet can travel is 2.
The total number of bytes in header is 16 bytes.
The upper layer protocol is ICMP.
The receiver rejects the packet.
[ Option D ]
When an IP packet arrives, the first 8 bits of its header play a crucial role in determining how it is processed. These 8 bits are divided into two fields: the first 4 bits represent the IP version, and the next 4 bits indicate the Internet Header Length (IHL).
In this case, the first 8 bits are 01000010. The first 4 bits, 0100, correspond to version 4, which confirms that this is an IPv4 packet. The next 4 bits, 0010, represent the IHL value of 2.
The IHL specifies the number of 32-bit words in the header. Since each word equals 4 bytes, the total header length here is 2 × 4 = 8 bytes. However, the minimum valid IPv4 header length is 20 bytes (IHL = 5).
Therefore, an IHL value of 2 is invalid and indicates a malformed packet. As a result, the receiver will reject this packet because it does not meet the minimum requirements for processing.
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.