Routing protocols are algorithms that route traffic through routers, prevent loops, and gather network topology information. Internal Gateway Protocols form routing domains within an autonomous system. Link-state protocols map the entire network, while distance vector protocols count hops. Path vector protocols are used at the edge of a network. Routing protocols can be routed over existing communication protocols depending on the OSI layer they operate in. BGP runs on top of TCP.
A routing protocol is the means by which the computer network is able to route traffic efficiently through devices called routers. Any such protocol is essentially an algorithm designed to prevent and fix loops, gather information about the network topology and distribute that information to other routers, and ultimately select which paths the traffic should take. Some of these protocols manage traffic within a network, routing it to other routers within a controlled network. When communications need to enter or leave a particular network, they are routed by another type of routing protocol that controls traffic at the edge, or boundary, of the network.
When a routing protocol is used within a network, it is referred to as Internal Gateway Protocol (IGP). Using the same routing protocol together, they form a routing domain. Subsequently, any number of routing domains together form a network comprising an autonomous system (AS). Here, within an AS, the protocols fall into two main categories, a link-state protocol or a vector-based protocol.
With a link-state protocol, routers talk to each other to map out the entire network, evaluate the state of the connections between them, and then calculate the best possible paths that traffic can take to get around. This method is useful for determining which paths may have a faster connection speed than another path and for calculating the shortest path. These types of routing protocols are very fast at converging routers with each other, updating their knowledge of the network, when a new router is added or if one goes offline.
A vector-based routing protocol comes in two flavors: the distance vector and the path vector, with the latter being a subclass of the former. Distance vector methods use what is known as hop counting to determine the shortest path from one router to another. Here, the router counts the number of other routers the communication must traverse, each representing a hop, and then builds its map of the best possible routes. In comparison to a link-state protocol, a distance vector algorithm cannot tell how fast a particular hop compares to another and may ultimately choose a slower path even if it requires fewer hops. It also suffers from delays when a router is added or removed from the network, as it has to re-count hops to rebuild its map of the network.
A path vector routing protocol is often used at the edge of a network in what is referred to as a border gateway protocol (BGP). In addition to counting hops, the border router also announces its availability by sending a path vector message. Edge routers of other networks then build their knowledge of routes outside an AS by checking these messages from each other.
In some cases, a routing protocol can actually be routed over an existing communication protocol. Whether they are routed depends on the Open Systems Interconnection Model (OSI) layer they operate in, such as IS-IS, the data link layer, and is a non-routed protocol. Internet Protocol (IP) and Transmission Control Protocol (TCP) operate at layers three and four, respectively, and are two means by which a routing protocol can be routed. Most notable are BGP which runs on top of TCP.
Protect your devices with Threat Protection by NordVPN