Router principle and routing protocol

xiaoxiao2021-03-06  111

By explaining the basic working principle of the router in the TCP / IP network, this paper introduces several functions of the IP router, giving static routing protocols and dynamic routing protocols, as well as the concept of internal gateway protocols and external gateway protocols, and briefly introduced the current The most common RIP, OSPF, BGP, and BGP-4, the routing protocol, then describe the design goals and types of the routing algorithm, focusing on the link state method and distance vector method. At the end of the article, the characteristics of a new generation router will be described.

- For nearly ten years, with the continuous expansion of computer network, large-scale internet (such as internet) has developed rapidly, routing technology has gradually become a critical part of network technology, and routers have also become the most important network equipment. The needs of users drive the development of routing technologies and the popularity of routers, and people are not satisfied with the only information on local networks, and hopes to maximize the use of worldwide, various types of network resources. In the current situation, any computer network with a certain scale (such as enterprise network, campus network, intelligent building, etc.), no matter how fast the big network technology, FDDI technology, or ATM technology, is inseparable from the router. Otherwise, it will not work and manage normally.

1 network interconnection

- Take your own network with other networks, get more information from the network and post your own news to the network is the most important power of network interconnection. There are many ways to interconnect the network, where the most used is a bridge interconnect and router interconnect.

1.1 Network bridge interconnection network

- The bridge works in the second layer of the OSI model, that is, the link layer. Completing the forwarding of the data frame, the main purpose is to provide transparent communication between the connected networks. The forwarding of the bridge determines whether a frame should forward and forward to which port should be forwarded and forwarded in accordance with the source address and destination address in the data frame. The address in the frame is called the "MAC" address or "hardware" address, which is generally the address of the network card.

- The role of the bridge is to interconnect two or more networks and provide transparent communication. The device on the network does not see the existence of the bridge, and the communication between the devices is as convenient to one online. Since the bridge is forwarded on the data frame, only the same or similar network (data frames of the same or similar structure), such as the Ethernet, the Ethernet and the token ring between the TOKEN RING. Interconnection, for different types of networks (different data frame structures), such as between Ethernet and X.25, the bridge is powerless.

- Bridge expands the size of the network, improves the performance of the network, bringing convenience to network applications, and bridges in the previous network. However, the bridge interconnect has also brought a lot of problems: one is the broadcast storm, the bridge does not block the broadcast message in the network, when the network is large (several bridges, multiple Ethernet segments), it is possible to cause Broadcasting Storm, resulting in full network of broadcast information until completely paralyzed. The second question is that when interconnected with external networks, the bridge will combine the internal and external networks for one, become a network, both sides automatically open their own network resources to the other party. This interconnection method is obviously unacceptable when interconnecting external networks. The main root of the problem is that the bridge only maximizes communication network, regardless of whether the transmitted information is.

1.2 Router Interconnection Network

- Router interconnects related to the network's protocol, we discuss the situation that is limited to TCP / IP networks.

- The third layer of the router works in the OSI model, ie the network layer. The router uses the network address (ie, IP address) on the "logical" defined network layer to distinguish between different networks, realizing the interconnection and isolation of the network, maintaining independence of each network. The router does not forward broadcast messages, and the broadcast message is limited to the inside of their respective networks. Data, which is sent to other networks first sent to the router, and then forwards it. - IP router only forwards IP packets, blocks the rest in the network (including broadcast), thereby maintaining each network has relatively independence, which can form a large network with many network (subnet) interconnect. Since it is interconnected in the network layer, the router can easily connect different types of networks, as long as the network layer is running an IP protocol, can be connected to each other through the router.

- The device in the network communicates with their network addresses (IP addresses in the TCP / IP network). The IP address is a "logical" address that is independent of the hardware address. The router forwards data only according to the IP address. The structure of the IP address has two parts, part of the definition network number, and another part defines the host number in the network. Currently, a subnet mask is used in the Internet network to determine the network address and host address in the IP address. The subnet mask is also 32bit as the IP address, and the two are one or one, and it is specified that the part of the IP address corresponding to the number "1" in the subnet mask is the network number, which is "0". The corresponding is the host number. The network number and the host number together constitute a complete IP address. The host IP address in the same network must be the same, and this network is called an IP subnet.

