Current location - Music Encyclopedia - Chinese History - Comprehensive analysis of static routing and dynamic routing protocols
Comprehensive analysis of static routing and dynamic routing protocols
Comprehensive analysis of static routing and dynamic routing protocols

Many people may not know much about static routing and dynamic routing protocols. Here we mainly introduce RIP routing protocol and OSPF routing protocol. Static routing is a fixed routing table configured in the router. Static routes will not change unless the network administrator intervenes.

Because static routing can't reflect the changes of the network, it is generally used in networks with small network scale and fixed topology. The advantages of static routing are simple, efficient and reliable. Of all the routes, the static route has the highest priority. When the dynamic routing protocol conflicts with the static routing, the static routing shall prevail. Dynamic routing protocol is a process in which routers in the network communicate with each other, transmit routing information and update the routing table with the received routing information. It can adapt to the change of network structure in real time. If the routing update information indicates that the network has changed, the routing software will recalculate the route and send new routing update information. These messages pass through various networks, causing routers to restart their routing algorithms and update their routing tables to dynamically reflect the changes in network topology. Dynamic routing protocol is suitable for networks with large network scale and complex network topology. Of course, all kinds of dynamic routing protocols will occupy network bandwidth and CPU resources to varying degrees.

Static routing and dynamic routing protocols have their own characteristics and application scope, so dynamic routing protocol is usually used as a supplement to static routing in the network. When a packet is pathfinding in the router, the router first looks for a static route, and if it is found, it forwards the packet according to the corresponding static route; Otherwise, look for a dynamic routing protocol. Dynamic routing protocols are divided into internal gateway protocol (IGP) and external gateway protocol (EGP) according to whether they are used in autonomous domain or not. The autonomous domain here refers to the network with unified management organization and unified routing policy. Routing protocols used in autonomous domains are called internal gateway protocols, and RIP and OSPF are commonly used. External gateway protocols are mainly used for routing between multiple autonomous domains, and BGP and BGP-4 are commonly used. Let's briefly introduce them respectively.

RIP routing protocol

RIP protocol was originally designed for the general protocol of Xerox parc in Xerox network system, and it is a common routing protocol in the Internet. RIP uses the distance vector algorithm, that is, the router chooses the route according to the distance, so it is also called the distance vector protocol. The router collects all the different paths that can reach the destination, and keeps the path information about the minimum number of stops to reach each destination, and discards any other information except the best path to reach the destination. At the same time, the router also informs other neighboring routers of the collected routing information through RIP protocol. In this way, the correct routing information is gradually spread to the whole network. RIP is widely used. It is simple, reliable and easy to configure. However, RIP is only suitable for small homogeneous networks, because the maximum number of allowed sites is 15, and any destination with more than 15 sites is marked as unreachable. Moreover, RIP's routing information broadcast every 30s is also one of the important reasons for the network broadcast storm.

OSPF routing protocol

In the mid-1980s, RIP could not adapt to the interconnection of large-scale heterogeneous networks, and 0SPF came into being. It is a routing protocol developed for IP networks by the Internal Gateway Protocol Working Group of the Inter-Network Engineering Task Force (IETF). 0SPF is a link-state-based routing protocol, which requires each router to send link-state broadcast information to all other routers in the same management domain. The link state broadcast of OSPF includes all interface information, all metrics and other variables. Routers using 0SPF must first collect relevant link state information and calculate the shortest path to each node according to a certain algorithm. However, the routing protocol based on distance vector only sends routing update information to its neighbor routers.

Different from RIP, OSPF subdivides autonomous domain into regions, and accordingly there are two types of routing methods: when the source and destination are in the same region, intra-region routing is adopted; When the source and destination are in different areas, interval routing is adopted. This greatly reduces the network overhead and increases the stability of the network. When the router in one area fails, it will not affect the normal work of routers in other areas in the autonomous domain, which also brings convenience to the management and maintenance of the network.

BGP and BGP-4 routing protocols

BGP is an external gateway protocol designed for TCP/IP Internet, which is used between multiple autonomous domains. It is not based on pure link state algorithm or pure distance vector algorithm. Its main function is to exchange network reachable information with BGP in other autonomous domains. Each autonomous domain can run different internal gateway protocols. BGP update information includes pairing information of network number/autonomous domain path. The path of an autonomous domain includes an autonomous domain string that must be passed to reach a specific network. These updated information are transmitted through TCP to ensure the reliability of transmission. In order to meet the growing demand of Internet, BGP is still developing. In the latest BGp4, similar routes can also be merged into one route.

Priority of routing table entries

In a router, both static routing and one or more dynamic routing protocols can be configured. The routing tables they maintain are provided to the forwarder, but there may be conflicts between the entries in these routing tables. This conflict can be resolved by configuring the priority of each routing table. Usually, static routes have the highest priority by default, and when other routing table entries conflict with them, they are all forwarded by static routes.

;