Engineering, Management, Agriculture and Veterinary MCQs are now live. FPSC, PPSC, EPE, IELTS & GRE coming soon.

Computer Networks: Network Protocols

Electrical Engineering · Computer Networks

27 questions, each with the answer and a worked solution.

Practice interactively and track your score →
Question 1

Which protocol establishes a reliable connection before transferring application data?

  1. UDP
  2. ARP
  3. TCP
  4. ICMP
Show answer & solution

Answer: (C) TCP

TCP uses a three-way handshake.

Question 2

What are the steps of the TCP three-way handshake?

  1. SYN, SYN-ACK, ACK
  2. SYN, FIN, ACK
  3. GET, POST, PUT
  4. ACK, SYN, FIN
Show answer & solution

Answer: (A) SYN, SYN-ACK, ACK

It synchronises sequence numbers before data transfer.

Question 3

What is the main characteristic of UDP?

  1. It uses a three-way handshake
  2. It is used only for email
  3. It guarantees delivery
  4. It is connectionless and fast but does not guarantee delivery
Show answer & solution

Answer: (D) It is connectionless and fast but does not guarantee delivery

UDP suits video streaming, VoIP and DNS queries.

Question 4

Which port number is used by HTTP?

  1. 21
  2. 25
  3. 80
  4. 443
Show answer & solution

Answer: (C) 80

HTTPS uses port 443.

Question 5

Which port number is used by HTTPS?

  1. 53
  2. 80
  3. 110
  4. 443
Show answer & solution

Answer: (D) 443

HTTPS encrypts web traffic with TLS.

Question 6

Which protocol is used for sending email between mail servers?

  1. SMTP
  2. IMAP
  3. POP3
  4. FTP
Show answer & solution

Answer: (A) SMTP

SMTP uses port 25 (and 587 for submission).

Question 7

Which protocol downloads email from a server to a client, typically removing it from the server?

  1. SMTP
  2. POP3
  3. IMAP
  4. SNMP
Show answer & solution

Answer: (B) POP3

IMAP keeps mail synchronised on the server.

Question 8

Which protocol is used for transferring files between computers over a network?

  1. FTP
  2. SMTP
  3. SNMP
  4. ARP
Show answer & solution

Answer: (A) FTP

FTP uses ports 20 and 21.

Question 9

Which protocol provides secure encrypted remote login?

  1. FTP
  2. HTTP
  3. SSH
  4. Telnet
Show answer & solution

Answer: (C) SSH

SSH uses port 22; Telnet is unencrypted.

Question 10

Which protocol is used by the ping command?

  1. FTP
  2. TCP
  3. UDP only
  4. ICMP
Show answer & solution

Answer: (D) ICMP

Ping sends ICMP echo requests.

Question 11

Which protocol is used to monitor and manage network devices?

  1. SNMP
  2. SMTP
  3. FTP
  4. HTTP
Show answer & solution

Answer: (A) SNMP

SNMP collects device statistics.

Question 12

Which IEEE standard defines wired Ethernet?

  1. IEEE 802.11
  2. IEEE 802.3
  3. IEEE 802.16
  4. IEEE 802.15
Show answer & solution

Answer: (B) IEEE 802.3

IEEE 802.11 is Wi-Fi.

Question 13

Which media access method was used by classic shared Ethernet?

  1. CSMA/CA
  2. TDMA
  3. CSMA/CD
  4. Token passing
Show answer & solution

Answer: (C) CSMA/CD

Collisions were detected and retransmitted.

Question 14

Which media access method is used by Wi-Fi?

  1. Token ring
  2. CSMA/CD
  3. CSMA/CA
  4. Polling only
Show answer & solution

Answer: (C) CSMA/CA

Collision avoidance is used because collisions are hard to detect wirelessly.

Question 15

Which routing protocol uses hop count as its metric with a maximum of 15 hops?

  1. RIP
  2. BGP
  3. EIGRP only
  4. OSPF
Show answer & solution

Answer: (A) RIP

RIP is a distance-vector protocol.

Question 16

Which routing protocol is a link-state protocol widely used inside organisations?

  1. RIP
  2. BGP
  3. ARP
  4. OSPF
Show answer & solution

Answer: (D) OSPF

OSPF uses Dijkstra's algorithm.

Question 17

Which routing protocol exchanges routes between autonomous systems on the Internet?

  1. OSPF
  2. BGP
  3. DHCP
  4. RIP
Show answer & solution

Answer: (B) BGP

BGP is the Internet's inter-domain routing protocol.

Question 18

How many bits are used for TCP and UDP port numbers?

  1. 8
  2. 16
  3. 32
  4. 48
Show answer & solution

Answer: (B) 16

Ports range from 0 to 65,535.

Question 19

Which protocol synchronises clocks of computers over a network?

  1. ARP
  2. SMTP
  3. NTP
  4. FTP
Show answer & solution

Answer: (C) NTP

Accurate time is important for logs and protection systems.

Question 20

What is the main purpose of TCP's sliding window?

  1. Flow control, allowing several segments to be sent before acknowledgement
  2. Routing
  3. Encryption
  4. Address resolution
Show answer & solution

Answer: (A) Flow control, allowing several segments to be sent before acknowledgement

Window size adapts to network conditions.

Question 21

Which protocol is used by web browsers to request web pages?

  1. ARP
  2. SNMP
  3. SMTP
  4. HTTP
Show answer & solution

Answer: (D) HTTP

HTTP methods include GET and POST.

Question 22

Which application-layer protocol is commonly used for IoT and industrial messaging because it is lightweight?

  1. MQTT
  2. FTP
  3. POP3
  4. Telnet
Show answer & solution

Answer: (A) MQTT

MQTT uses a publish–subscribe model.

Question 23

What does the TTL (time to live) field in an IP packet prevent?

  1. Address assignment
  2. Error correction
  3. Packets circulating forever in routing loops
  4. Packet encryption
Show answer & solution

Answer: (C) Packets circulating forever in routing loops

Each router decrements TTL by one.

Question 24

What is the main difference between TCP and UDP?

  1. TCP is connection-oriented and reliable, while UDP is connectionless with no delivery guarantee
  2. UDP is reliable and TCP is not
  3. Both are identical
  4. TCP is used only for email
Show answer & solution

Answer: (A) TCP is connection-oriented and reliable, while UDP is connectionless with no delivery guarantee

Applications choose based on reliability versus speed.

Question 25

Which port number does DNS use?

  1. 25
  2. 53
  3. 80
  4. 110
Show answer & solution

Answer: (B) 53

DNS uses UDP for most queries and TCP for large transfers.

Question 26

Which protocol securely transfers files using SSH?

  1. HTTP
  2. TFTP
  3. FTP
  4. SFTP
Show answer & solution

Answer: (D) SFTP

Plain FTP sends passwords unencrypted.

Question 27

What is the function of DHCP lease time?

  1. The password expiry
  2. The cable length
  3. The period for which an assigned IP address is valid before renewal
  4. The download speed
Show answer & solution

Answer: (C) The period for which an assigned IP address is valid before renewal

Leases allow addresses to be reused.

Practice these 27 questions interactively →