[Dry goods] A summary of the necessary knowledge points of routing protocols for net workers, easy to understand and easy to use!

[Warm reminder] Need information or need to enter the group to communicate to the bottom

Introduction to routing protocols
In the Internet world, there are complex LANs and wide area networks. However, no matter how complex the network structure is, it is also necessary to send data to the target host through a reasonable route. And it is the routing control module that determines this route.

Routers must first configure routing data to forward data. Usually, static routing or dynamic routing can be set according to the size of the network. Static routing is easy to configure, has low system requirements, and is suitable for small-scale networks with simple and stable topologies. The disadvantage is that it cannot automatically adapt to changes in the network topology and requires manual intervention. The dynamic routing protocol has its own routing algorithm, which can automatically adapt to changes in the network topology, and is suitable for networks with a certain number of Layer 3 devices. The disadvantage is that the configuration requires higher requirements for users, higher requirements for the system than static routing, and will occupy a certain amount of network resources.

Common routing protocols
Common dynamic routing protocols include RIP, OSPF, IS-IS, IGRP, EIGRP, BGP, etc. RIP, OSPF, IS-IS, IGRP, EIGRP are interior gateway protocols (IGP), which are suitable for the operation of a single ISP's unified routing protocol. Generally, a network operated by an ISP is located in an AS (autonomous system) and has a unified ASnumber (Autonomous system number). BGP is a routing protocol between autonomous systems. It is an external gateway protocol. It is mostly used on the Internet to exchange routing information between different operators. In the internal networks of some large enterprises, the BGP routing protocol is sometimes used. . The following introduces the characteristics of various routing protocols.

One, RIP routing protocol

RIP is short for Routing Information Protocol. It is a relatively simple interior gateway protocol IGP (Interior Gateway Protocol), which is mainly used in small-scale networks, such as campus networks and regional networks with simpler structures. For more complex environments and large networks, RIP is generally not used.

RIP is a protocol based on the Distance-Vector algorithm. It exchanges routing information through UDP packets and uses a port number of 520.

RIP uses the hop count (HopCount) to measure the distance to the destination address, which is called the metric value. In RIP, by default, the number of hops from a router to the network directly connected to it is 0, the number of hops from a network reachable through a router is 1, and the rest can be deduced by analogy. In other words, the metric value is equal to the number of routers from the local network to the destination network. To limit the convergence time, RIP specifies that the metric value is an integer between 0 and 15. The number of hops greater than or equal to 16 is defined as infinity, that is, the destination network or host is unreachable. Due to this limitation, it is impossible for RIP to be used in large networks.

To improve performance and prevent routing loops, RIP supports Split Horizon and Poison Reverse functions.

Because the implementation of RIP is relatively simple, it is much easier to configure, maintain and manage than OSPF and IS-IS, so it is still widely used in actual networking.

There are two versions of RIP: RIP V1 and RIP V2.

1. RIPV1 is a classful routing protocol (Classful Routing Protocol), which only supports the release of protocol messages in broadcast mode. The RIP-1 protocol message does not carry mask information. It can only identify the routes of natural network segments such as A, B, and C. Therefore, RIP-1 cannot support route aggregation, nor does it support discrete subnets (Discontiguous Subnets). ).

2. RIPV2 is a Classless Routing Protocol. Compared with RIP-1, it has the following advantages:
1) Supports external routing tags (Route Tag), which allows flexible routing based on tags in routing strategies control.
2) The message carries mask information and supports route aggregation and CIDR (Classless Inter-Domain Routing).
3) Support to specify the next hop, and the optimal next hop address can be selected on the broadcast network.
4) Support the use of multicast to send update messages, only RIP-2 routers can receive protocol messages, reducing resource consumption.
5) Support the verification of protocol messages, and provide two methods of plain text verification and MD5 verification to enhance security.

Two, OSPF routing protocol

OSPF (Open Shortest PathFirst) is an interior gateway protocol based on link status developed by the IETF. Currently, OSPF Version 2 (RFC2328) is used for the IPv4 protocol; OSPF Version 3 (RFC2740) is used for the IPv6 protocol.

The characteristics of OSPF are as follows:
1. Wide application range: Support large-scale networks, up to hundreds of routers.
2. Support mask: Since the OSPF message carries mask information, the OSPF protocol is not restricted by the natural mask and provides good support for VLSM.
3. Fast convergence: Send an update message immediately after the topology of the network changes, so that this change can be synchronized in the autonomous system.
4. No self-loop: Since OSPF uses the shortest path tree algorithm to calculate routes based on the collected link status, it is guaranteed from the algorithm itself that no self-loop route will be generated.
5. Area division: Allows the autonomous system network to be divided into areas for management, and the routing information transmitted between areas is further abstracted, thereby reducing the occupied network bandwidth.
6. Equal-cost routing: Support multiple equal-cost routes to the same destination address.
7. Routing classification: 4 different types of routing are used. In order of preference, they are: intra-area routing, inter-area routing, type 1 external routing, and type 2 external routing.
8. Support verification: Support message verification based on area and interface to ensure the security of message interaction.
9. Multicast sending: On certain types of links, protocol messages are sent with multicast addresses to reduce interference to other devices.

