SoFunction
Updated on 2025-04-12

Routing Protocols

When two non-directly connected computers need to communicate through several networks, a router is usually required. The router provides a method to open a path through a mesh connection. Such mesh networks provide redundant paths to adjust communication load or inverse links, usually one path is preferred for other paths due to costs, speed or avoiding congestion. The task of the routing protocol is to provide routers with the shared routing information they need to establish the best path through the mesh network.

When a computer sends a packet, it is attached to each layer of the network protocol stack on the network. This information can be read out at the peer-to-peer protocol on the receiver. This information is similar to some parts of a communication session. The protocol at the network layer attaches routing information, which may be a complete path through a network or a priority value indicating which path the packet should take. The network layer information added by the sender can only be read by the router or the receiver's network layer protocol. Repeaters and bridges cannot recognize network layer information and can only transmit and forward packets.

Routing Algorithms Routing Algorithms

A router device may have two or more ports that can send data packets. It must have a forwarding table that identifies a specific address for each port. Early routers did not exchange information about routers on the network with other routers, so a router usually sent data packets along each path, the packets filled the network, and some of the packets sent loop endlessly across the network.

To avoid these problems, the router can rely on manual programming to input the selected path into the device. This is called static routing. Dynamic routing is a better way to rely on routers to collect network information and build their own routing tables. The routers exchange routing tables with each other and merge these routing information to create an updated routing table. Information obtained from other routers provides the number of routing relays (hops) to the destination site on the network or the fees associated with the path. At the same time, the routing table on each routing device should contain generally consistent routing information.

In a WAN using a remote communication link, regular routing is basic, but it must be quickly adjusted to a new path topology when the remote communication link changes rapidly (for example, line breaks). A typical Internet may consist of 2, 10 or even 50 routers that can be connected to each other via dial-up asynchronous links or dedicated high-speed digital lines such as T1. For a data packet transmitted on the network, they are viewed by the router when they arrive at the router and send the packet to the receiving station along the best or very suitable route. Such a route depends on the type of routing algorithm used.

There are basically two types of routing protocols: distance vector and link state. These two types of protocols will be introduced in two paragraphs below.

Distance vector routing protocol

The packet transmission routing of the distance vector routing protocol is determined based on the number of hops or fees to the receiving station, and this information is provided by each adjacent router. Technically, the Bellman-Ford algorithm is usually followed.

A router has several ports, each with a specified value set by the network administrator. Using the actual cost of using a line as a measure to show that one line is better or worse than the other. In addition, neighboring routers tell them the cost of sending packets to the destination station. The router adds the value of the port to the value of the adjacent router, as shown in the following example:

Port 1 value 10 + Adjacent router value 17=27.

Port 2 is worth 20 + adjacent router is worth 5 = 25.

Port 3 is worth 30 + adjacent router is worth 7 = 37.

In this case, the router will transmit packets over port 2, as it indicates the least cost to the receiving station. If necessary, use the router adjacent to port 2 to calculate the path value to the next router.

Routing information, the address of the following hop, etc. are present in the table, and the routers exchange tables with each other every 30 seconds. Initially, each network only knows the directly connected router. When a router gets a table, it compares the table entry to its own table. Based on this information, it modifies the table with new routes or delete routes. The information in the table contains:

□Network number;

□Port number;

□ Value measurement;

□The address of the next hop.

A value measure is the magnitude used by the router to select a path when forwarding packets to the next router in the network. The general distance vector routing protocols include:

□Routing information protocol (RIP) is a distance vector routing protocol first implemented in Xerox Network System (XNS) and then in Novell's NetWare.

□Internal Gateway Routing Protocol (IGRP) is a distance vector routing protocol developed by Cisco.

□Route Selection Table Maintenance Protocol (RTMP) is an Apple protocol that selects the best path among two AppleTalk areas, broadcasting approximately every 10 seconds.

Distance vector routing is not suitable for large networks with hundreds of routers or networks that are often updated. In large networks, the update process of tables may be too long that the selection tables of the furthest routers are unlikely to be updated synchronously with other tables. In this case, link state routing is preferable. In addition, the link state protocol can isolate confidential information in special areas for security reasons, or avoid crowded areas such as computer-aided design (CAD) and multimedia communication on the Internet. Furthermore, the routing information table is exchanged when necessary rather than regularly exchanged, which can reduce the information flow on the network.

Link status routing protocol

