Traditional Culture Encyclopedia - Traditional stories - IP network technology principles .
IP network technology principles .
1.Network Interconnection
Interconnecting one's own network with other networks, obtaining more information from the network and distributing one's own messages to the network are the most important motivations for interconnecting networks. Networks can be interconnected in a variety of ways, with bridge interconnections and router interconnections being the most used.
1.1 Bridges Interconnecting Networks
Bridges work at the second layer of the OSI model, the link layer. It accomplishes the forwarding of data frames, with the primary purpose of providing 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 the "hardware" address, which is usually the address that comes with the network card.
The purpose of a bridge is to interconnect two or more networks to provide transparent communication. The bridge is invisible to devices on the network, and communication between devices is as easy as being on the same network. Because bridges forward data frames, they can only connect the same or similar networks (data frames of the same or similar structure), such as interconnections between Ethernet, between Ethernet and token ring (token ring), and they can't do anything for different types of networks (data frames of different structures), such as between Ethernet and X.25.
Bridges expand the size of the network, improve the performance of the network, and bring convenience to the network application, in the previous network, the bridge is more widely used. But bridge interconnections also bring a lot of problems: one is the broadcasting storm, the bridge does not block the network broadcast messages, when the network size is large (several bridges, multiple Ethernet segments), may cause a broadcasting storm (broadcasting storm), resulting in the entire network is filled with broadcasting information, until completely paralyzed. The second problem is that when interconnecting with an external network, the bridge will merge the internal and external networks into one network, and both sides will automatically open their network resources to each other. This type of interconnection is obviously unacceptable when interconnecting with external networks. The main source of the problem is that bridges simply maximize network communication, regardless of the information being transmitted.
1.2 Router Interconnection Networks
Router interconnection is related to the protocol of the network, and we limit our discussion to the case of TCP/IP networks.
Routers operate at the third layer of the OSI model, the network layer. Routers use "logical" network addresses (i.e., IP addresses) defined at the network layer to distinguish between different networks, to interconnect and isolate networks, and to maintain the independence of each network. Routers do not forward broadcast messages, but restrict them to their own networks. Data sent to other networks is first sent to the router and then forwarded out by the router.
IP routers forward only IP packets, keeping the rest inside the network (including broadcasts), thus maintaining the relative independence of individual networks, which can form large networks with many interconnected networks (subnets). Because of the interconnection at the network layer, routers can easily connect different types of networks, as long as the network layer is running the IP protocol, through the router can be interconnected.
Devices on a network communicate with each other using their network addresses (IP addresses in a TCP/IP network), which are "logical" addresses that are independent of hardware addresses. Routers only forward data based on IP addresses, which are structured in two parts, one defining the network number and the other defining the host number within the network. Currently, subnet masks are used in Internet networks to determine the network and host addresses in an IP address. Subnet mask and IP address is also 32bit, and the two are one-to-one correspondence, and stipulates that the subnet mask number "1" corresponds to the part of the IP address for the network number, for "0" corresponds to the host number. The network number and host number are combined to form a complete IP address. The network number must be the same for host IP addresses in the same network, which is called an IP subnet.
Communication can only take place between IP addresses with the same network number, and to communicate with hosts on other IP subnets, you must go through a router or gateway on the same network (gateway) out. IP addresses with different network numbers cannot communicate directly, even if they are connected together.
A router has multiple ports for connecting multiple IP subnets. The network number of the IP address for each port is required to be the same as the network number of the IP subnet to which it is connected. Different ports are different network numbers, corresponding to different IP subnets, so that hosts in each subnet can send outgoing IP packets to the router through the IP address of their own subnet.
2. Routing principle
When a host in the IP subnet sends an IP packet to another host in the same IP subnet, it will send the IP packet directly to the network, and the other party can receive it. When it wants to send it to a host on a different IP subnet, it has to choose a router that can reach the destination subnet, send the IP packet to that router, and the router will be 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)". The "default gateway" is a configuration parameter on each host that is the IP address of a router port on the same network.
When a router forwards an IP packet, it selects the appropriate port to send the IP packet out based only on the network number portion of the IP address of the destination of the IP packet. Like the host, the router has to determine whether the port is connected to the destination subnet, and if it is, it sends the packet directly through the port to the network; otherwise, it also selects the next router to deliver the packet. A router also has its default gateway, which is used to deliver IP packets that it does not know where to send them. In this way, through the router to know how to transmit the IP packet correctly forwarded out, do not know the IP packet to the "default gateway" router, so that the level of transmission, the IP packet will ultimately be sent to the destination, to send the destination of the IP packet is not discarded by the network.
The current TCP/IP network, all interconnected through the router, the Internet is thousands of IP subnets through the router interconnected to the international network. This network is called router-based network (router based network), the formation of routers as nodes of the "inter-network". In the "inter-network", the router is not only responsible for the IP packet forwarding, but also responsible for liaison with other routers, *** with the determination of the "inter-network" routing and maintenance of the routing table.
The routing action consists of two basic elements: pathfinding and forwarding. Pathfinding is the process of determining the best path to a destination, and is realized by routing algorithms. Because it involves different routing protocols and routing algorithms, it is relatively complex. In order to determine the best path, the routing algorithm must start and maintain a routing table containing routing information, which varies depending on the routing algorithm used. The routing algorithm fills the routing table with the different information it collects, and based on the routing table it can tell the routers about the relationship between the destination network and the next stop (nexthop). Routers interoperate with each other to update the information for routing, update and maintain the routing table so that it correctly reflects the topological changes in the network, and the router to determine the best path based on the measurements. 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 transmission of packets of information along the best-path-finding path. Router first look 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, usually the packet will be discarded; otherwise, according to the corresponding table entries in the routing table will send the packet to the next site, if the destination network is directly connected to the router, the router sends the packet directly to the appropriate port. This is the route forwarding protocol (routed protocol).
Routed forwarding protocols and routing protocols are complementary and independent concepts, with the former using the routing tables maintained by the latter, and the latter taking advantage of the functionality provided by the former to distribute routed protocol packets. Unless otherwise noted, references to routing protocols in the following sections refer to routing protocols, which is also common practice.
3. Routing Protocols
There are two typical approaches to routing: static routing and dynamic routing.
Static routes are fixed routing tables set up in the router. Static routes do not change unless the network administrator intervenes. Because static routes do not reflect changes in the network, they are generally used in networks that are small and have a fixed topology. The advantages of static routing are simplicity, efficiency, and reliability. Among all routes, static routes have the highest priority. When a dynamic route conflicts with a static route, the static route prevails.
Dynamic routing is the process by which routers in a network communicate with each other, pass routing information, and use the routing information received to update the router table. It adapts to changes in network structure in real time. If routing update information indicates that a network change has occurred, the routing software recalculates the route and sends out a new routing update message. This information passes through each network, causing each router to restart its routing algorithm and update its respective routing table to dynamically reflect the network topology change. Dynamic routing is suitable for networks with large network sizes and complex network topologies. Of course, various dynamic routing protocols take up 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 a static route, and if it finds one, it forwards the packet according to the corresponding static route; otherwise, it looks for a dynamic route.
Dynamic routing protocols are categorized as interior gateway protocols (IGPs) and exterior gateway protocols (EGPs), depending on whether they are used within an autonomous domain. An autonomous domain here refers to a network with a unified management organization and a unified routing policy. The routing protocols used within an autonomous domain are called interior gateway protocols, commonly used RIP, OSPF; exterior gateway protocols are mainly used for routing between multiple autonomous domains, commonly used BGP and BGP-4. The following is a brief introduction.
3.1 RIP Routing Protocol
The RIP protocol was originally designed for the Xerox parc generic protocol for the Xerox network system, and is a commonly used routing protocol in the Internet.RIP uses the distance vector algorithm, which means that the router selects routes based on distance, so it is also known as the distance vector protocol. The router collects all the different paths to 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. The router also informs the other neighboring routers about the collected routing information using RIP protocol. In this way, correct routing information gradually spreads throughout the network.
RIP is very widely used; it is simple, reliable, and easy to configure. But RIP is only suitable for small, homogeneous networks because it allows a maximum number of sites of 15, and any destination with more than 15 sites is marked as unreachable. Also, RIP broadcasts routing information every 30s, which is one of the major causes of broadcast storms in 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 was created. It is a routing protocol developed for IP networks by the Internal Gateway Protocol Working Group of the InterNetwork Engineering Task Force (1ETF).
0SPF is a link-state-based routing protocol that requires each router to send link-state broadcast messages to all other routers in its same administrative domain. Included in OSPF's link-state broadcast is all interface information, all metrics, and a few other variables. Routers utilizing 0SPF must first collect relevant link state information and calculate the shortest path to each node according to a certain algorithm. In contrast, distance vector-based routing protocols only send relevant routing updates to their neighboring routers.
Unlike RIP, OSPF subdivides an autonomous domain into zones, which corresponds to two types of routing: intra-zone routing when the source and destination are in the same zone; and inter-zone routing when the source and destination are in different zones. This greatly reduces network overhead and increases network stability. When a router failure within a zone does not affect the normal work of the routers in other zones of the autonomous domain, which also brings convenience to the management and maintenance of the network.
3.3 BGP and BGP-4 Routing Protocols
BGP is an external gateway protocol designed for the TCP/IP Internet to be used between multiple autonomous domains. It is based neither on a pure link-state algorithm nor on a pure distance vector algorithm. Its main function is to exchange network reachability information with BGP from other autonomous domains. Each autonomous domain can run a different internal gateway protocol. the BGP update information consists of network number/autonomous domain path pairs. Autonomous paths include a string of autonomous domains that must be traveled to reach a particular network. This update information is transmitted over TCP to ensure reliable transmission.
BGP continues to evolve to meet the expanding needs of the Internet. In the latest BGp4, it is also possible to combine similar routes into a single route.
3.4 Prioritization of Routing Table Entries
In a router, both static routes and one or more dynamic routes can be configured. Each of them maintains routing tables that are made available to forwarding programs, but conflicts may occur between table entries in these routing tables. Such conflicts 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 it, they are forwarded as static routes.
4. Routing Algorithms
Routing algorithms play a crucial role in routing protocols, and what algorithms are used often determines the final path-finding results, so the choice of routing algorithms must be careful. The following design goals usually need to be considered:
(1) Optimization: refers to the ability of the routing algorithm to select the best path.
(2) Simplicity: the algorithm is designed to be concise, utilizing the least amount of software and overhead to provide the most efficient functionality.
(3) Robustness: the routing algorithm operates correctly when it is in abnormal or unpredictable environments, such as hardware failure, excessive load, or operational error. Since routers are distributed across the network connection points, there are serious consequences when they fail. The best router algorithms typically stand the test of time and have proven reliable in a variety of network environments.
(4) Rapid convergence: Convergence is the process by which all routers reach agreement on the determination of the best path. When a network event causes a route to become available or unavailable, the router sends an update message. The routing update information spreads throughout the network, triggering a recalculation of the best path, and ultimately reaching the best path recognized by all routers in agreement. Routing algorithms that converge slowly can cause path loops or network outages.
(5) Flexibility: routing algorithms can quickly and accurately adapt to various network environments. For example, if a network segment fails, the routing algorithm should be able to quickly detect the failure and select another optimal path for all routes using the segment.
Routing algorithms can be categorized into the following types according to their kind: static and dynamic, single and multiple routes, equal and hierarchical, source and transparent routes, intra- and inter-domain, link state, and distance vectors. The characteristics of the first few are basically the same as the literal meaning, and 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, it sends only that portion of its routing table that describes the state of its own link. The distance vector algorithm (also known as the Bellman-Ford algorithm), on the other hand, requires each router to send all or part of its routing table, but only to neighboring nodes. In essence, the link-state algorithm sends a small amount of updated information to various parts of the network, while the distance-vector algorithm sends a large amount of updated information to neighboring routers.
Because the link-state algorithm converges faster, it is somewhat less likely to generate routing loops than the distance-vector algorithm. On the other hand, however, the link-state algorithm requires more CPU power and more memory space than the distance-vector algorithm, so the link-state algorithm will be somewhat more expensive to implement. Other than these differences, both algorithms work well in most environments.
Finally, it is important to note that routing algorithms use many different metrics to determine the best path. Complex routing algorithms may use multiple metrics to select a route, and then combine them into a single composite metric, which is then populated into a routing table and used as a criterion for finding a path. Typically, the metrics used are: path length, reliability, delay, bandwidth, load, communication cost, and so on.
5. New generation of routers
Due to the development of multimedia and other applications in the network, as well as ATM, Fast Ethernet and other new technologies continue to be used, the bandwidth of the network and the rate of the rapid increase in the traditional router can not meet the performance requirements of the router. Because the traditional router packet forwarding design and implementation are based on software, the processing of packets in the forwarding process through many links, the forwarding process is complex, making the rate of packet forwarding slower. In addition, because the router is the key equipment of the network interconnection, is the network and other networks to communicate with a "gateway", its security has high requirements, so the router in a variety of additional security measures to increase the burden on the CPU, which makes the router become the entire Internet "!
The traditional router is a bottleneck in the Internet.
Traditional routers have to 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 very large, and the packets with the same destination address and source address tend to arrive in succession, which provides a possibility and basis for the realization of fast packet forwarding. The new generation of routers, such as IP Switch, Tag Switch, etc., is to use this design idea to realize fast forwarding with hardware, greatly improving the performance and efficiency of the router.
New-generation routers use a forwarding cache to simplify packet forwarding operations. In the fast forwarding process, only the first few packets of a group of packets with the same destination and source addresses are subjected to the traditional route forwarding process, and the destination address, source address, and next gateway address of the successfully forwarded packets (the next router address) are put into the forwarding cache. When the subsequent packet to be forwarded, Yin first check the forwarding cache, if the packet's destination address and source address with the forwarding cache match, then directly according to the forwarding cache in the next gateway address to forward, without the traditional complex operation, greatly reducing the burden on the router, to achieve the goal of improving router throughput.
- Related articles
- Brief introduction of Heilongjiang Song and Dance Theatre
- Today's machines are more and more developed, will the profession of farmers disappear from now on?
- What is the power of the double-door refrigerator?
- What parts should be included in the Wushu training system in adolescence?
- How difficult is traditional beekeeping?
- Why do people on business trips like to stay in bathing establishments but not hotels?
- Which family is good for Jinan hairdressing group purchase?
- How to adjust bleaching and lead skin when fishing with earthworms?
- English Introduction of Chung Yeung Festival English Brief Introduction and Selected Translation
- How much is the bride price?