- Communication can only be performed between IP addresses with the same network number, communicating with hosts of other IP subnets, must go out of a router or gateway on the same network. The IP address of different network numbers cannot communicate directly, even if they are connected together, they cannot communicate.

- The router has multiple ports for connecting multiple IP subnets. The network number of each port's IP address is required to be the same as the network number of the connected IP subnet. Different ports are different network numbers, corresponding to different IP subnets, so that the hosts in each subnet will send the required IP packets to the router through the IP address of their subnet.

2 principle

- When a host in the IP subnet sends an IP packet to another host, it will send the IP packet to the network directly, and the other party can receive it. When it is given to different IPs on the Internet, it is to select a router that can reach the subnet, and give the IP packet to the router, and the router is responsible for sending the IP packet to the destination. If such a router is not found, the host gives an IP packet to a router called "default gateway". "Default Gateway" is a configuration parameter on each host, which is an IP address of a router port on the same network.

- When the router forwards the IP packet, only the appropriate port is selected according to the network number portion of the IP packet purpose IP address, and the IP packet is sent out. Like the host, the router also determines whether the port is connected is a destination subnet. If so, send the packet directly to the network through the port, otherwise, select the next router to transmit the packet. The router also has its default gateway to transmit IP packets that do not know where to send. In this way, the IP packet knows how to transmit the IP packet is given to the "default gateway" router, which will eventually send it to the destination, the IP group will eventually be delivered to the destination, the IP group will eventually be delivered to the destination The IP packet is discarded by the network.

- At present, TCP / IP networks are all interconnected through routers, and the Internet is the international network of thousands of IP subnets through routers. This network is called a router-based network, which forms "network network" with a router as a node. In "Internet", the router is not only responsible for the forwarding of IP packets, but also responsible for contact with other routers to determine the routing and maintenance routing table of "Internet Network". - Routing Action includes two basic contents: diameter and forwarding. The finding diameter determines the optimal path to the destination, and is implemented by the routing algorithm. Some complicated are relatively complicated due to different routing protocols and routing algorithms. In order to determine the best path, the routing algorithm must start and maintain the routing table containing routing information, where routing information depends on the route selection algorithm used. The routing algorithm fills in the routing table in accordance with the routing table to tell the router according to the routing table. The relationship between the destination network and the next stop. Route interworking information is routing updates, updating the maintenance routing table correctly reflects the topology change of the network, and determines the best path by the router according to the measurement. This is the Routing Protocol, such as Routing Information Protocol (RIP), Open Shortest Path Priority Protocol (OSPF), and Boundary Gateway Protocol (BGP).

- Forwarding the best path to the Digital Path to transfer information packet. The router is first lookup in the routing table, and it is determined that you know how to send the packet to the next site (router or host), if the router does not know how to send the packet, it usually discards the packet; otherwise groups according to the corresponding entry of the routing table Send to the next site, if the destination network is connected directly to the router, the router is sent directly to the corresponding port. This is the routing forwarding protocol (ROUTED Protocol).

- Route forwarding protocols and routing protocols are mutual cooperation and independent concepts. The former uses the latter maintained routing table, and the latter should use the function provided by the former to issue routing protocol data packets. The routing protocols mentioned below unless otherwise stated, this is also a general habit.

3 routing agreement

- There are two typical routing methods: static routing and dynamic routes.

- Static route is a fixed routing table set in the router. The static route does not change unless the network administrator intervention is intervened. Since the static route cannot be reflected in the change of the network, it is generally used in a network that is not large, the topology is fixed. The advantage of static routes is simple, efficient, and reliable. In all routes, the static route is highest. When the dynamic routing conflicts with static routing, the static route is accurate.

