Difference between OSPF and BGP

Open Shortest Path First (OSPF):
OSPF is type of hierarchical network topology or design. OSPF prefers fastest path rather than shortest path. In Open Shortest Path First, internet protocol is used.

Border Gateway Protocol (BGP):
BGP is the type of mesh topology or design. Border gateway protocol prefers best path. In border gateway protocol, Transmission control protocol is used.

The main difference between OSPF (Open Shortest Path First) and BGP (Border Gateway Protocol) is that, Open Shortest Path First is an intra-domain routing protocol while, Border Gateway Protocol is the inter-domain routing protocol.

Let’s see the difference between OSPF and BGP:

S.NO OSPF BGP
1. OSPF stands for Open Shortest Path First. BGP stands for Border Gateway Protocol.
2. The implementation of OSPF is easy. While the implementation of BGP is difficult.
3. OSPF is a fast concurrence. While BGP is a slow concurrence.
4. OSPF is type of hierarchical network topology or design. While it is the type of mesh topology or design.
5. It is also called as internal gateway protocol. While it is called as external gateway protocol.
6. In OSPF internet protocol is used. While in this, Transmission control protocol is used.
7. It works in 89 port number. While it works in 179 port number.
8. OSPF is a Link State type. While it is a Vector State type.
9. In OSPF Dijkstra algorithm is used. While in this Best path algorithm is used.
10. OSPF prefers fastest path rather than shortest path. While It prefers best path.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.