Router principle and routing protocol

Router principle and routing protocol

This article describes the basic working principles of routers in TCP / IP networks, introduces several functions of IP routers, gives static routing protocols and dynamic routing protocols, as well as the concepts of internal gateway protocols and external gateway protocols, and briefly introduces the current The most common routing protocols are RIP, OSPF, BGP, and BGP-4, and then the design goals and types of routing algorithms are described, with emphasis on the link state method and distance vector method. At the end of the article, the characteristics of a new generation of routers are briefly described.

In the past decade, with the continuous expansion of the scale of computer networks and the rapid development of large-scale Internet networks (such as the Internet), routing technology has gradually become a key part of network technology, and routers have become the most important network equipment. The needs of users are driving the development of routing technology and the popularization of routers. People are no longer satisfied with sharing information only on local networks, but want to make the most of various types of network resources in various regions of the world. In the current situation, any computer network with a certain scale (such as enterprise network, campus network, intelligent building, etc.), no matter whether it adopts fast network technology, FDDI technology, or ATM technology, it is inseparable from the router Otherwise, it will not be able to operate and manage normally.

1. Network Interconnection

Interconnecting your own network with other networks, obtaining more information from the network and publishing your own messages to the network is the main driving force for network interconnection. There are many ways to interconnect the network, among which the most used are bridge interconnection and router interconnection.

1.1 Network interconnected by bridges

The bridge works at the second layer of the OSI model, the link layer. Complete the forwarding of data frames (frame), the main purpose is to provide transparent communication between connected networks. Bridge forwarding is based on the source and destination addresses in the data frame to determine whether a frame should be forwarded and to which port. The address in the frame is called the "MAC" address or "hardware" address, which is generally the address carried by the network card.

The role of the bridge is to interconnect two or more networks to provide transparent communication. The devices on the network cannot see the existence of the bridge, and the communication between the devices is as convenient as being on an Internet. Because the bridge is forwarded on the data frame, it can only be connected to the same or similar networks (data frames with the same or similar structure), such as between Ethernet, between Ethernet and token ring Interconnection, for different types of networks (different data frame structure), such as between Ethernet and X.25, the bridge is powerless.

The network bridge expands the scale of the network, improves the performance of the network, and brings convenience to network applications. In previous networks, the application of network bridges is more widespread. But the interconnection of bridges also brings a lot of problems: One is broadcast storm. The bridge does not block the broadcast messages in the network. When the scale of the network is large (a few bridges, multiple Ethernet segments), it may cause Broadcast storm (broadcasTIng storm), caused the entire network to be filled with broadcast information, until completely paralyzed. The second problem is that when interconnected with the external network, the bridge will combine the internal and external networks into one network, and both parties will automatically open their network resources to the other side. This interconnection method is obviously unacceptable when interconnecting with external networks. The main source of the problem is that the bridge simply communicates the network to the maximum, regardless of the information being transmitted.

1.2 Router interconnection network

The interconnection of routers is related to the network protocol. We discuss the situation limited to TCP / IP network.

The router works at the third layer of the OSI model, the network layer. The router uses network addresses (ie, IP addresses) on the "logic" defined by the network layer to distinguish different networks, realize interconnection and isolation of the networks, and maintain the independence of each network. Routers do not forward broadcast messages, but restrict broadcast messages to their respective networks. The data sent to other networks is first sent to the router, and then forwarded by the router.

IP routers only forward IP packets, blocking the rest of the network (including broadcasting), so as to maintain the relative independence of each network, which can form a large network with many networks (subnets) interconnected. Because of the interconnection at the network layer, routers can easily connect to different types of networks. As long as the network layer runs the IP protocol, it can be interconnected through routers.

The devices in the network use their network addresses (IP addresses in TCP / IP networks) to communicate with each other. IP addresses are "logical" addresses that are not related to hardware addresses. The router only forwards data based on the IP address. The structure of an IP address has two parts, one part defines the network number, and the other part defines the host number in the network. At present, the subnet mask is used in the Internet network to determine the network address and the host address in the IP address. The subnet mask is also 32bit like the IP address, and the two are one-to-one correspondence. It is stipulated 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 host number are combined to form a complete IP address. The IP numbers of hosts in the same network must be the same. This network is called an IP subnet.