- Dynamic routing is the process of communicating between routers in the network, transmitting routing information, updating the process of updating the router table using the received routing information. It adapts to the changes in the network structure in real time. If the route update information indicates that the network changes have changed, the routing software will recalculate the route and issue new route update information. This information passes through each network, causing each router to restart its routing algorithm, and update their respective routing tables to dynamically reflect the network topology. Dynamic routes apply to network-scale networks, network topology complex networks. Of course, various dynamic routing protocols occupy network bandwidth and CPU resources varying degrees.

- Static routing and dynamic routing have their own characteristics and applicable ranges, so dynamic routing in the network is usually supplemented as a static route. When a packet is finding in the router, the router first looks for static routes. If it is found, the packet is forwarded according to the corresponding static routing; otherwise look up dynamic route.

- Dynamic routing protocol is divided into internal gateway protocol (IGP) and External Gateway Protocol (EGP) based on whether it is in autonomous domain. The autonomous domain here refers to a network with a unified manager, a unified route policy. The routing protocol used inside the autonomous domain is called the internal gateway protocol, which is commonly used with RIP, OSPF; external gateway protocols are mainly used by routing between multiple autonomous domains, which are commonly used BGP and BGP-4. The following is a brief introduction. 3.1 RIP Routing Agreement

--RIP protocol is originally designed for Xerox Parc General Agreement for an Xerox Network System, which is a commonly used routing protocol in the Internet. The RIP uses the distance vector algorithm, that is, the router selects route according to the distance, which is also known as the distance vector protocol. The router collects all the different paths that can reach the destination, and saves the path information about the minimum number of sites to each destination, and any other information is discarded in addition to the optimal path to the destination. At the same time, the router also notifies the adjacent other routers with the collected routing information. In this way, the correct routing information is gradually spread to the whole network.

- RIP is very wide, it is simple, reliable, easy to configure. However, RIP is only applicable to a small homogeneous network because it allows the maximum number of sites to be 15, and any destination of more than 15 sites is marked as unreachable. Moreover, RIP is one of the important reasons for the network's broadcast storm every 30s.

3.2 OSPF Routing Agreement

- In the mid-1980s, RIP did not adapt to the interconnection of large-scale heterogeneous networks, 0SPF production. It is a routing protocol developed by the Internet Engineering Task Organization (1ETF) to the IP network.

--0SPF is a link-based routing protocol that requires each router to send link status broadcast information to all other routers of the same management domain. All interface information, all measures, and other variables are included in the link state broadcast of OSPF. The associated link status information must first be collected by the router using 0SPF, and calculates the shortest path to each node according to a certain algorithm. The routing protocol based on the distance vector is only transmitted to its adjacent routers.

- Unlike RIP, OSPF divides a copy of the autonomous domain into the zone. That is, there are two types of routing options: When the source and destination are in the same area, the in-line routing is used; the source and destination are When different areas, interval route selection is employed. This greatly reduces the network overhead and increases the stability of the network. When the router in a zone has failed, it does not affect the normal operation of the other zone routers in the autonomous domain, which also provides convenient to the network management and maintenance.

3.3 BGP and BGP-4 Routing Agreements

--BGP is an external gateway protocol designed for TCP / IP Internet for multiple autonomous domains. It is neither a pure link state algorithm, nor is it based on a pure distance vector algorithm. Its main function is to exchange networks with other autonomous domains. Each autonomous domain can run different internal gateway protocols. The BGP update information includes a network number / autonomous domain path pair information. Autonomous domain paths include autonomous domains that reach a particular network must pass through TCP to ensure the reliability of transmission.

- BGP is still growing in order to meet the growing needs of Internet. In the latest BGP4, similar routes can be combined into a route.

3.4 Priority issues of routing entry

- In a router, static routes and one or more dynamic routes can be configured simultaneously. Their respective routing tables are provided to the forwarding program, but these routing tables may have conflicts. This conflict can be solved by configuring the priority of each routing table. Usually static routing has the default highest priority, and when other routing tables are contradictory, they are forwarded by static routing.

4 routing algorithm

- Routing algorithm plays a crucial role in the routing agreement, which algorithm uses the algorithm to determine the final findings, so selecting the routing algorithm must be careful. It is usually necessary to consider the following design objectives: - (1) Optimization: The ability to select the optimal path to the routing algorithm.