Link state routing requires stronger processing power than distance vector routing, but it can provide more control over the routing process and respond faster to changes. Routing may be based on avoiding congestion zones, the speed of the line, the cost of the line, or various priority levels. The Dijkstra algorithm is used to calculate the route, according to the following:

□The number of routers passed by the destination station in the group reaches the number of routers, which is called routing relay (hop), and the fewer the number of hops, the better.

□The speed of transmission lines between local area networks. Some routes use low-speed asynchronous connections, while others use high-speed digital links.

□Information congestion will cause delay. If a workstation transmits a large file, the router can send packets over different paths to avoid traffic jamming.

□Routing costs, a measure defined by the network administrator, are usually determined based on the transmission medium. The cheapest path may not be the fastest, but it is preferable for some types of transmission.

The most commonly used link state routing protocol is to open the shortest path first (OSPF), it is similar to OSI's intermediate system to intermediate system (IS-IS). The prototype of OSPF was developed by Proten and was derived from an earlier version of OSIIS-IS. OSPF is used in routing of Internet and TCP/IP online IP communications. IS-IS can be used both in IP communication and OSI communication.

The OPSF routing table is updated only when needed, and not replaced regularly. This effectively reduces communication traffic and saves network bandwidth. The path through the network is selected by the above criteria. A network administrator can compile a path through the network based on the type of information transmission. For example, when the line has a higher data transmission rate, it is desirable even if the path through the network has a larger number of hops; on the other hand, information that is less important will be arranged to be transmitted on low-speed and low-value lines.

Autonomous Environments Autonomous Environments

Internet routing (TCP/IP) and OSI routing use the concept of an autonomous system (AS) or administrative area (AD), which can be simply understood as domains. A region is a collection of hosts and routers that use the same routing protocol, as shown in Figure R-11, which use the same routing protocol and are managed by a single organization. In other words, an area can be an Internet managed by a university or other institution. For example, the Internet is an Internet network linked to an autonomous system managed by education departments, government agencies and various companies.

Each institution has its own internal network, which is connected to the Internet through an external gateway (Note: Internet network used to call routers gateways, but now they are called routers). The Internet has an internal gateway protocol and an external gateway protocol. The OSI protocol also uses the concept of autonomous systems, but routing within a region is called intraditional routing, and routing between regions is called interdomain routing.

In practice, not all routers contact every other system on the Internet, so different protocols can be used to divide different regions. There are millions of addresses on the Internet! The organization of routing information is hierarchical, so each routing device only needs enough information to guide the information to the next important router.

Internal/Domain Protocol

There are many internal gateway protocols, and several are commonly used on the Internet, which have been discussed in the entries "AppleTalk Routing", "Internet Routing" and "Routing for OSI".

□Address Resolution Protocol (ARP) is an Internet (TCP/IP) protocol that provides a method for internal routers to pass datagrams.

□Routing Information Protocol (RIP) is a distance vector routing protocol.

□Preferential Open Shortest Path (OSPF) is a link state routing protocol that is superior to RIP. OSPF is the most commonly used internal gateway protocol in the Internet network, but the OSI IS-IS protocol is also used in the Internet.

□End system to intermediate system (ES-IS) is a protocol published by OSI, which helps end systems (such as users' computers) find and locate routers and provides a way to let the router inform end systems (ES) of their existence.

□Intermediate system to intermediate system (IS-IS) is also a routing protocol of OSI, which provides dynamic routing for transmitting information packets between two routers in a domain. IS-IS is a link state protocol.

□Internal Gateway Routing Protocol (IGRP) is a distance vector routing protocol developed by Cisco.

External/Inter-domain protocol

On the boundary of the autonomous domain is the router (formerly known as a gateway on the Internet). These routers and other routers exchange information using external protocols or external gateway protocols (EGP) in the Internet term.

□External Gateway Protocol (EGP) is the initial inter-domain routing protocol on the Internet. It has now been replaced by the Peripheral Gateway Protocol (BGP). EGP-enabled routers must also support BGP.

□ Peripheral Gateway Protocol (BGP) provides information about accessibility of neighboring points. BGP can reduce bandwidth requirements because routing information is interchangeable in increments, rather than sending routing database information between routers. BGP also provides policy-based algorithms, which enable network managers to have more control over routing, such as the ability to optimize certain information transmissions.

□Inter-domain routing protocol (IDRP) is an OSI routing protocol with OSI connectionless packets (CLNP). IDRP contains routing policies, but it is unlikely to replace BGP on the Internet. IDRP can use a protocol to perform inter-domain routing of IP and CLNP to increase IP support.