Current location - Training Enrollment Network - Mathematics courses - Routing protocol of multi-service router
Routing protocol of multi-service router
As an important member of the TCP/IP protocol family, the routing process will affect the efficiency of the whole Internet. According to the different application scope, routing protocols can be divided into two categories: AS (autonomous system, which refers to an interconnected network, that is, dividing the whole internet into many smaller network units, which have the right to independently decide which routing protocol should be adopted in this system) is called internal gateway protocol, and the routing protocol between AS is called external gateway protocol. The gateway here is the old name of the router. There are several kinds of interior gateway routing protocol currently used: RIP- 1, RIP-2, IGRP, EIGRP, IS-IS and OSPF. Among them, the first four routing protocols use distance vector algorithm, and IS-IS and OSPF use link state algorithm. For small networks, routing protocols based on distance vector algorithm are easy to configure and manage, and are widely used. However, in the face of large-scale networks, not only the inherent loop problem becomes more difficult to solve, but also the occupied bandwidth increases rapidly, so that the network can't bear it. Therefore, for large-scale networks, IS-IS and OSPF with link state algorithm are more effective and widely used. There is little difference in quality and performance between IS-IS and OSPF, but OSPF is more suitable and dynamic for IP than IS-IS. IETF has been committed to the improvement of OSPF, and its pace of modification is much faster than that of IS-IS. This makes OSPF a widely used routing protocol. Now, OSPF is considered as the basic routing protocol of traditional router design and MPLS (Multi-Protocol Label Switching), and MPLS will soon become the standard.

The external gateway protocol originally adopted EGP. EGP is designed for simple tree topology. With more and more users and networks joining the Internet, it brings many restrictions to EGP. In order to get rid of the limitations of EGP, the IETF Border Gateway Protocol Working Group has formulated a standard border gateway protocol-BGP.

RIP protocol

OSPF protocol

BGP protocol

IGRP protocol

EIGRP protocol

ES-IS and IS-IS protocols

1 and RIP protocol

RIP is the abbreviation of routing information protocol, which uses distance vector algorithm and is the most widely used internal gateway protocol. By default, RIP uses a very simple measurement system: the distance is the number of links to the destination site, with a value of 1~ 15 and a value of 16 indicating infinity. The RIP process uses UDP port 520 to send and receive RIP packets. RIP packets are broadcast every 30 seconds. In order to prevent "broadcast storm", subsequent data packets will be sent after a random delay. In RIP, if a route is not brushed within 180s, the corresponding distance is set to infinity, and the entry is deleted from the routing table. RIP packets are divided into two types: request packets and corresponding packets.

RIP- 1 was put forward earlier and has many defects. In order to improve the shortcomings of RIP- 1, an improved RIP-2 was proposed in RFC 1388 and revised in RFC 1723 and RFC 2453. RIP-2 defines an effective improvement scheme. The new RIP-2 supports subnet routing, CIDR and multicast, and provides authentication mechanism.

With the emergence of OSPF and IS-IS, many people think that RIP is out of date. But RIP also has its own advantages. For small networks, RIP is still widely used because of its low bandwidth and easy configuration, management and implementation. But RIP also has obvious disadvantages, that is, when there are multiple networks, there will be loop problems. In order to solve the loop problem, IETF put forward the method of dividing the range, that is, the router can't advertise the route through the interface it knows the route. Split range solves the routing loop problem between two routers, but it can't prevent three or more routers from forming routing loops. Triggered update is another way to solve the loop problem, which requires the router to transmit its routing table immediately when the link changes. This speeds up the convergence of networks, but it is easy to cause broadcast flooding. In a word, it takes some time and bandwidth to solve the loop problem. If RIP protocol is adopted, the number of links in the network cannot exceed 15, which makes RIP protocol unsuitable for large networks. 2.OSPF protocol

