250+ TOP MCQs on Network Layer and Answers

Computer Networks Multiple Choice Questions on “Network Layer”.

1. The network layer is concerned with __________ of data.
a) bits
b) frames
c) packets
d) bytes

Answer: c
Clarification: In computer networks, the data from the application layer is sent to the transport layer and is converted to segments. These segments are then transferred to the network layer and these are called packets. These packets are then sent to data link layer where they are encapsulated into frames. These frames are then transferred to physical layer where the frames are converted to bits.

2. Which one of the following is not a function of network layer?
a) routing
b) inter-networking
c) congestion control
d) error control

Answer: d
Clarification: In the OSI model, network layer is the third layer and it provides data routing paths for network communications. Error control is a function of the data link layer and the transport layer.

3. A 4 byte IP address consists of __________
a) only network address
b) only host address
c) network address & host address
d) network address & MAC address

Answer: c
Clarification: An ip address which is 32 bits long, that means it is of 4 bytes and is composed of a network and host portion and it depends on address class. The size of the host address and network address depends upon the class of the address in classful IP addressing.

4. In virtual circuit network each packet contains ___________
a) full source and destination address
b) a short VC number
c) only source address
d) only destination address

Answer: b
Clarification: A short VC number also called as VCID (virtual circuit identifier) is a type of identifier which is used to distinguish between several virtual circuits in a connection oriented circuit switched network. Each virtual circuit is used to transfer data over a larger packet switched network.

5. Which of the following routing algorithms can be used for network layer design?
a) shortest path algorithm
b) distance vector routing
c) link state routing
d) all of the mentioned

Answer: d
Clarification: The routing algorithm is what decides where a packet should go next. There are several routing techniques like shortest path algorithm, static and dynamic routing, decentralized routing, distance vector routing, link state routing, Hierarchical routing etc. The routing algorithms go hand in hand with the operations of all the routers in the networks. The routers are the main participants in these algorithms.

6. Which of the following is not correct in relation to multi-destination routing?
a) is same as broadcast routing
b) contains the list of all destinations
c) data is not sent by packets
d) there are multiple receivers

Answer: c
Clarification: In multi-destination routing, there is more than one receiver and the route for each destination which is contained in a list of destinations is to be found by the routing algorithm. Multi-destination routing is also used in broadcasting.

7. A subset of a network that includes all the routers but contains no loops is called ________
a) spanning tree
b) spider structure
c) spider tree
d) special tree

Answer: a
Clarification: Spanning tree protocol (STP) is a network protocol that creates a loop free logical topology for ethernet networks. It is a layer 2 protocol that runs on bridges and switches. The main purpose of STP is to ensure that you do not create loops when you have redundant paths in your network.

8. Which one of the following algorithm is not used for congestion control?
a) traffic aware routing
b) admission control
c) load shedding
d) routing information protocol

Answer: d
Clarification: The Routing Information Protocol (RIP) is used by the network layer for the function of dynamic routing. Congestion control on the flow of the traffic in the network and uses algorithms like traffic aware routing, admission control and load shedding to deal with congestion.

9. The network layer protocol for internet is __________
a) ethernet
b) internet protocol
c) hypertext transfer protocol
d) file transfer protocol

Answer: b
Clarification: There are several protocols used in Network layer. Some of them are IP, ICMP, CLNP, ARP, IPX, HRSP etc. Hypertext transfer protocol is for application layer and ethernet protocol is for data link layer.

10. ICMP is primarily used for __________
a) error and diagnostic functions
b) addressing
c) forwarding
d) routing

Answer: a
Clarification: ICMP abbreviation for Internet Control Message Protocol is used by networking devices to send error messages and operational information indicating a host or router cannot be reached. ICMP operates over the IP packet to provide error reporting functionality as IP by itself cannot report errors.

250+ TOP MCQs on DNS and Answers

Computer Networks Multiple Choice Questions on “DNS”.

1. The entire hostname has a maximum of ___________
a) 255 characters
b) 127 characters
c) 63 characters
d) 31 characters

