Static routing principle and configuration study notes sharing

1. Features of static routing:

(1) Static routing fixes the forwarding of the path, so the router’s routing selection is controlled, which saves network bandwidth and reduces additional expenses;
(2) Static routing is one-way, it only sets the forwarding from this routing device to The path that the target goes out;
(3) Static routing is inflexible, and manual configuration changes are required when the network sends changes.

2. Static routing configuration

2.1. Common commands for configuring static routing

Configure routing interface IP and mask:
ip address IP address subnet mask
such as: ip address 192.168.1.1 255.255.255.0

Configure static route: ip route target network target network subnet mask next router interface ip address/outlet
(Note: the target network here refers to an address segment, not an IP address)
such as: 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.2. The static routing configuration experiment is as follows:


Configure static routing so that each PC can communicate normally

View routing table for analysis

The experimental topology is shown in the figure:
Insert picture description here

Configuration commands for each setting:
① Configure IP for the corresponding interface on the router AR1, and configure static routes to the target network 192.168.3.0/24 and 192.168.4.0/24. The specific commands are configured as follows
Insert picture description hereInsert picture description here

② Configure the IP for the corresponding interface on the router AR2, and configure the static route to the target network 192.168.1.0/24, the specific command configuration is as follows
Insert picture description here
Insert picture description here

③ Configure the corresponding IP address, gateway and subnet mask on PC1, PC2, and PC3 (partially omitted, the same applies)
Insert picture description here

The gateway of the PC in the figure is the IP address of the GE0/0/0 interface GE0/0/0 of the PC connected to the router AR1
④ Test the connectivity with PC1, PC2, and PC3 (partially omitted, the same applies)
Insert picture description here

⑤ Check the routing table of router AR1, as shown in the figure:
Insert picture description here

From the points “1” and “2” in the figure, it can be seen that the router is directly connected to the network segments 192.168.1.0/24 and 192.168.2.0/24;
from the points “3” and “4” in the figure, it can be seen that the router exists to reach the target network 192.168.3.0/ 24. The static route entry of 192.168.4.0/24 is successfully configured.
Destination/Mask (destination network/mask): IP packet destination network/subnet mask
NextHop (next hop): refers to the next forwarding router address, that is, where the data packet is forwarded to

⑥ Check the routing table of router AR2, as shown in the figure:
Insert picture description here

From the position “1” in the figure, it can be seen that there is a static route entry to 192.168.1.0/24 in the routing table. The configuration is successful
. From the positions “2”, “3”, and “4” in the figure, it can be seen that the router is directly connected to the network segment 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, and for dynamic routing, see next issue!

Thinking small question:
Can static routing and static routing be used in combination?


Guess you like

Origin blog.51cto.com/14841124/2660416