Computer Networks Questions & Answers – OSPF

«
»

This set of Computer Networks Multiple Choice Questions & Answers (MCQs) focuses on “OSPF”.

1. Open Shortest Path First (OSPF) is also called as _____________
a) Link state protocol
b) Error-correction protocol
c) Routing information protocol
d) Border gateway protocol
View Answer

Answer: a
Explanation: In OSPF, the link state of each path is checked, and then the shortest path is chosen among only the open state links. Each OSPF router monitors the cost of the link to each of its neighbors and then floods the link state information to other routers in the network.
advertisement

2. The computation of the shortest path in OSPF is usually done by ____________
a) Bellman-ford algorithm
b) Routing information protocol
c) Dijkstra’s algorithm
d) Distance vector routing
View Answer

Answer: c
Explanation: Shortest path in OSPF is usually computed by Dijkstra’s algorithm. It was proposed by Edsger W. Dijkstra in the year 1956. It is a greedy method algorithm and hence may not guarantee the shortest path every time, but is really fast.

3. Which of the following is false with respect to the features of OSPF?
a) Support for fixed-length subnetting by including the subnet mask in the routing message
b) More flexible link cost than can range from 1 to 65535
c) Use of designated router
d) Distribution of traffic over multiple paths that have equal cost to the destination
View Answer

Answer: a
Explanation: OSPF provides support for variable-length sunbathing by including the subnet mask in the routing message. For fixed length subnets, there is no requirement for including the subnet mask in the routing message as there is just one subnet mask for all the subnets.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
advertisement

4. In OSPF, which protocol is used to discover neighbour routers automatically?
a) Link state protocol
b) Error-correction protocol
c) Routing information protocol
d) Hello protocol
View Answer

Answer: d
Explanation: Hello protocol is used to discover neighboring routers automatically. It makes sure that the communication between neighbors is bidirectional. It’s similar to the real world moral construct of saying “Hello” to initialize the communication.

5. Which of the following is not a type of OSPF packet?
a) Hello
b) Link-state request
c) Link-state response
d) Link-state ACK
View Answer

Answer: c
Explanation: The five types of OSPF packets are: Hello, Database description, Link-state request, Link-state update, and Link-state ACK. There is no Link-state response packet; the neighbor router sends a Link-state update packet as a response to the Link-state request packet if there is an update in the routing table.
advertisement

6. What is the correct order of the operations of OSPF?
i – Hello packets
ii – Propagation of link-state information and building of routing tables
iii – Establishing adjacencies and synchronization of database
a) i-ii-iii
b) i-iii-ii
c) iii-ii-i
d) ii-i-iii
View Answer

Answer: b
Explanation: OSPF first implements a hello protocol. Then it later on tries to establish synchronisation with database. Later on building of routing tables is done.

7. In OSPF header, which field is used to detect errors in the packet?
a) Type
b) Area ID
c) Authentication type
d) Checksum
View Answer

Answer: d
Explanation: Checksum field is used to detect errors. It makes sure that the data portions that are being sent are all in integrity. It can detect duplicated bits. Once an error is detected, the sender has to re-transmit the data as it won’t receive an acknowledgement.
advertisement

8. In OSPF database descriptor packet, if there are more database descriptor packets in the flow, ‘M’ field is set to ____________
a) 1
b) 0
c) more
d) -1
View Answer

Answer: a
Explanation: The “M” bit is the more bit, which indicates that there are more packets to be received in the descriptor packet flow whenever it is set to 1. There is also an “I” bit which indicates if the packet is first in the flow.

9. In OSPF database descriptor packet, which field is used to indicate that the router is master?
a) M
b) MS
c) I
d) Options
View Answer

Answer: b
Explanation: The MS bit is used to indicate if the origin of the packet is a master or a slave. If it is set to 1, the source of the packet is a master, and if it is set to 0, the source of the packet is a slave.
advertisement

10. In OSPF database descriptor packet, which field is used to detect a missing packet?
a) LSA header
b) MS
c) Database descriptor sequence number
d) Options
View Answer

Answer: c
Explanation: Sequence number field is used to detect a missing packet. The packets are to be received in order of the sequence number, so if the receiver detects that there is a sequence number skipped or missing in the order, it stops processing the further received packets and informs the sender to retransmit the packets in sequence.

Sanfoundry Global Education & Learning Series – Computer Networks.

To practice all areas of Computer Networks, here is complete set of 1000+ Multiple Choice Questions and Answers.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & technical discussions at Telegram SanfoundryClasses.