Static routing is a manual configuration of routing information by a network administrator. When the topology of the network or the state of the link changes, the network administrator needs to manually modify the related static routing information in the routing table. Static routing controls the routing of Routers, saves network bandwidth and reduces overhead. Static routes allow you to specify broadcast content for a restricted section, and you can hide part of the network for security reasons.
The route in the following figure, PC1 the transmission of data is PC1->R1->R2->R3->PC2, but PC2 back to the packet when the line is PC2->R3->R1->PC1,
The graph above has three routers R1, R2, R3, and two client PC1, PC2, configured as follows:
1. The configuration of two clients is as follows:
PC1 configured as: ip:192.168.1.2
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1
PC2 configured as: ip:192.168.4.2
Subnet Mask: 255.255.255.0
Gateway: 192.168.4.1
2, three routers are configured to:
> Set the IP of the R1 three ports f0/0, F0/1, f1/0 and open its ports, then add the static routing table
router>en
Router#conf T
Enter configuration commands, one per line. End With cntl/z.
Router (config) #int f0/0
Router (config-if) #ip ad 192.168.1.1 255.255.255.0
Router (config-if) #no Shu
Router (config-if) #exi
Router (config) #int F0/1
Router (config-if) #ip ad 192.168.2.1 255.255.255.0
Router (config-if) #no Shu
Router (config-if) #exi
Router (config) #int f1/0
Router (config-if) #ip ad 192.168.5.1 255.255.255.0
Router (config-if) #no Shu
Router (config-if) #exi
Router (config) #ip rou 192.168.0.0 255.255.0.0 F0/1
> Set the IP of the R2 two ports f0/0, F0/1 and open its ports, then add the static routing table
router>en
Router#conf T
Enter configuration commands, one per line. End With cntl/z.
Router (config) #int f0/0
Router (config-if) #ip ad 192.168.2.2 255.255.255.0
Router (config-if) #no Shu
Router (config-if) #exi
Router (config) #int F0/1
Router (config-if) #ip ad 192.168.3.1 255.255.255.0
Router (config-if) #no Shu
Router (config-if) #exi
Router (config) #ip rou 192.168.4.0 255.255.255.0 F0/1
> Set the IP for the R3 three ports f0/0, F0/1, and f1/0 and open its ports, then add a static routing table
router>en
Router#conf T
Enter configuration commands, one per line. End With cntl/z.
Router (config) #int f0/0
Router (config-if) #ip ad 192.168.3.2 255.255.255.0
Router (config-if) #no Shu
Router (config-if) #exi
Router (config) #int F0/1
Router (config-if) #ip ad 192.168.4.1 255.255.255.0
Router (config-if) #no Shu
Router (config-if) #exi
Router (config) #int f1/0
Router (config-if) #ip ad 192.168.5.2 255.255.255.0
Router (config-if) #no Shu
Router (config-if) #exi
Router (config) #ip rou 192.168.1.0 255.255.255.0 f1/0
After the successful configuration, the use of PC1 to PC2 contract, the route for PC1->R1->R2->R3->PC2,
PC2 the route back to the package is: PC2->R3->R1->PC1