IP Routing Basics
In the network, the router selects an appropriate path according to the destination address of the received message, and forwards the message to the next router.
The last router in the path is responsible for forwarding the packet to the destination host.
Routing is the path information during packet forwarding, which is used to guide packet forwarding.
According to different routing destinations, routing can be divided into:
1. Network segment routing:
The destination is a network segment, and the length of the subnet mask is less than 32 bits.
2. Host routing:
The destination is the host, and the subnet mask length is 32 bits.
3. Direct Routing:
The destination network is directly connected to the router.
4. Indirect routing:
The destination network is not directly connected to the router.
RIB (Routing Information Base) routing information base is a database for centralized management of routing information, including routing table information and routing peripheral information (routing iteration information, routing sharing information, and routing extension information, etc.).
The router optimizes the routing table, sends the optimal route to the FIB (Forwarding Information Base) forwarding information base table, and guides packet forwarding through the FIB table.
The routes discovered by various routing protocols are saved in the routing table, which are usually divided into the following three categories according to different sources:
1. Direct route:
Routes discovered by link layer protocols are also called interface routes.
2. Static routing:
Routes manually configured by network administrators. Static routing is easy to configure and has low system requirements. It is suitable for small networks with simple and stable topology.
Its disadvantage is that whenever the network topology changes, it needs to be manually reconfigured and cannot be automatically adapted.
3. Dynamic routing:
Routes discovered by routing protocols.
Each forwarding item in the FIB table indicates which physical interface of the router the message to reach a certain subnet or a certain host should be sent through, so that it can reach the next router on the path.
It can be transmitted to the destination host in the directly connected network without going through other routers.
used to identify the destination address or destination network of the IP packet .
B. Mask :
Together with the destination address, it identifies the address of the network segment where the destination host or router is located.
The address of the network segment where the destination host or router is located can be obtained by “logic ANDing” the destination address and the netmask.
For example: the destination address is 220.127.116.11 and the mask is 255.255.0.0. The address of the network segment where the host or router is located is 18.104.22.168 .
The mask is composed of several consecutive “1”, which can be represented by dotted decimal notation, or by the number of consecutive “1” in the mask.
C. Pre :
For the same destination, there may be several routes with different next hops. These different routes may be discovered by different routing protocols, or may be manually configured static routes.
The route with higher priority (smaller value) will become the current optimal route.
D. Cost :
When multiple routes to the same destination have the same priority, the route with the smaller metric value of the route will become the current optimal route.
E. NextHop :
next hop address
The IP address of the next hop for this route.
F. Interface :
The outgoing interface
indicates which interface of the router the IP packet will be forwarded from.
3. Classification of routing protocols
Routing protocols have their own routing algorithms, which can automatically adapt to changes in network topology and are suitable for network topologies with a certain scale.
The disadvantage is that the configuration is more complicated, the system requirements are higher than the static routing, and it occupies certain network resources.
The classification of routing protocols can adopt the following different criteria.
1. According to the scope of action
A. IGP (Interior Gateway Protocol): It runs within an autonomous system. Common IGP protocols include RIP, OSPF, and IS-IS.
B. EGP (Exterior Gateway Protocol): It runs between different autonomous systems. BGP is the most commonly used EGP at present.
2. According to the algorithm used
A. Distance-Vector protocol: including RIP and BGP. Among them, BGP is also called Path-Vector.
B. Link-State Protocol: including OSPF and IS-IS.
3. According to the type of destination address
A. Unicast routing protocols: including RIP, OSPF, BGP and IS-IS.
B. Multicast routing protocols: including PIM-SM, PIM-DM, etc.
4. According to the IP protocol version
A. IPv4 routing protocol: including RIP, OSPF, BGP and IS-IS.
B. IPv6 routing protocols: including RIPng, OSPFv3, IPv6 BGP and IPv6 IS-IS, etc.
4. Routing backup
Using route backup can improve the reliability of the network.
Users can configure multiple routes to the same destination according to the actual situation, among which the route with the highest priority is used as the main route, and the remaining routes with lower priorities are used as backup routes.
Normally, routers use the main route to forward data.
1. Link failure
When a link fails, the primary route becomes inactive, and the router selects the backup route with the highest priority to forward data. In this way, the switching from the main route to the backup route is realized.
2. Link recovery
When the link returns to normal, the router reselects the route.
Since the primary route has the highest priority, the router chooses the primary route to send data. This is the switch from the backup route to the main route.
5. Routing iteration
1. Iterative process
If the next hop information carried by the route is not directly reachable, it is necessary to find the directly connected outbound interface to the next hop.
The route iteration process is the process of finding the directly connected outbound interface through the next hop information of the route.
Route iteration information records and saves the results of route iteration, including the summary information of dependent routes, iteration path, iteration depth, etc.
ThinkMo CCNA Dump exam information exchange group：
CCNA/CCNP/CCIE telegram study group：https://t.me/ccie_ei_lab
ThinkMo CCNA 200-301 Tutorial VIP Exclusive：
The complete EVE_NG file, free learning PDF and PPT that can be used directly, as well as video explaining the technical points are all here!