I. Concept of Routing
A route is a behavior that transmits information from the source to the target through the network. On the road, at least one intermediate node is encountered. Routing is usually compared with bridging. In the eyes of careless people, they seem to do the same thing. The main difference between them is that the bridge occurs at the Layer 2 link layer of the OSI Reference protocol, while the routing occurs at the Layer 3 network layer ). This difference enables the two to use different information in the process of transmitting information, so as to complete their tasks in different ways.
The topic of routing has already appeared in the computer industry, but it was not until the middle of 1980s that it was commercially successful. The main reason for this delay was that the network in 1970s was very simple, and later it was common for large networks.
Ii. Routing Composition
A route consists of two basic actions: determining the optimal path and transmitting information through the network. In the routing process, the latter is also called data) exchange. The switching is relatively simple, but the selection path is complicated.
1. Select a path
Metric is the Metering Standard used by routing algorithms to determine the optimal path to the destination, such as the path length. To help route selection, the routing algorithm initializes and maintains the route table containing the path information. The path information varies with the routing algorithm used.
The routing algorithm fills the route table according to a lot of information. Destination/Next Hop address: the best way to tell the router to reach this destination is to send the group to the router representing the next hop. When the router receives a group, it checks its target address, try to associate the address with its next hop. The following table shows an example of a destination/next hop route table.
Table 5-1 destination/Next Hop table determines the optimal data path
The route table can also contain other information. The route table compares metric to determine the optimal path. These metric vary according to the routing algorithm used. The following describes the common metric. Routers communicate with each other and maintain their route tables by exchanging route information. route update information usually includes all or part of Route tables. By analyzing route update information from other routers, this vro can create a network topology. Another example of information sent between routers is the link status broadcast information, which notifies other router senders of the link status. The link information is used to create a complete topology so that the router can determine the optimal path.
2. Exchange
The exchange algorithm is relatively simple. It is the same for most routing protocols. In most cases, a host decides to send data to another host. After obtaining the router address in some ways, the source host sends a packet to the physical MAC address of the router. The Protocol address of the packet is directed to the target host.
After checking the Destination Protocol address of the packet, the router determines whether it knows how to forward the packet. If the router does not know how to forward the packet, it is usually discarded. If the vro knows how to forward the IP address, the physical address of the target is changed to the physical address of the next hop and sent to it. The next hop may be the final target host. If not, it is usually another vro, And it will perform the same steps. When a group flows in the network, its physical address is changing, but its Protocol address remains unchanged, as shown in.
The exchange between the source system and the target system is described above. ISO defines the terms used to describe the process in layers. In this term, a network device that does not have the ability to forward packets IS called the end system ES -- end system), and an intermediary system IS called the intermediate system ). IS further divided into ISintradomain IS) and ISinterdomain IS, which can communicate between domains in the routing domain ). Generally, a routing domain is regarded as a part of the network under unified management and complies with a specific group of management rules, also known as the autonomous system ). In some protocols, the routing domain can be divided into routing intervals, but the intra-Domain Routing Protocol can still be used to exchange data within and between intervals.
3. Routing Algorithms
Routing Algorithms can be differentiated based on multiple features. First, the specific target of the algorithm designer affects the operation of the routing protocol. Secondly, there are multiple routing algorithms, each of which has different effects on the network and router resources. Finally, the routing algorithm uses a variety of metric, which affects the calculation of the optimal path.
1. design objectives
A routing algorithm generally has one or more of the following design goals:
Optimization refers to the ability of the routing algorithm to select the optimal path, which is calculated based on the value and weight of metric. For example, a routing algorithm may use hops and latency, but the delay may have a higher weight. Of course, the routing protocol must strictly define the metric algorithm.
Routing Algorithms can also be designed as simple as possible. In other words, the routing protocol must provide its functions efficiently to minimize the overhead of software and applications. This is especially important when the software that implements routing algorithms must run on computers with limited physical resources.
Routing algorithms must be robust, that is, they must still be able to handle abnormal or unforeseen events, such as hardware faults, high loads, and incorrect implementations. Because the routers are located at the network connection points, a major problem occurs when they fail. The best routing algorithms are usually those that have been tested by time and proved to be stable under various network conditions.
In addition, the routing algorithm must be able to be quickly aggregated. Aggregation is the process in which all routers agree on the optimal path. When a network event causes a path to be disconnected or unavailable, the router distributes route update information through the network, promotes the calculation of the optimal path, and finally makes an agreement between all routers. Slow aggregation of routing algorithms may cause routing loops or network interruptions.
In the routing ring, a group reaches vro1 1 at the time t1, vro1 1 has been updated, and the optimal route to reach the destination is vro2 2 as the next hop, then, the group is forwarded to vro2 2. However, vro2 2 has not been updated. It considers the next hop as vro1 1, so it sends the group back to vro1 1, the result group is transmitted back and forth between the two routers until vro2 2 receives the route update information or the group exceeds the lifetime.
Routing Algorithms should also be flexible, that is, they should quickly and accurately adapt to various network environments. For example, if a CIDR block is disconnected, many routing algorithms will quickly select the second best path for the path that uses the CIDR block after the problem is identified. The routing algorithm can be designed to adapt to network bandwidth, router queue size, and network latency.
2. algorithm type
The differences between different routing algorithms include:
(1) Static and Dynamic
The Static Routing Algorithm is difficult to calculate as an algorithm. It is only a table ing established by the network administrator before the routing starts. These mappings do not change unless the network administrator changes them. Static Routing Algorithms are easy to design and work well in predictable and simple network communication.
Because the Static Routing System does not reflect network changes, it is generally considered not applicable to the current large and variable network. In 1990s, the main routing algorithms were dynamic routing algorithms. They analyzed the received route update information to adapt to the changes in the network environment. If the information indicates that the network has changed, the routing software recalculates the route and sends new route update information. This information is infiltrated into the network, prompting the router to recalculate and change the route table accordingly.
Dynamic Routing Algorithms can be supplemented by Static Routing where appropriate. For example, the last available route router of last resort) is used as the path for all non-route groups, ensuring that all data can be processed in at least one way.
(2) single path and multi-path
Some complex routing protocols support multiple routes to the same destination. Unlike single-path algorithms, these multi-path algorithms allow data to be reused on multiple lines. The advantages of multi-path algorithms are obvious: they provide better throughput and reliability.
(3) flattening and layering
Some routing protocols operate in a flat space, while others have routing layers. In a flat routing system, each router is equivalent to all other routers. In a hierarchical routing system, some routers constitute the routing trunk, and data flows from the non-trunk router to the trunk router, transmit the data on the trunk until they reach the destination region. Here, the data is transmitted from the last trunk router to the destination through one or more non-trunk routers.
A routing system is usually designed with a logical node group called a domain, autonomous system, or interval. In a layered system, some routers can communicate with vrouters in other domains, while others can only communicate with vrouters in the same region. In a large network, there may be other levels. The most advanced router forms the routing trunk.
The main advantage of hierarchical routing is that it simulates the structure of most companies and can support communication well. Most network communication occurs in the group domain ). Because the routers in the domain only need to know other routers in the domain, their routing algorithms can be simplified. According to the routing algorithms used, the traffic for route update can be reduced accordingly.
(4) host intelligence and router intelligence
Some routing algorithms assume that the source node determines the entire path, which is usually called the source route. In the source routing system, a vro acts only as a storage and forwarding device and unconsciously sends a next hop to the group. Other routing algorithms assume that the host has no knowledge about the path. In these algorithms, the router decides the path through the network based on its own computing. In the previous system, the host has the intelligence that determines the route, and the latter has this capability for the router.
The compromise between host intelligence and router intelligence is actually the best balance between routing and additional overhead. Generally, the host intelligent system can select a better path because it explores all possible paths before sending data, and then selects the optimal path based on the system's definition of "optimization. However, determining the behavior of all paths usually requires a lot of exploration traffic and a long time.
(5) Intra-domain and Inter-Domain
Some routing algorithms work only in the domain, while others work both in the domain and between domains. These two algorithms are essentially different. The reason is that the optimized intra-Domain Routing Algorithm does not need to be an optimized Inter-Domain Routing Algorithm.
(6) Link Status and Distance Vector
The link status algorithm is also called the short path Priority Algorithm). Route information is distributed to each node of the network. However, each router sends only the section in the routing table describing its own link status. The distance vector algorithm is also called the Bellman-Ford algorithm). Each router sends all or part of the route table, but only sends it to its neighbors. That is to say, the link status algorithm sends less update information everywhere, while the distance vector algorithm only sends more update information to adjacent routers.
Because the link state algorithms aggregate quickly, they tend to generate routing loops less than distance algorithms. On the other hand, the link status algorithm requires more CPU and memory resources, so the implementation and support of The Link Status algorithm is expensive. Although there are differences, these two algorithm types can work well in most environments.
3. Route metric
The routing table contains information that is used by the exchange software to select the optimal path. But how is a route table created? What is the essence of information they contain? How does the routing algorithm determine which path is better based on the information?
The routing algorithm uses many different metric to determine the optimal path. Complex routing algorithms can select routes based on multiple metric and combine them into a composite metric. The commonly used metric is as follows:
The path length is the most common route metric. Some routing protocols allow the network administrator to manually assign value to each network link. In this case, the route length is the total cost of each link. Other Routing Protocols define the number of hops, that is, the number of network products that a group must pass through from the source to the destination, such as the number of routers.
Reliability: In the routing algorithm, the network link dependency is usually described by bit error rate). Some network links may be more invalid than others. After the network fails, some network connections may be easier or faster to fix than others. Any reliability factor can be taken into consideration when assigning a value to the Failover rate. Generally, the network administrator assigns a metric value to the network link.
Route delay refers to the time taken by the group to arrive at the destination from the source over the network. Many factors affect latency, including the bandwidth of intermediate network connections, the port queues of Each router, The Congestion Degree of all intermediate network connections, and the physical distance. Because latency is a mixture of multiple important variables, it is a common and effective metric.
Bandwidth refers to the available circulation capacity of the link. When all other conditions are equal, 10 Mbps Ethernet connections are more desirable than 64 Kbps leased lines. Although the bandwidth is the maximum throughput that a link can obtain, it is not necessarily better to route through a link with a large bandwidth than a slow link. For example, if a fast link is busy, it may take longer for the Group to reach the destination.
Load refers to the amount of network resources, such as the number of busy vrouters. Load can be calculated in many ways, including CPU usage and the number of processing groups per second. It is resource-consuming to continuously monitor these parameters.
The communication cost is another important metric. In particular, some companies may be more cost-effective than performance. Even if the line latency may be long, they would rather send data over their own lines than using expensive public lines.