Routing-static routing and dynamic routing

Routing overview-static routing and dynamic routing

Routing: The process of forwarding from the source host to the target host.

table of Contents

Routing overview-static routing and dynamic routing

Routing table formation

Routing protocol classification:

Static routing, default routing, floating routing:

Static routing

Static routing configuration

Default route

Floating routing

Dynamic routing

Features:

metric

convergence:

classification:

RIP: Distance Vector Routing Protocol

Features:

Comparison of two versions of RIP:

Split horizon

The RIP protocol will form a routing loop. Split horizon is needed to prevent the formation of loops. The effect of split horizon is:

OSPF: Link State Routing Protocol

Seven states:

Establishment of neighbor relationship:


Routing table formation

The routing table is the collection of routing entries maintained in the router, which is statically added and dynamically learned. The router makes the route selection based on the routing table.

  1. Directly connected network segment-configure IP address, port UP state, form a direct route
  2. Non-directly connected routing ---- static routing or dynamic routing is required to write these network segments and how to forward them into the routing table.

Routing protocol classification

Static routing- manually configured by the administrator, one-way, lack of flexibility.

Dynamic routing-router automatically learns routing

In LAN--IGP (Interior Gateway Routing Protocol)—RIPV1, RIPV2, EIGRP (DV) distance vector routing protocol—OSPF, ISIS (LS) link state routing protocol

Internet-EGP (External Gateway Routing Protocol)-BGPV4 (Version 4)

Static routing, default routing, floating routing

Static routing

Manually configured by the administrator, one-way, lack of flexibility.

Static routing configuration

The format is as follows:

Ip route-static destination network segment subnet mask next hop (the next hop is the entry address of the next device) For example:

【huawei】ip route-static 192.168.10.0 255.255.255.0 192.168.12.1

192.168.10.0 refers to the destination network segment, 255.255.255.0 is the subnet mask, and 192.168.12.1 is the import of the next router

Default route

When the router cannot find the route entry of the target network in the routing table, the router request is forwarded to the default route interface, and the default route is generally configured in the stub network.

Default route configuration

E.g:

[Huawei] ip route-static 0.0.0.0 0.0.0.0 192.168.12.1
0.0.0.0 refers to the destination network segment, 0.0.0.0 is the subnet mask, and 192.168.12.1 is the import of the next router

Floating routing

Static route backup

E.g:

【huawei】ip route-static 192.168.10.0 24 192.168.12.1

【huawei】ip route-static 192.168.10.0 24 192.168.21.1 preference 70

When configuring the route, do not enter the following preference, why the default is 60, and the route prefers the smaller value.

Dynamic routing

Dynamic routing means that the router can automatically establish its own routing table, and can adjust it in a timely manner according to the changes in the actual situation (according to the specific protocol)

Features:

  1. Automatic learning based on topology changes
  2. Reduced management tasks
  3. Occupies network bandwidth

metric

Hop count, bandwidth, load, delay, reliability, cost

The router will use the metric to determine the optimal routing path

convergence:

In the process of making all routing tables reach a consistent state, static routing and dynamic routing are complementary to each other.

classification:

Distance vector routing protocol: (mainly based on the number of hops) Legend routing, tell one by one. Route RIP IGRP (Cisco Proprietary Protocol) based on the number of routers that pass from the source network to the target network

Link state routing protocol: (commonly used primary protocol) signaling routing, one superimposed on one, comprehensively considering the conditions of each path from the source network to the target network to select the routing OSPF and IS-IS

RIP: Distance Vector Routing Protocol

Features

  1. Regular update time is 30s
  2. neighbor
  3. Full routing table update, V1 version broadcast update V2 version multicast update
  4. The metric is the number of hops, the maximum number of hops is 15 hops, and the 16th hop is unreachable.

RIP two-generation version comparison

 

Split horizon

The RIP protocol will form a routing loop. Split horizon is needed to prevent the formation of loops. The effect of split horizon is:

The routing information learned from an interface, this part is no longer sent out from this interface

At the same time, it can also reduce the link bandwidth resources occupied by routing update information.

OSPF: Link State Routing Protocol

The metric is cost, cost=10 to the 8th power divided by bandwidth.

The shortest path is calculated based on the cost specified by the interface

Seven states :

 

Neighborhood establishment

(1) Down: The initial state of the neighbor state machine, which refers to the time when the He11o message from the other party is not received in the past Dead-Interval time or OSPF is not started.

(1-2) Attempt: Only applicable to NBMA type interfaces. When in this state, it periodically sends HELLO messages to those manually configured neighbors.

(2) Init: This state indicates that the neighbor's HELLO message has been received, but the neighbor listed in the message does not contain my Router ID (the other party did not receive the HELLO message from me).

(3) 2-Way: This state means that both parties have received the HELLO message from the opposite end and established a neighbor relationship. In broadcast and NBMA type networks, two routers whose interface status is DROther will stay in this state.

In other cases, the state machine will continue to enter the advanced state.

(4) ExStart: In this state, the router and its neighbors exchange DD messages (the message does not contain actual content, only some flag bits) to determine the master/slave relationship when sending. The main purpose of establishing the master/slave relationship is to ensure orderly transmission in the subsequent DD message exchange.

(5) Exchange: The router uses DD packets to describe the local LSDB and sends it to neighbors. (6) Loading: The router sends an LSR message to the neighbor to request the other party's DD message.

(7) Ful1: In this state, all the LSAs in the LSDB of the neighboring router are present in the local router. That is, the router and its neighbor have established an adjacency (adjacency) state.

Guess you like

Origin blog.csdn.net/Alen686/article/details/112170677