Answer: a
Clarification: An entire hostname can have a maximum of 255 characters. Although each label must be from 1 to 63 characters long. Host name is actually a label that is given to a device in a network.

2. A DNS client is called _________
a) DNS updater
b) DNS resolver
c) DNS handler
d) none of the mentioned

Answer: b
Clarification: DNS client also known as DNS resolver also known as DNS lookup helps to resolve DNS requests using an external DNS server.

3. Servers handle requests for other domains _______
a) directly
b) by contacting remote DNS server
c) it is not possible
d) none of the mentioned

Answer: b
Clarification: Whenever a request is received at server from other domains, it handles this situation by contacting remote DNS server.

4. DNS database contains _______
a) name server records
b) hostname-to-address records
c) hostname aliases
d) all of the mentioned

Answer: d
Clarification: Domain Name system not only deals with mapping IP addresses with the hostname but also deals with exchange of information in the server.

5. If a server has no clue about where to find the address for a hostname then _______
a) server asks to the root server
b) server asks to its adjcent server
c) request is not processed
d) none of the mentioned

Answer: a
Clarification: Root name servers are actually very important and critical as they are the first step in translating human readable hostnames into IP addresses for carrying out communication.

6. Which one of the following allows client to update their DNS entry as their IP address change?
a) dynamic DNS
b) mail transfer agent
c) authoritative name server
d) none of the mentioned

Answer: a
Clarification: Dynamic DNS or in short DDNS or DynDNS helps in automatically updating a name server in the DNS. This does not require manual editing.

7. Wildcard domain names start with label _______
a) @
b) *
c) &
d) #

Answer: b
Clarification: A wildcard DNS record matches requests to a non existent domain name. This wildcard DNS record is specified by using asterisk “*” as the starting of a domain name.

8. The right to use a domain name is delegated by domain name registers which are accredited by _______
a) internet architecture board
b) internet society
c) internet research task force
d) internet corporation for assigned names and numbers

Answer: d
Clarification: The ICANN (Internet Corporation for Assigned Names and Numbers) deals with IP address space allocation, protocol identifier assignment, generic and country code Top Level domain name system management (gTLD and ccTLD).

9. The domain name system is maintained by _______
a) distributed database system
b) a single server
c) a single computer
d) none of the mentioned

Answer: a
Clarification: A domain name system is maintained by a distributed database system. It is a collection of multiple, logically interrelated databases distributed over a computer network.

10. Which one of the following is not true?
a) multiple hostnames may correspond to a single IP address
b) a single hostname may correspond to many IP addresses
c) a single hostname may correspond to a single IP address
d) none of the mentioned

Answer: c
Clarification: It need not be that a single hostname will correspond to a ip address. For example facebook.com and fb.com both correspond to same ip address. So there can be multiple hostnames for a single ip address.

250+ TOP MCQs on Frame Relay and Answers

Computer Networks Multiple Choice Questions on “Frame Relay”.

1. Frame Relay is cheaper than other _____
a) LANs
b) WANs
c) MANs
d) Multipoint Networks

Answer: b
Clarification: Frame relay is a standardized wide area network technology and is popularly used because it is cheaper than leased line WANs. It is also very simple to configure user equipment in a Frame Relay network.

2. Frame Relay networks offer an option called _______
a) Voice Over For Relay
b) Voice Over Fine Relay
c) Voice On Frame Relay
d) Voice Over Frame Relay

Answer: d
Clarification: Frame Relay networks offer an option called Voice over Frame Relay, which transmits voice and voice-band data over a Frame Relay network. It has two sub-protocols FRF11 and FRF12.

3. There are ________ total features of Frame Relay.
a) Five
b) Seven
c) Nine
d) Ten

Answer: c
Clarification: Frame relay is a wide area network technology used to transmit information over a network in the form of frames using relays. The frames are of variable size. It is cheaper than other WANs and it’s simple to configure user equipment in the network.