The working principle of OSPF is as follows:Insert picture description here

Three, IS-IS routing protocol

IS-IS (Intermediate System-to-Intermediate System) was originally a dynamic routing protocol designed by the International Organization for Standardization (ISO) for its connectionless network protocol CLNP (Connection Less Network Protocol).

In order to provide routing support for IP, the IETF has expanded and modified IS-IS in RFC1195 so that it can be used in both TCP/IP and OSI environments. It is called Integrated IS-IS (Integrated IS-IS or Dual IS). -IS).

IS-IS belongs to the Interior Gateway Protocol (IGP) and is used inside the autonomous system. IS-IS is a link state protocol that uses the Shortest Path First (SPF) algorithm for route calculation, and has many similarities with the OSPF protocol.

Four, IGRP routing protocol

The IGRP protocol is the abbreviation of "Interior Gateway Routing Protool", which was independently developed by Cisco in the 1980s and belongs to Cisco's proprietary protocol. IGRP, like RIP, belongs to the distance vector routing protocol, so it has similarities in many aspects. For example, IGRP is also a periodic broadcast routing table, and there is also a maximum number of hops (the default is 100 hops. If it reaches or exceeds 100 hops, the target network is considered unavailable. Up to). The biggest feature of IGRP is that it uses a mixed metric value, while considering the bandwidth, delay, load, MTU, and reliability of the link to calculate the metric value of the route, unlike other IGP protocols that simply consider a certain aspect. Calculate the metric value. At present, IGRP has been replaced by the EIGRP protocol independently developed by Cisco. CiscoIOS (Internetwork Operating System) with version number 12.3 and above does not support this protocol. Nowadays, there are rare networks running IGRP protocol.

Five, EIGRP routing protocol

EIGRP Due to various flaws and deficiencies of the IGRP protocol, Cisco developed the EIGRP protocol (Enhanced Interior Gateway Routing Protocol) to replace the IGRP protocol. EIGRP is an advanced distance vector routing protocol (also known as a hybrid routing protocol), which inherits the hybrid metric value of IGRP. The biggest feature is the introduction of non-equivalent load balancing technology and extremely fast convergence speed. The EIGRP protocol is widely deployed in the Cisco device network environment.

Six, BGP routing protocol

BGP is the abbreviation of "Border Gateway Protocol (Border Gateway Protocol)", which handles routing between ISPs. BGP is an exterior gateway protocol (EGP), which is different from interior gateway protocols (IGP) such as OSPF and RIP. Its focus is not on discovering and calculating routes, but on controlling the propagation of routes and selecting the best route. The BGP protocol has the following

Features:
1. BGP uses TCP as its transport layer protocol (listening port number is 179), which improves the reliability of the protocol.
2. BGP performs route selection between domains, which requires very high protocol stability. Therefore, the high reliability of the TCP protocol is used to ensure the stability of the BGP protocol.
3. The BGP peers must be logically connected and have TCP connections. The destination port number is 179, and the local port number is arbitrary.
4. BGP supports CIDR for classless inter-domain routing.
5. When routing is updated, BGP only sends updated routes, which greatly reduces the bandwidth occupied by BGP to propagate routes and is suitable for propagating a large amount of routing information on the Internet.
6. BGP is a distance vector routing protocol, which avoids loops by design.
7. Between ASs: BGP marks the passing AS by carrying AS path information, and routes with local AS numbers will be discarded, thus avoiding loops between domains.
8. Inside the AS: The routes learned by BGP in the AS will not be forwarded in the AS, avoiding loops in the AS.
9. BGP provides a wealth of routing strategies, which can achieve flexible filtering and selection of routes.
10. BGP provides a mechanism to prevent route oscillations, which effectively improves the stability of the Internet network.
11. BGP is easy to expand and can adapt to the new development of the network.

BGP and AS number:Insert picture description here

In order to better help you learn and understand network engineers, and other related content, I deliberately organize all the materials systematically, and share them here for free. Necessary materials for network workers, including:
Huawei Certification Mind Map (Superfine); Huawei Certification Essential Knowledge Documents (pdf); Collection of Essential Net Worker Knowledge Documents; Essential Toolkit for Net Workers; Essential Net Workers Prepare experiment package;
necessary video interview package for net workers. …… There is a lot of information, I won’t list all of them, so I’ll write here first. If you have any questions, please leave a message and discuss private messages~

Guess you like

Origin blog.csdn.net/ZYJY2020/article/details/112987684