Communication can only be performed between IP addresses with the same network number. To communicate with hosts in other IP subnets, it must go out through a router or gateway on the same network. IP addresses 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 the IP address of each port must 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 can send the required IP packets to the router through the IP address of their own subnet.

2. Routing principles

When a host in an IP subnet sends an IP packet to another host in the same IP subnet, it will directly send the IP packet to the network and the other party will receive it. When it is to be sent to a host with a different IP on the network, it must select a router that can reach the destination subnet, send the IP packet to the router, and the router is responsible for sending the IP packet to the destination. If no such router is found, the host sends the IP packet to a router called the "default gateway". "Default gateway" is a configuration parameter on each host. It is the IP address of a router port connected to the same network.

When the router forwards the IP packet, it only selects the appropriate port according to the network number part of the destination IP address of the IP packet, and sends the IP packet out. Like the host, the router also determines whether the port is connected to the destination subnet. If so, it directly sends the packet to the network through the port. Otherwise, it must also select the next router to transmit the packet. The router also has its default gateway, which is used to transfer IP packets without knowing where to send. In this way, the IP packet that knows how to transmit is correctly forwarded through the router, and the IP packet that is not known is sent to the "default gateway" router. In this way, the IP packet will eventually be sent to the destination but not to the destination IP packets were discarded by the network.

At present, TCP / IP networks are all interconnected by routers, and the Internet is an international network where thousands of IP subnets are interconnected by routers. This kind of network is called a router-based network (router based network), forming a "internet" with routers as nodes. In the "internet", the router is not only responsible for forwarding IP packets, but also responsible for communicating with other routers to jointly determine the "internet" routing and maintain routing tables.

The routing action includes two basic contents: routing and forwarding. Pathfinding is to determine the best path to the destination, and it is implemented by a routing algorithm. Since different routing protocols and routing algorithms are involved, they are relatively complicated. In order to determine the best path, the routing algorithm must start and maintain a routing table containing routing information, where routing information depends on the routing algorithm used and is not the same. The routing algorithm fills the collected different information into the routing table. According to the routing table, the router can be informed of the relationship between the destination network and the next station (nexthop). The routing information is updated between routers, and the routing table is updated and maintained to correctly reflect the topology changes of the network, and the router determines the best path based on the metrics. This is the routing protocol (rouTIng protocol), such as routing information protocol (RIP), open shortest path first protocol (OSPF) and border gateway protocol (BGP).

Forwarding is the transfer of information packets along the best path with good pathfinding. The router first looks in the routing table to determine whether it knows 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, it groups the packet according to the corresponding entry in the routing table Send to the next site, if the destination network is directly connected to the router, the router will send the packet directly to the corresponding port. This is the routed protocol.

Routing and forwarding protocols and routing protocols are mutually coordinated and independent concepts. The former uses the routing table maintained by the latter, while the latter uses the functions provided by the former to publish routing protocol data packets. Unless otherwise specified, the routing protocols mentioned below refer to routing protocols, which is also a common practice.

3. Routing protocol

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

Static routing is a fixed routing table set in the router. Unless the network administrator intervenes, the static route will not change. Because static routing cannot respond to changes in the network, it is generally used in networks with a small network size and a fixed topology. The advantages of static routing are simple, efficient and reliable. Among all routes, static routes have the highest priority. When a dynamic route conflicts with a static route, the static route shall prevail.

Dynamic routing is a process in which routers in the network communicate with each other, pass routing information, and use the received routing information to update the router table. It can adapt to changes in the network structure in real time. If the route update information indicates that a network change has occurred, 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 its own routing table to dynamically reflect network topology changes. Dynamic routing is suitable for networks with large network scales and complex network topologies. Of course, various dynamic routing protocols will occupy network bandwidth and CPU resources to varying degrees.

Static routing and dynamic routing have their own characteristics and scope of application, so dynamic routing is usually used as a supplement to static routing in the network. When a packet is routed in the router, the router first looks for the static route, if it finds it, it forwards the packet according to the corresponding static route; otherwise, it searches for the dynamic route.

According to whether it is used in an autonomous domain, dynamic routing protocols are divided into internal gateway protocol (IGP) and external gateway protocol (EGP). The autonomous domain here refers to a network with a unified management organization and a unified routing strategy. The routing protocol used in the autonomous domain is called the internal gateway protocol. RIP and OSPF are commonly used. The external gateway protocol is mainly used for routing between multiple autonomous domains. BGP and BGP-4 are commonly used. The following is a brief introduction.