In order to solve the defects of RIP protocol, 1988 RFC set up an OSPF working group and began to study and formulate OSPF. 1April, 998, OSPF protocol version 2 (OSPFv2) appeared as a standard in RFC 2328. The full name of OSPF is open shortest path first, and the O of OSPF means that the OSPF standard is open to the public, not a closed proprietary routing scheme. OSPF adopts the link-state protocol algorithm, and each router maintains the same link-state database to save the topology of the whole AS (without dividing AS). Once each router has a complete link state database, it can construct the shortest path tree by itself, and then construct the routing table according to the shortest path. For large-scale networks, in order to further reduce the traffic of routing protocol communication and facilitate management and calculation, OSPF divides the whole AS into several areas, and the routers in the areas maintain the same link state database and preserve the topological structure of the areas. OSPF routers exchange information with each other, but the information exchanged is not the route, but the link state. OSPF defines five types of packets: Hello packets are used to establish and maintain connections; The database describes the network topology database of the packet initialization router; When some information in the database is found to be out of date, the router sends a link state request packet to request the neighboring stations to provide updated information; Routers use link state update packets to actively spread their own link state database or respond to link state request packets; Since OSPF runs directly in the IP layer, the protocol itself should provide a confirmation mechanism, and the link state reply message is a link state update message.

Compared with other protocols, OSPF has many advantages. OSPF supports various authentication mechanisms (such as simple password authentication and MD5 encryption authentication). ) and allow different systems or regions to adopt different authentication mechanisms. Provide load balancing function. If it is calculated that there are multiple routes with the same cost to the destination station, the OSPF router will evenly distribute the traffic to these routes and send packets along these routes. In the autonomous system, it can be divided into several areas, and each area calculates the shortest path according to its own topological structure, which reduces the workload of OSPF routing. OSPF is a dynamic adaptive protocol, which can quickly respond to the change of network topology, make corresponding adjustments, provide a shorter convergence period, and make the routing table stable as soon as possible. Compared with other routing protocols, OSPF only needs the least traffic in the process of dealing with network topology changes. OSPF provides a point-to-multipoint interface and supports CIDR (Typeless Inter-domain Routing) addresses.

The disadvantage of OSPF is that the protocol itself is huge and complex, which is more difficult to implement than RIP.

3.BGP protocol

RFC 177 1 introduces the latest version of BGP-4 in detail. BGP is used to realize the exchange of network reachable information between AS, and the whole exchange process needs to be realized on the basis of reliable transmission connection. This has many advantages. BGP can hand over all error control functions to the transport protocol, which itself becomes much simpler. BGP uses TCP as its transport protocol, and the default port number is 179. Compared with EGP, BGP has many differences, and its most important innovation is that it adopts the concept of path vector and supports CIDR technology. Path vector records the list of all AS on the route, which can effectively detect and avoid possible loop problems in complex topology. With the support of CIDR, the number of routing table entries is reduced, which accelerates the routing speed and reduces the routing information that needs to be exchanged between routers. In addition, once BGP has established a peer-to-peer relationship with other BGP routers, it only exchanges the entire routing table in the initial initialization process, and then only when its own routing table changes, BGP will generate an update message and send it to other routers, and the message only contains those changed routes, which not only reduces the calculation amount of routers, but also saves the bandwidth occupied by BGP.

There are four types of BGP packets: open packets are used to establish connections; Update packets are used to announce reachable routes and cancel invalid routes; Periodically sending survival packets to ensure the validity of the connection; When an error is detected, a notification packet is sent.

4.IGRP protocol

Interior gateway routing protocol (IGRP) is a routing protocol that provides routing function in autonomous system (AS). In the mid-1980s, the most commonly used internal routing protocol was the Routing Information Protocol (RIP). Although RIP is very useful to realize the routing of small and medium-sized interconnected networks of the same type, its limitations are becoming more and more obvious with the continuous development of the network. The practicality of Cisco router and the powerful function of IGRP make many small Internet organizations adopt IGRP instead of RIP. As early as 1990s, Cisco introduced the enhanced IGRP, which further improved the operational efficiency of IGRP.

