Routing exchange: routing principle and static routing

IP routing protocol

Routing protocols are divided into two categories: static routing protocols and dynamic routing protocols.
Static routing: Set up a fixed routing table, including direct routing, manual configuration of static routing and default routing. It is generally used in a network with a small network scale and a fixed topology. Among all routing, static routing has the highest priority.
The dynamic routing protocol is a process in which routers in the network communicate with each other by running the routing protocol, transfer routing information, and use the received routing information to dynamically update the routing table. It is suitable for networks with large network scale and
complex topological structure.
According to whether it is used within an autonomous domain, dynamic routing protocols are divided into interior gateway protocols and exterior gateway protocols.
Internal Gateway Protocol: RIP, OSPF, IGRP, EIGRP, IS-IS
External Gateway Protocol: BGP

Dynamic routing protocols are divided into distance vector routing protocols and link state routing protocols from the perspective of algorithms.
The main features of distance vector routing protocol:

  1. The router only sends routing message information to neighbors.
  2. The router sends the updated complete routing information message to the neighbor.
  3. The router generates a routing table based on the received information message through calculation.
  4. Including RIP, IGRP, BGP

The main features of the link state routing protocol:

  1. Quickly respond to changes in the network and send triggered updates.
  2. When the link state changes, the device that detects the change creates an LSA (Link State Announcement), and transmits it to all neighbors by using a multicast address. Each neighbor makes a copy of the LSA and updates its link state database LSDB. Then forward it to other neighbors.
  3. Send periodic update (link status refresh), the interval is 30min
  4. Including OSPF, IS-IS.

EIGRP is the sum of distance vector routing protocol and link state routing protocol.

Classful routing protocol: There is no subnet mask information in the routing update information, indicating that it will strictly follow the classification of the network.
Classless routing protocol: Support the subnet mask information in the routing update information.
Features of classful routing protocol:

  1. The subnet mask information of the relevant network is not carried in the routing update broadcast.
  2. Automatically summarize the standard network categories at the network boundary.
  3. It is automatically assumed that the subnets of the same standard network in the network are always continuous.
  4. Including RIPv1 and IGRP.

Features of Classless Routing Protocol:

  1. The routing update broadcast contains the subnet mask information of the relevant network.
  2. Support variable length subnet mask.
  3. You can manually control whether to summarize at a network boundary.
  4. Including RIPv2, EIGRP, OSPF, IS-IS.

Features of the default route:

  1. 0.0.0.0/0 can match all ip addresses, which is the most inaccurate match. In the routing decision, the address is matched last. The envoy can make the final choice when there is no other best route.
  2. Default routing can be regarded as a special case of static routing.
  3. When all routing information can not find out how to forward the data packet, it will be forwarded according to the default routing information.
  4. A router can only specify one default route.

The range of various IP addresses:
A: 0.0.0.0~126.255.255.255 (large network)
B: 128.0.0.0~191.255.255.255 (medium network)
C: 192.0.0.0~223.255.255.255 (small network)
D: 240.0. 0.0~239.255.255.255 (multiple destination addresses)
E: 240.0.0.0~247.255.255.255 (reserved)

Special address
0.0.0.0: this host on this network
1.1.1.1: cable broadcast address
127.0.0.1~127.255.255.254: loopback test
network number.0: network address
network number.1: all hosts on the network number Broadcast

Private address : It can be used by any organization at will, Internet communication is not allowed, and it can only be used inside the LAN.
A: 10.0.0.0~10.255.255.255
B: 172.16.0.0~172.31.255.255
C: 192.168.0.0~192.168.255.255

Adding a subnet in the IP addressing system is: take a few digits from the host number part as the subnet number.
The result of the logical AND operation of two binary numbers is the network number
. The IP addresses of the two hosts and their subnet masks are the same. The result is that the two hosts are in the same subnet.

CIDR notation: 128.14.32.0/20, the first 20 bits are network address bits

The meaning of the first column of the routing table
C—direct connection
S—static route
S* —default route
R—RIP
B—BGP
D—internal EIGRP
EX—external EIGRP
O—OSPF
IA—OSPF ​​other areas
E1—self-made system outside OSPT routing type 1
E2—OSPF ​​routing type 2 outside the self-made system

The second column of the routing table : Network address The
third column of the routing table : [Administrative distance/cost] The
fourth column of the routing table : Next hop address

Administrative distance of commonly used routing protocols:
direct connection-0
static routing-1
EBGP-20
EIGRP-90
OSPF-110
RIP-120
external EIGRP-170
IBGP-200


Guess you like

Origin blog.csdn.net/weixin_43916678/article/details/104641740