By configuring Static Routing, You can manually specify the path to access a certain network. The network structure is relatively simple, generally, Static Routing is used when the path to a network is unique.
Task |
Command |
Create a static route |
Ip routePrefix mask {address | interface}[Distance][TagTag] [Permanent] |
Prefix: destination network to be reached
Mask: Subnet mask
Address: the IP address of the next hop, that is, the port address of the adjacent router.
Interface: Local Network interface
Distance: Management distance (optional)
Tag: optional tag values)
Permanent: specify that the route will not be removed even if the port is switched off.
The next hop address for access 192.1.0.64/26 is set to 192.200.10.6 on Router1, that is, when a destination address belongs to the network range of 192.1.0.64/26, route it to an adjacent router with the address 192.200.10.6. On Router3, the next hop address for access to the 192.1.0.128/26 and 192.200.10.4/30 networks is set to 192.1.0.65. Because the Serial 0 address on Router1 is 192.200.10.5 and 192.200.10.4/30 belong to a directly connected network, there is a path to access 192.200.10.4/30, so you do not need to add a static route on router1.
Router1:
Ip route 192.1.0.64 route 192 192.200.10.6
Router3:
Ip route 192.1.0.128 255.255.255.192 192.1.0.65
Ip route 192.200.10.4 route 255.252 192.1.0.65
At the same time, because Router3 is no longer connected to other routers except router Router2, you can also assign a default route to it to replace the above two static routes,
Ip route 0.0.0.0 0.0.0.0 192.1.0.65
That is, as long as the path to the specific destination address is not found in the routing table, the data is routed to the adjacent router with the address 192.1.0.65.
Related Articles]
- Static route settings and related commands
- Vro static route configuration command
- Technology sharing: publish static routes to OSPF