3.1 RIP routing protocol

The RIP protocol was originally designed for the Xerox parc general protocol of the Xerox network system and is a commonly used routing protocol in the Internet. RIP uses the distance vector algorithm, that is, the router selects a route based on the distance, so it is also called a 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 stations to reach each destination. Any other information except the best path to the destination is discarded. At the same time, the router also informs other neighboring routers of the collected routing information by RIP protocol. In this way, the correct routing information gradually spread to the entire network.

RIP is very widely used, it is simple, reliable and easy to configure. However, RIP is only suitable for small homogeneous networks, because it allows a maximum of 15 sites, and any destination with more than 15 sites is marked as unreachable. And the routing information broadcast by RIP every 30s is also one of the important reasons for the broadcast storm of the network.

3.2 OSPF routing protocol

In the mid-1980s, RIP could no longer adapt to the interconnection of large-scale heterogeneous networks, and 0SPF followed. It is a routing protocol developed by the Internal Gateway Protocol Working Group of the Internet Engineering Task Force (1ETF) for IP networks.

0SPF is a routing protocol based on link state. Each router needs to send link state broadcast information to all other routers in the same administrative domain. OSPF link state broadcast 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. The distance vector-based routing protocol only sends routing update information to its neighboring routers.

Unlike RIP, OSPF divides an autonomous domain into zones. Correspondingly, there are two types of routing methods: when the source and destination are in the same zone, intra-area routing is used; when the source and destination are in different zones Time, interval routing is used. This greatly reduces network overhead and increases network stability. When a router in a zone fails, it does not affect the normal operation of routers in other zones in the autonomous domain, which also brings convenience to network management and maintenance.

3.3 BGP and BGP-4 routing protocols

BGP is an external gateway protocol designed for TCP / IP Internet and is used between multiple autonomous domains. It is neither based on pure link state algorithms nor pure distance vector algorithms. Its main function is to exchange network reachable information with BGP of other autonomous domains. Each autonomous domain can run different internal gateway protocols. The BGP update information includes the network number / autonomous domain path pair information. The autonomous domain path includes the autonomous domain string that must pass through to reach a specific network. These update information are transmitted through TCP to ensure the reliability of transmission.

In order to meet the growing needs of the Internet, BGP is constantly developing. In the latest BGp4, similar routes can also be combined into one route.

3.4 Priority of routing table entries

In a router, static routes and one or more dynamic routes can be configured at the same time. The routing tables they maintain are provided to the forwarding program, but there may be conflicts between entries in these routing tables. This conflict can be resolved by configuring the priority of each routing table. Generally, static routes have the default highest priority. When other routing table entries contradict it, they are all forwarded as static routes.

4. Routing algorithm

The routing algorithm plays a vital role in the routing protocol. The algorithm used often determines the final path finding result, so the routing algorithm must be selected carefully. Usually need to comprehensively consider the following design goals:

(1) Optimization: Refers to the routing algorithm's ability to select the best path.

(2) Simplicity: The algorithm design is concise, using the least software and overhead to provide the most effective functions.

(3) Ruggedness: The routing algorithm can operate correctly when it is in an abnormal or unpredictable environment, such as hardware failure, excessive load, or operation error. Because routers are distributed on network connection points, serious consequences will occur when they fail. The best router algorithms can usually stand the test of time and have proven to be reliable in various network environments.

(4) Fast convergence: Convergence is the process by which all routers achieve consistency in judging the best path. When a network event causes the route to be available or unavailable, the router sends out an update message. The routing update information spreads throughout the entire network, causing the best path to be recalculated, and finally reaches the best path that all routers agree on. A routing algorithm with slow convergence can cause path loops or network interruptions.

(5) Flexibility: The routing algorithm can quickly and accurately adapt to various network environments. For example, if a network segment fails, the routing algorithm needs to be able to detect the failure quickly and choose another best path for all routes using the network segment.

Routing algorithms can be divided into the following categories according to the type: static and dynamic, single and multiple, equal and hierarchical, source and transparent routing, intra- and inter-domain, link state and distance vector. The previous features are basically consistent with the literal meaning. The following focuses on link state and distance vector algorithms.

The link state algorithm (also known as the shortest path algorithm) sends routing information to all nodes on the Internet. However, for each router, only its routing table describes its part of the link state. The distance vector algorithm (also known as Bellman-Ford algorithm) requires each router to send all or part of its routing table information, but only to neighboring nodes. Essentially, the link state algorithm sends a small amount of update information to the entire network, while the distance vector algorithm sends a large amount of update information to neighboring routers.

