A simple analysis of the establishment strategy and algorithm of routing table

Source: Internet
Author: User

Routing Table Concepts:

Routing (noun) -The path through which the packet is routed from the source address to the address , consisting of a series of routing nodes.

route (verb) --> A routed node is selected as the routing process to which a post is reported.

route node --> a host or router with Routing energy ,,

routing Table -- consisting of a number of routing entries, each indicating which packets to a network should be received and sent, with the last being the default route entry.

Routing Entries To each row in the routing table, each entry consists mainly of the destination network address, subnet mask, next hop address, send receive four parts, if the destination network address of the packet to be sent matches a row in the routing table, it is accepted to send to the next hop as specified.

The default route entry --> routing table, consisting mainly of the next hop address and the send receive two parts, is sent to the next hop according to the default route entry when the destination address does not match the other rows in the routing table.

in a Linux environment, you can view the routing table information through ifconfig and route, as shown in:

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/84/8B/wKioL1eUI3TSYXF_AACxmzUwdA0396.png "title=" 20160724094745.png "alt=" Wkiol1eui3tsyxf_aacxmzuwda0396.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/84/8B/wKiom1eUI4WxmBdKAAAl6aymvyM469.png "title=" Qq20160724094837.png "alt=" Wkiom1eui4wxmbdkaaal6aymvym469.png "/>

Build the algorithm:

The IP routing table requires an establishment process, which is the process of its initialization. When any router starts, it must first obtain an initial route table. Different network operating systems, the way to get the initial routing table, in general, there are three ways.

First, when the router system starts, reads a complete seek table from the external memory, the long memory uses, the system shuts down the current route table (may be refreshed), writes back to the external memory, for the next use.

Second, when the system starts, it only provides an empty table that is populated by executing explicit commands, such as commands in a batch file.

Third, when the system starts, from the network address directly connected to the router, a set of initial routes are deduced, of course, through the initial route can only access the host on the connected web.
Obviously, in either case, the initial routing table is always imperfect and needs to be replenished during continuous operation, which is the refresh of the routing table. RIP is used for the maintenance and refresh of the routing table, the route refresh algorithm in RIP protocol is the distance vector algorithm, it takes the route table initialization method is the third kind.

Each distance vector table entry consists of two parts: the best output line to reach the destination node, and the time or distance to reach the destination node, and each of the other routers in the communication subnet occupies a table entry in the table and is indexed as the table entry. Every once in a while, the router sends it to all neighbor nodes to the distance table for each destination node, and it also receives the distance table for each neighbor knot dots. This and so on, after a period of time can be the network of routers to obtain the distance vector information on each router unified up, so that each router only need to view the distance vector table can be a different source grouping to find an optimal route.

Routing algorithm:

routers use routing algorithms to find the best route to reach their destination. When the "best route" is said, the parameters to consider include such as the number of hops (packet packets in the network from one router or intermediate node to another node's trip), latency, and packet packet transmission communication time-consuming. There are two main routing algorithms for how routers collect the structure information of a network and analyze it to determine the best route:

The overall routing algorithm and the decentralized routing algorithm. With the decentralized routing algorithm, each router has only the information of the routers that are directly connected to it--without the information of each router in the network. These algorithms are also known as DV (distance vector) algorithms. With the overall routing algorithm, each router has all the information of all the other routers in the network and the traffic status of the network. These algorithms are also known as LS (link state) algorithms.

(a) Static routing algorithm

1.Dijkstra algorithm (Shortest path algorithm)

The Dijkstra (Dijkstra) algorithm is a typical single-source shortest path algorithm that calculates the shortest path of a node to all other nodes. The main feature is to extend from the center of the starting point to the outer layer until it expands to the end. Dijkstra algorithm is a very representative shortest path algorithm, in many professional courses as the basic content of the detailed introduction, such as data structure, graph theory, operations research and so on. Dijkstra general expressions usually have two ways, a permanent and temporary marking, one is the way of open, close table, where permanent and temporary marking is used. Note that the algorithm requires no negative weight loops in the graph.

2. Diffusion Law

No network information is required in advance; the router sends each packet received to all output lines except for the line that the packet arrives at. In the future there will be multiple groups of replicas arriving at the destination, the first to arrive, probably the "best" path.

3. Traffic-based routing algorithms

Considering both the topological structure and the network load, the average data flow between each pair of nodes is relatively stable and predictable, and the average packet delay can be obtained according to the network bandwidth and the average traffic, so the routing problem boils down to the routing algorithm which generates the least delay of the network, which is calculated in advance offline (off-line).

(ii) Dynamic routing algorithm

1. Distance Vector routing algorithm

The distance vector routing algorithm (Bellman-ford Routing algorithm), also called the Maximum Flow calculus (Ford-fulkersonalgorithm), is a distance vector protocol as an algorithm, such as RIP, BGP, ISO IDRP, NOVELL IPX. Routers using this algorithm must master the distance table (which is a one-dimensional arrangement-"a vector"), which tells the farthest and most recent distances of each node in the network. The information in the distance table is updated from moment to moment based on the change of the neighboring contact information. The amount of data in a table is equivalent to all the contacts in the network (except itself). The columns in this table represent the neighbors that are directly connected to it, and the rows represent all the destinations in the network. Each data includes a path and distance/or time to transmit packets to each destination on the network (we call this "cost"). The measure in that algorithm is the number of hops, the wait time, the number of outgoing packets, and so on. In the distance vector routing algorithm, the neighboring routers periodically exchange their own routing table backups. When the network topology changes, the routers will also notify each other in a timely manner about the change information.

2. Link state shortest path by priority algorithm SPF

Discover neighbor nodes, and learn their network addresses; measure the latency or overhead of each neighbor node; Create link-state groupings; distribution of link state groupings using diffusion method; calculates the shortest path to each other router.


This article is from the "July boreas" blog, please be sure to keep this source http://luminous.blog.51cto.com/10797288/1829273

A simple analysis of the establishment strategy and algorithm of routing table

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.