Have you really mastered the principles and configuration of static routing?

1. Static routing

Static routing is a fixed route manually configured by the user administrator in the router. Because it is manually configured, when the network topology or link status changes, we need to manually modify the relevant information in the routing table.

Characteristics of static routing:


(1) Static routing fixes the forwarding of the path, so it controls the routing selection of the router , saves network bandwidth, and reduces additional expenses;
(2) Static routing is one-way, and it only sets the routing device to forward to. The path for the target to go out;
(3) Static routing lacks flexibility, and manual configuration modifications are required when the network sends changes.

2. Configuration of static routing

(1) Common commands for configuring static routing

Configure routing interface IP and mask: ip address IP address subnet mask

For example: ip address 192.168.1.1 255.255.255.0

Configure static routing: ip route target network target network subnet mask next router interface ip address/exit

(Note: The target network here refers to an address segment, not an IP address)

For example: ip route 192.168.2.0 255.255.255.0 192.168.3.1 (g0/0/0)

View the routing table: display ip routing-table

(2) The static routing configuration experiment is as follows:

Configure static routes so that PCs can communicate normally

View the routing table for analysis

The experimental topology is shown in the figure:

Configuration commands for each device:

①Configure IP for the corresponding interface on router AR1, and configure static routes to the target networks 192.168.3.0/24 and 192.168.4.0/24. The specific command configuration is as follows

②Configure IP for the corresponding interface on router AR2, and configure a static route to the target network 192.168.1.0/24. The specific command configuration is as follows

③Configure the corresponding IP address, gateway and subnet mask on PC1, PC2, and PC3 (part of this is omitted, the same principle applies)

The gateway of the PC in the picture is the IP address of the interface GE0/0/0 of the PC connected to the router AR1.

④Test the connectivity with PC1, PC2, and PC3 (part of this is omitted, the same principle applies)

⑤View the routing table of router AR1, as shown in the figure:

From '1' and '2' in the figure, we can see that the router is directly connected to the network segments 192.168.1.0/24 and 192.168.2.0/24;

From '3' and '4' in the figure, we can see that the router has static routing entries reaching the target network 192.168.3.0/24 and 192.168.4.0/24, and the configuration is successful.

Destination/Mask (destination network/mask): IP packet destination network/subnet mask

NextHop: refers to the address of the next forwarding router, that is, where the data packet is forwarded.

⑥View the routing table of router AR2, as shown in the figure:

From the '1' in the figure, we can see that there is a static route entry to 192.168.1.0/24 in the routing table, and the configuration is successful.

From '2', '3', and '4' in the figure, we can see that the router is directly connected to the network segments 192.168.2.0/24, 192.168.3.0/24, and 192.168.4.0/24;

⑦ The experiment was successful.

That’s it for static routing, see dynamic routing in the next issue!

Thoughts and questions:

Can static routing and static routing be used together?

Guess you like

Origin blog.csdn.net/weixin_53678904/article/details/132714520