Comprehensive Analysis of router introduction, working methods and protocols

Source: Internet
Author: User

Routing Principle

When one host in the IP subnet sends an IP group to another host in the same IP subnet, it will directly send the IP Group to the network, and the other party will receive it. To send the IP address to a host on the internet, you need to select a router that can reach the destination subnet and send the IP address group to the router. The router is responsible for sending the IP address group to the destination. If such a router is not found, the host sends the IP Group to a router called "default gateway. The "Default Gateway" is a configuration parameter on each host. It is the IP address that is connected to a vro port on the same network.

When forwarding an IP group, the router selects an appropriate port based on the network number of the destination IP address of the IP Group and sends the IP Group out. Like a host, the vro must determine whether the port is connected to the destination subnet. If yes, the group is directly sent to the network through the port. Otherwise, the next vro must be selected to send the group. The router also has its default gateway to send IP groups that do not know where to send them. In this way, the router correctly forwards IP groups that know how to transfer them, and the IP groups that do not know are sent to the "Default Gateway" router. In this way, the IP Group will eventually be sent to the destination, IP groups that cannot be sent to the destination are discarded by the network.

Currently, all TCP/IP networks are interconnected through routers. The Internet is an international network that connects thousands of IP subnets through routers. This type of network is called a router-based network, forming a "inter-network" with a vro as a node ". In "inter-network", routers are not only responsible for forwarding IP groups, but also responsible for communicating with other routers to jointly determine the routing selection and maintenance route table of "inter-network.

The routing action includes two basic items: path finding and forwarding. The routing algorithm is used to determine the optimal path to the destination. Because different routing protocols and routing algorithms are involved, it is relatively complicated. To determine the optimal route, the routing algorithm must start and maintain the route table containing route information. The routing information varies depending on the routing algorithm used.

The routing algorithm fills in different information collected in the routing table, and tells the router about the relationship between the destination network and the next stop (nexthop) according to the route table. The router interconnection information is updated, and the route table is updated and maintained so that the network topology changes are correctly reflected. The optimal path is determined by the router according to the measurement. This is the routing protocol (routing protocol), such as the routing information protocol (RIP), Open Shortest Path First protocol (OSPF), and Border Gateway protocol (BGP.

Forward refers to the information transfer group along the best path for path searching. The router first searches in the routing table and determines whether the router knows how to send the group to the next site (router or host). If the router does not know how to send the group, the router usually discards the group; otherwise, the group is sent to the next site based on the corresponding table items in the route table. If the destination network is directly connected to the vro, The vro sends the group directly to the corresponding port. This is the router protocol ).

The routing forwarding protocol and the routing selection protocol are mutually compatible and independent. The former uses the route table maintained by the latter, and the latter uses the functions provided by the former to publish the Routing Protocol Data grouping. The routing protocols mentioned below, unless otherwise stated, refer to the routing selection protocols, which are also common habits.

Routing Protocol

Typical routing methods include Static Routing and dynamic routing.

Static Routing is a fixed route table set in a vro. The static route does not change unless the network administrator intervene. Because Static Routing cannot reflect network changes, it is generally used in a network with a small network size and a fixed topology. Static Routing is simple, efficient, and reliable. Among all the routes, static routes have the highest priority. When a dynamic route conflicts with a static route, the static route prevails.

Dynamic routing is a process in which routers in the network communicate with each other, transmit route information, and update the router table using the received route information. It can adapt to network structure changes in real time. If the route update information indicates that the network has changed, the route selection software recalculates the route and sends new route update information. This information is transmitted through various networks, causing routers to restart their routing algorithms and update their route tables to dynamically reflect network topology changes. Dynamic Routing is suitable for networks with large networks and complex network topologies. Of course, various dynamic routing protocols occupy network bandwidth and CPU resources to varying degrees.

Static Routing and dynamic routing have their own characteristics and applicability. Therefore, dynamic routing is usually used as a supplement to Static Routing in the network. When a group is used to find the route in the vro, The vro first searches for the static route. If yes, the vro。 forwards the route according to the corresponding static route forwarding group. Otherwise, the vro searches for the dynamic route.

Dynamic Routing Protocols are divided into internal gateway protocol (IGP) and external Gateway Protocol (EGP) based on whether they are used in an autonomous domain ). The Autonomous Region refers to a network with a unified management organization and a unified routing policy. The routing protocol used in the autonomous region is called the internal gateway protocol, which is commonly used with RIP and OSPF. The external gateway protocol is mainly used for routing selection between multiple autonomous regions, common are BGP and BGP-4. The following is a brief introduction.

1. RIP Routing Protocol

The RIP Protocol was originally designed for the Xerox parc common protocol of the Xerox network system and is a common Routing Protocol in the Internet. RIP uses the distance vector algorithm, that is, the router selects routes based on distance, which is also called the distance vector protocol. The router collects all the different paths that can reach the destination, and stores the path information about the minimum number of sites to reach each destination. All other information except the Optimal Path to the destination is discarded. At the same time, the router also uses the RIP Protocol to notify neighboring routers of the route information. In this way, the correct routing information gradually spreads to the entire network.

RIP is widely used, which is simple, reliable, and easy to configure. However, RIP is only applicable to a small homogeneous network, because it allows a maximum of 15 sites, any more than 15 sites are marked as inaccessible. In addition, the route information broadcast once every 30 s by RIP is also one of the important reasons for the network broadcast storm.

2. OSPF Routing Protocol

In the middle of 1980s, RIP was unable to adapt to the interconnection of large-scale heterogeneous networks, resulting in the generation of 0 SPF. It is a routing protocol developed for the IP network by the Internal Gateway Protocol Working Group of the inter-network engineering task organization (1ETF.

0SPF is a link-based routing protocol. Each router needs to send link status broadcast information to all other routers in the same management domain. All interface information, all measurements, and other variables are included in the OSPF link status broadcast. A vro with 0SPF must first collect the relevant link status information and calculate the shortest path to each node based on certain algorithms. The Distance Vector-based routing protocol only sends route update information to its neighboring routers.

Different from RIP, OSPF divides an autonomous domain into zones. There are two types of routes to be selected: when the source and destination are in the same zone, the intra-zone routes are used; when the source and destination are in different regions, the interval routing is used. This greatly reduces network overhead and increases Network stability. When a vro in a region fails, the normal operation of vrouters in other regions in the autonomous region is not affected, which also facilitates network management and maintenance.

3, BGP and BGP-4 Routing Protocol

BGP is an external gateway protocol designed for TCP/IP Internet. It 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 accessibility information with BGP of other autonomous domains. Each autonomous domain can run different internal gateway protocols. The bgp update information includes the paired information of the network number/autonomous domain path. The autonomous domain path includes the autonomous domain string that must pass through a specific network. The update information is transmitted over TCP to ensure the transmission reliability.

BGP is still evolving to meet the growing needs of the Internet. In the latest BGp4, similar routes can also be merged into one route.

4. Priority of route table items

In a vro, you can configure static routes and one or more dynamic routes at the same time. The route tables they maintain are provided to the forwarder, but the table items in these route tables may conflict. This conflict can be solved by configuring the priority of each route table. Generally, static routes have the highest priority by default. When other route table items conflict with them, they are all forwarded by static routes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.