IGRP is a distance vector interior gateway protocol (IGP). Distance vector routing protocol uses mathematical distance standard to calculate path size, that is, distance vector. Distance vector routing protocol is usually opposite to link-state routing protocol, mainly in that distance vector routing protocol sends local connection information to all nodes in the Internet.

For greater flexibility, IGRP supports multi-path routing services. In cyclic mode, two lines with the same bandwidth can run a single communication stream. If one line fails to transmit, the system will automatically switch to another line. Multipath can be a multipath line with different standards but still working. For example, the priority of one line is three times that of another line (that is, three levels lower than the standard), which means that this path can be used three times. Only paths that meet a certain optimal path range or are within the tolerance range can be used as multipaths. Variance is another value that a network administrator can set.

5.EIGRP protocol

Enhanced interior gateway routing protocol (EIGRP) is an enhanced version of the IGRP protocol. IGRP is a interior gateway routing protocol provided by Cisco for TCP/IP and OSI Internet services. It is regarded as an internal gateway protocol, but as an external gateway protocol for intra-domain routing, it has not been widely used.

The main differences between enhanced IGRP and other routing protocols include fast convergence, subnet mask support, local update and multi-network layer protocols. Routers that implement enhanced IGRP store all neighbor routing tables so that they can quickly use various backup routes. If there is no suitable path, the enhanced IGRP will query its neighbors to obtain the required path. The enhanced IGRP query will not be terminated until a suitable path is found, otherwise it will continue.

EIGRP protocol aggregates all EIGRP routes with arbitrary mask length, thus reducing the transmission of routing information and saving bandwidth. In addition, EIGRP protocol can be configured to support route aggregation on bit boundary routers of any interface.

Enhanced IGRP will not be updated regularly. On the contrary, when the path metric changes, the enhanced IGRP only sends partial updates. The transmission of local update information will be automatically restricted, so only those routers that need information will update. Based on the above two performances, the bandwidth loss of enhanced IGRP is much smaller than that of IGRP.

6.ES-IS and IS-IS protocols

In the ISO specification, the router IS IS (Intermediate System) and the host is ES (Terminal System). The protocol that provides communication between IS and es (router and host) is ES-IS; The protocol that provides communication between IS and IS (routers and routers) is also a routing protocol, which is called IS-IS.

IS-IS protocol belongs to OSI model. In the network layer, it is divided into two sub-layers: the subnet independent layer, which shields the link state on the subnet independent layer and provides a transparent working environment for the upper layer. Function: to receive and send PDUs from connected networks, to be responsible for sending and receiving Hello PDU, to discover neighbors and to establish and maintain link relations; Responsible for handing over IP and IS-IS PDU to their respective processes for processing. Features: Because it is responsible for handling underground links, it determines what network type is supported by IS-IS routing protocol. Broadcast and point-to-point two types. Use the show clns IS-neighbors command to view the neighbor table: Circuit ID: IS an interface, and its ID is only 8 bits long, which is used to determine IS. If this interface is connected to a broadcast network, its circuit ID will become the system ID+ circuit ID of the DR connected to the multicast network. LAN ID: system ID+ circuit ID, that is, an ID generated and distributed by DR, which is used to represent the characteristics of router neighbors.

In IS-IS, the choice of DR router: the priority of the interface, but these priorities are divided into L 1 and L2. If the priority is zero, the router has no right to conduct DR election. If the priorities are the same, select according to the system ID, and the highest one becomes the system ID.

Different from OSPF, in the broadcast network, the IS-IS router will form an adjacent relationship with all neighbors, not just with the DR; Without the concept of BDR, if a DR fails, it will be reselected in this area; In addition, the DR of IS-IS routing protocol is not constant. If a router with higher priority or higher SystemID joins, it will cause the whole area to re-select DR and flood the information notified by LSP message again.