[Network basics] IP routing basics

table of Contents

  1. The role of the router
  2. Autonomous system
  3. LAN and broadcast domain
  4. Routing
  5. IP routing table
  6. Longest match principle
  7. Routing priority
  8. Route metric
  9. Router forwards packets

1. The role of the router

Forward messages from different networks to achieve communication between different networks

2. Autonomous system

A collection of routers managed by the same regulatory agency and using a unified routing strategy.

3. LAN and broadcast domain

  • Broadcast domain: a collection of all nodes that can receive broadcast messages
  • LAN: Local Area Network
    Router isolates broadcast domain

4. Routing

Routing information: It can be understood as a street sign on the highway, which guides where to go. When the
packet arrives at the destination, it is based on routing information. The router is responsible for selecting an optimal path for the packet and forwarding it.

5. IP routing table

Insert picture description here
The routing table contains the destination network that the router can reach. Packets that do not exist in the routing table of the destination network are discarded.

6. The longest match principle

If there are multiple routing entries in the routing table that match the destination network, the router will select the entry with the longest mask.
The longer the subnet mask, the more network bits, that is, the more accurate

7. Routing priority

Insert picture description here

8. Route metrics

Insert picture description here
If the router cannot use the priority to determine the optimal route, it uses the metric to determine the route that needs to be added to the routing table.
Some commonly used metrics are: hop count, bandwidth, delay, cost, load, reliability, etc.
The hop count refers to the number of routers that pass through to reach the destination.
Bandwidth refers to the capacity of the link, and the high-speed link overhead (metric value) is small.
The smaller the metric value, the higher the route; therefore, the route with metric = 1 + 1 = 2 in the figure is the optimal route to the destination, and its entry can be found in the routing table.

9. Router forwards data packets

Insert picture description here
After receiving a data packet, the router checks its destination IP address and then looks up the routing table. After finding the matching routing table entry, the router will forward the data packet according to the outgoing interface information and next hop information indicated by the table entry.

Published 30 original articles · won 9 · visited 1120

Guess you like

Origin blog.csdn.net/TKE_Yolanda/article/details/105525205
Recommended