4. Frame Relay does not provide flow or error control, they must be provided by the ______
a) Lower Level Protocol
b) Highest Level Protocol
c) Upper Level Protocol
d) Lowest Level Protocol

Answer: c
Clarification: Frame relay only provides error detection using CRC. If errors are detected, the upper-layer protocols, such as TCP are expected to provide error correction features. Network layer provides flow control.

5. Frame Relay deploys physical layer carriers such as _______
a) ADMs
b) UPSR
c) BLSR
d) SONET

Answer: d
Clarification: Frame Relays uses carriers such as SONET (for fiber-optic connections) to physically transmit data frames over a Frame Relay network. SONET is cheaper and provides better network reliability than other carriers.

6. Frame relay provides error detection at the ______
a) physical layer
b) data link layer
c) network layer
d) transport layer

Answer: b
Clarification: Frame relay provides error detection using CRC in the data link layer. The transport layer then provides the error correction features if an error is detected.

7. Virtual circuit identifier in frame relay is called _______
a) data link connection identifier
b) frame relay identifier
c) cell relay identifier
d) circuit connection identifier

Answer: a
Clarification: The Data Link Connection Identifier is 10-bit virtual circuit identifier. It is used to assign frames to the specified Permanent Virtual Circuits or Switched Virtual Circuits.

8. Frame relay has only _______
a) physical layer
b) data link layer
c) physical layer and data link layer
d) network layer and data link layer

Answer: c
Clarification: The physical layer is guided by the protocols recognized by the ANSI and provides conversion to frames. The data link layer supports the simplified core functions specified by the OSI model like error detection.

9. In frame relay networks, extended address is used ________
a) to increase the range of data link connection identifiers
b) for error detection
c) for encryption
d) for error recovery

Answer: a
Clarification: Extended address is indicated by the last bit of every address byte in the DLCI. It specifies whether the byte is the last in the addressing field. It is used to increase the range of data link connection identifiers.

10. What is FRAD in frame relay network?
a) FRAD assembles and disassembles the frames coming from other protocols
b) FRAD is used for modulation and demodulation
c) FRAD is used for error detection
d) FRAD is used for error recovery

Answer: a
Clarification: FRAD stands for Frame Relay Assembler/Disassembler. It converts packets into frames that can be transmitted over Frame Relay Networks. It operates at the physical layer.

250+ TOP MCQs on Ports and Answers

Computer Networks Multiple Choice Questions on “Ports”.

1. Multiple objects can be sent over a TCP connection between client and server in a persistent HTTP connection.
a) True
b) False

Answer: a
Clarification: Persistent connections are kept active after completing transaction so that multiple objects can be sent over the same TCP connection.

2. HTTP is ________ protocol.
a) application layer
b) transport layer
c) network layer
d) data link layer

Answer: a
Clarification: HTTP is an Application layer protocol used to define how messages are formatted and transmitted through the World Wide Web.

3. In the network HTTP resources are located by __________
a) Uniform resource identifier
b) Unique resource locator
c) Unique resource identifier
d) Union resource locator

Answer: a
Clarification: The Uniform Resource Identifier is a name and locator for the resource to be located by the HTTP. The URLs and URNs are derived through the identifier.

4. HTTP client requests by establishing a __________ connection to a particular port on the server.
a) User datagram protocol
b) Transmission control protocol
c) Border gateway protocol
d) Domain host control protocol

Answer: b
Clarification: HTTP clients perform requests using a TCP connection, because the TCP connection provides a more reliable service. UDP is not a reliable protocol, border gateway protocol is used on top of TCP, while domain host control protocol is a network layer protocol.

5. In HTTP pipelining __________
a) multiple HTTP requests are sent on a single TCP connection without waiting for the corresponding responses
b) multiple HTTP requests cannot be sent on a single TCP connection
c) multiple HTTP requests are sent in a queue on a single TCP connection
d) multiple HTTP requests are sent at random on a single TCP connection

Answer: a
Clarification: HTTP pipelining helps the client make multiple requests without having to waiting for each response, thus saving a lot of time and bandwidth for the client.