Because the link state algorithm converges faster, it is less likely to generate routing loops than the distance vector algorithm to a certain extent. But on the other hand, the link state algorithm requires more CPU power and more memory space than the distance vector algorithm, so the link state algorithm will be more expensive to implement. In addition to these differences, both algorithms work well in most environments.

Finally, it should be pointed out that the routing algorithm uses many different metrics to determine the best path. A complex routing algorithm may use multiple metrics to select routes. Through a certain weighting operation, they are combined into a single composite metric, and then filled into the routing table as a standard for routing. Commonly used metrics include: path length, reliability, delay, bandwidth, load, and communication cost.

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 and Fast Ethernet, the bandwidth and speed of the network have increased rapidly. Traditional routers can no longer meet the performance requirements of routers. Because the design and implementation of packet forwarding of traditional routers are based on software, the packet processing in the forwarding process has to go through many links, and the forwarding process is complicated, which makes the rate of packet forwarding slower. In addition, because the router is a key device for network interconnection and a "gateway" for the network to communicate with other networks, it has high requirements for its security. Therefore, various additional security measures in the router increase the burden on the CPU. This makes the router a "bottleneck" on the entire Internet.

Traditional routers perform a series of complex operations when forwarding each packet, including route lookup, 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, reduces the packet forwarding rate and forwarding throughput, and increases the burden on the CPU. The correlation between the packets before and after passing through the router is great. Packets with the same destination address and source address often arrive continuously, which provides the possibility and basis for the rapid forwarding of packets. New generation routers, such as IP Switch and Tag Switch, use this design idea to implement fast forwarding with hardware, which greatly improves the performance and efficiency of the router.

New generation routers use forwarding buffers to simplify packet forwarding operations. In the fast forwarding process, only the first few packets of a group of packets with the same destination address and source address need to be traditionally routed and forwarded, and the destination address, source address and next gateway address of the successfully forwarded packet ( The address of the next router) is placed in the forwarding cache. When the subsequent packet is to be forwarded, Yin looks at the forwarding cache first. If the destination address and source address of the packet match the forwarding cache, it will be forwarded directly according to the next gateway address in the forwarding cache without going through the traditional The complicated operation of the system greatly reduces the burden on the router and achieves the goal of improving the throughput of the router.

ZGAR Aurora Vape Pods 1.0

Aurora Disposable Vape Device Vaping Pod Systems

Shenzhen WeiKa Technology Co.,Ltd. is a professional e-cigarette manufacturer and enterprise integrating R&D, design, production and sales and service of the electronic cigarette atomizer products, established in 2020.

We are actively developing and producing all kinds of reliable and unique atomizer products. We centre on research, developing, high quality and safety, and focus on better vaping experience in all aspects to our customers. We have advanced production equipment and strict production control system, each process has strict management, from production to delivery have been strictly tested to ensure the classic quality. Zgarvape for the future!

Aurora E-cigarette Cartridge is loved by the majority of consumers for its gorgeous and changeable colors, especially at night or in the dark. Fruits Flavors series, plant flavors series & special flavors series.Up to 16 different flavors for choices. A new design of gradient our disposable vape is impressive. Our vape pen and pods are matched with all the brands on the market. You can use other brand's vape pen with our vape pods. Aurora series Pods systems, the first choice for professional users!


16 Available Flavors (3Pods*2ml):

Amazing Cantaloupe / Coke on the Rocks / Ice Coconut / Ice Lolly / Iced Mung Bean / Longjing Tea / Mango Feast / Mountain Spring / Peach Tempting / Pineapple Juice / Refreshing Melon / Refreshing Mint / Rich Strawberry / Rose Litchi / The Ocean / Watermelon Juice

2021042116030620210421160303

20210421160316

20210421160300

Zgar Colorful Vape Pen E Cigarette Atomizer Device


Aurora Pods 1.0,ZGAR Aurora Vape Pods 1.0 Pod System Vape,ZGAR Aurora Vape Pods 1.0 Pos Systems Touch Screen,ZGAR Aurora Pods 1.0 Disposable Vape Pod System,400Puffs Pod Vape System

Zgar International (M) SDN BHD , https://www.zgarvapepen.com