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
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.
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
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
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.
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
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
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.
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
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
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.
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
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
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.
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
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.
- Check Computer Network Books
- Apply for Computer Science Internship
- Practice Computer Science MCQs
- Check Computer Science Books
- Practice MCA MCQs