6. FTP server listens for connection on which port number?
a) 20
b) 21
c) 22
d) 23

Answer: b
Clarification: Port 20 is used for FTP data. Port 22 is used for SSH remote login. Port 23 is used for TELNET.

7. In FTP protocol, a client contacts a server using ______ as the transport protocol.
a) Transmission control protocol
b) User datagram protocol
c) Datagram congestion control protocol
d) Stream control transmission protocol

Answer: a
Clarification: The clients use the Transmission Control Protocol for FTP as it’s more reliable than UDP, DCCP, and SCTP, and reliability of file transfer is required to be as high as possible for FTP.

8. In Active mode FTP, the client initiates both the control and data connections.
a) True
b) False

Answer: b
Clarification: In Passive mode of FTP, the client initiates both data and control connections, while in Active mode, the client initiates the control connection and then the server initiates the data connection.

9. The File Transfer Protocol is built on __________
a) data centric architecture
b) service oriented architecture
c) client server architecture
d) connection oriented architecture

Answer: c
Clarification: The FTP connection includes a Server and a Client which wish to share files. The server can have multiple clients at the same time while the client communicates with only one server at a time.

10. In File Transfer Protocol, data transfer cannot be done in __________
a) stream mode
b) block mode
c) compressed mode
d) message mode

Answer: d
Clarification: In Stream mode, the data is transferred in a continuous stream. In Block mode, data is transferred after being divided into smaller blocks. In Compressed mode, data is transferred after being compressed using some compression algorithm.

250+ TOP MCQs on Transport Layer and Answers

Computer Networks Multiple Choice Questions on “Transport Layer”.

1. Transport layer aggregates data from different applications into a single stream before passing it to ____________
a) network layer
b) data link layer
c) application layer
d) physical layer

Answer: a
Clarification: The flow of data in the OSI model flows in following manner Application -> Presentation -> Session -> Transport -> Network -> Data Link -> Physical. Each and every layer has its own set of functions and protocols to ensure efficient network performance.

2. Which of the following are transport layer protocols used in networking?
a) TCP and FTP
b) UDP and HTTP
c) TCP and UDP
d) HTTP and FTP

Answer: c
Clarification: Both TCP and UDP are transport layer protocol in networking. TCP is an abbreviation for Transmission Control Protocol and UDP is an abbreviation for User Datagram Protocol. TCP is connection oriented whereas UDP is connectionless.

3. User datagram protocol is called connectionless because _____________
a) all UDP packets are treated independently by transport layer
b) it sends data as a stream of related packets
c) it is received in the same order as sent order
d) it sends data very quickly

Answer: a
Clarification: UDP is an alternative for TCP and it is used for those purposes where speed matters most whereas loss of data is not a problem. UDP is connectionless whereas TCP is connection oriented.

4. Transmission control protocol ___________
a) is a connection-oriented protocol
b) uses a three way handshake to establish a connection
c) receives data from application as a single stream
d) all of the mentioned

Answer: d
Clarification: TCP provides reliable and ordered delivery of a stream of bytes between hosts communicating via an IP network. Major internet applications like www, email, file transfer etc rely on TCP. TCP is connection oriented and it is optimized for accurate delivery rather than timely delivery.

5. An endpoint of an inter-process communication flow across a computer network is called __________
a) socket
b) pipe
c) port
d) machine

Answer: a
Clarification: Socket is one end point in a two way communication link in the network. TCP layer can identify the application that data is destined to be sent by using the port number that is bound to socket.

6. Socket-style API for windows is called ____________
a) wsock
b) winsock
c) wins
d) sockwi

Answer: b
Clarification: Winsock is a programming interface which deals with input output requests for internet applications in windows OS. It defines how windows network software should access network services.

7. Which one of the following is a version of UDP with congestion control?
a) datagram congestion control protocol
b) stream control transmission protocol
c) structured stream transport
d) user congestion control protocol