- (2) Simpleness: The algorithm is designed and the least efficient function is provided with the least amount of software and overhead.

- (3) Rugity: The routing algorithm is in an abnormal or unpredictable environment, such as hardware failure, too high or operating error, can operate correctly. Since the router is distributed on the network connection point, serious consequences are generated when they fail. The best router algorithm usually can withstand time test and is proven to be reliable in various network environments.

- (4) Rapid convergence: convergence is a result of all routers to achieve all routers on the judgment of the optimal path. When a network event causes routing or not available, the router issues updated information. Routing update information spreads throughout the network, triggeting the re-calculation of the best path, and finally meets all routers uniformly recognized optimal paths. Convergence slow routing algorithms will cause path cycles or network interruptions.

- (5) Flexibility: Routing algorithm can accommodate various network environments quickly and accurately. For example, a network segment has failed, and the routing algorithm can quickly discover the fault, and select another best path for all routes to use the network segment.

- Routing Algorithm can be divided into the following: Static and dynamic, single and multiplex, equality, and grading, source routing and transparent route, domain, and inter-domain, link status, and distance vectors. The characteristics of the previous character are basically consistent, and the link state and distance vector algorithm are focused below.

- Link status algorithm (also known as the shortest path algorithm) Send routing information to all nodes on the Internet, however, for each router, only the part of its own link state is described in the routing table. The distance vector algorithm (also known as the Bellman-Ford algorithm) requires that each router is all or part of the routing table, but only is sent to the neighboring node. In essence, the link state algorithm sends a small number of updates to the network, while the distance vector algorithm sends a large number of updates to the adjacent router.

- Because the link state algorithm converges faster, it is less likely to generate routing cycles to a certain degree of distance vector algorithms. On the other hand, the link status algorithm requires a stronger CPU capability and more memory space than the distance vector algorithm, so the link status algorithm will be more expensive when implementing. In addition to these differences, both algorithms can run well in most environments.

- Finally, it is important to note that the routing algorithm uses many different metrics to determine the best path. Complex routing algorithms may adopt a variety of metrics to select routing, combine them into individual composite metrics, and then fill in the routing table as the criteria for finding. The metrics usually used are: path length, reliability, delay, bandwidth, load, communication cost, and the like.

5 new generation router

- Due to the development of multimedia and other applications in the network, and the continuous adoption of new technologies such as ATM, fast Ethernet, the network's bandwidth and rate rapidly, and traditional routers can no longer meet people's performance requirements for routers. Because the design and implementation of the packet forwarding of the traditional router is based on the software, the process of processing the packet during the forwarding process has multiple links, and the forwarding process is complex, so that the rate of packet forwarding is slower. In addition, since the router is a key device for network interconnection, it is a "gate" that communicates with other networks. It has high requirements for its security, so various additional security measures in the router adds the burden on the CPU. This makes the router become a "bottleneck" on the Internet.

- Traditional routers must perform a series of complex operations when forwarding each packet, including routing, access control table matching, address resolution, priority management, and other additional operations. This series of operations greatly affects the performance and efficiency of the router, reducing the packet forwarding rate and forwarding throughput, increasing the burden on the CPU. The correlation between the front and rear of the router is very dependent, and packets with the same destination address and source address are often arriving continuously, which provides a possible and basis for the rapid forwarding of packets. A new generation of routers, such as IP Switch, Tag Sitch, etc., which use this design idea hardware to achieve rapid forwarding, greatly improved the performance and efficiency of the router. - A new generation router uses forward caching to simplify the forwarding operation of the packet. During the rapid forwarding process, only the first few packets of the group with the same destination address and the source address, and the destination address, source address, and the next gateway address of the successful forwarded packet ( Next router address) releases people in the cache. When the subsequent packet is to be forwarded, the forward view of the forwarding cache, if the packet's destination address and source address are matched in the forwarding cache, then directly according to the next gateway address in the forwarding cache, without having to pass the tradition Complex operations greatly alleviate the burden of the router and achieve the goal of improving the router throughput.

转载请注明原文地址:https://www.9cbs.com/read-126590.html

New Post(0)