Answer: a
Clarification: The datagram congestion control is a transport layer protocol which deals with reliable connection setup, teardown, congestion control, explicit congestion notification, and feature negotiation. It is used in modern day systems where there are really high chances of congestion. The protocol was last updated in the year 2008.

8. A _____ is a TCP name for a transport service access point.
a) port
b) pipe
c) node
d) protocol

Answer: a
Clarification: Just as the IP address identifies the computer, the network port identifies the application or service running on the computer. A port number is 16 bits. The combination of IP address preceded with the port number is called the socket address.

9. Transport layer protocols deals with ____________
a) application to application communication
b) process to process communication
c) node to node communication
d) man to man communication

Answer: b
Clarification: Transport layer is 4th layer in TCP/IP model and OSI reference model. It deals with logical communication between process. It is responsible for delivering a message between network host.

10. Which of the following is a transport layer protocol?
a) stream control transmission protocol
b) internet control message protocol
c) neighbor discovery protocol
d) dynamic host configuration protocol

Answer: a
Clarification: The Stream Control Transmission Protocol (SCTP) is a transport layer protocol used in networking system where streams of data are to be continuously transmitted between two connected network nodes. Some of the other transport layer protocols are RDP, RUDP, TCP, DCCP, UDP etc.

250+ TOP MCQs on SSH and Answers

Computer Networks Multiple Choice Questions on “SSH”.

1. Secure shell (SSH) network protocol is used for __________
a) secure data communication
b) remote command-line login
c) remote command execution
d) all of the mentioned

Answer: d
Clarification: SSH provides high encryption and security features while communicating through a network. It is a cryptographic network protocol.

2. SSH can be used in only _____________
a) unix-like operating systems
b) windows
c) both unix-like and windows systems
d) none of the mentioned

Answer: c
Clarification: SSH isn’t confined to a certain network or operating system. It can be implemented over different networks and on different operating systems.

3. SSH uses ___________ to authenticate the remote computer.
a) public-key cryptography
b) private-key cryptography
c) any of public-key or private-key
d) both public-key & private-key

Answer: a
Clarification: Public encryption key is slower but more flexible. Every cryptographic security system requires a private key for private access and a public key for location.

4. Which standard TCP port is assigned for contacting SSH servers?
a) port 21
b) port 22
c) port 23
d) port 24

Answer: b
Clarification: Port 22 is used for contacting ssh servers, used for file transfers (scp, sftp) and also port forwarding.

5. Which one of the following protocol can be used for login to a shell on a remote host except SSH?
a) telnet
b) rlogin
c) both telnet and rlogin
d) none of the mentioned

Answer: c
Clarification: SSH is more secured then telnet and rlogin.

6. Which one of the following is a file transfer protocol using SSH?
a) SCP
b) SFTP
c) Rsync
d) All of the mentioned

Answer: d
Clarification: SCP (Secure copy protocol), SFTP (SSH File Transfer Protocol) and Rsync all are file transfer protocols which are used by SSH.

7. SSH-2 does not contain ______________
a) transport layer
b) user authentication layer
c) physical layer
d) connection layer

Answer: c
Clarification: SSH2 is a more secure, portable and efficient version of SSH that includes SFTP, which is functionally similar to FTP, but is SSH2 encrypted.

8. Which one of the following feature was present in SSH protocol, version 1?
a) password changing
b) periodic replacement of session keys
c) support for public-key certificates
d) none of the mentioned

Answer: d
Clarification: All of the mentioned features are provided by SSH-2 and that SSH-1 only provide strong authentication and guarantee confidentiality.

9. SCP protocol is evolved from __________ over SSH.
a) RCP protocol
b) DHCP protocol
c) MGCP protocol
d) GCP protocol

Answer: a
Clarification: RCP is the abbreviation for Rate Control Protocol is a congestion control algorithm for fast user response times.

10. Which one of the following authentication method is used by SSH?
a) public-key
b) host based
c) password
d) all of the mentioned

Answer: d
Clarification: SSH used public key authentication, Password authentication, Host based authentication, keyboard authentication and authentication of servers.