Static Routing can be divided into the following three parts:
1. The network administrator configures static routes.
2. Add the configured static route to the routing table.
3. the router uses this static route to forward data packets.
Configuration instance:
In the figure, all devices forward data packets to the internet through the vro whose host name is it168. Vro168 it168 uses a serial line to connect to the DNS server provided by the ISP. This is a very common example. In the network environment I have seen, most of them use a static route to connect to the WAN. The configuration steps are as follows:
In global mode, type the command ip route [destination address] [subnet mask] [network egress/Next Hop address]
Configure the serial interface S0 as the exit for Static Routing: 168 (config) # ip route 202.100.96.123 255.255.255.0 s0
Configure the next hop address 202.100.96.68 as the static route egress: it168 (config) # ip route 202.100.96.123 255.255.255.0 202.100.96.68
By default, the egress of the static route is higher than the next hop address of s0, but we recommend that the Network Manager use the next hop address as the static route, if S0 is disabled, the static route will not be loaded to the routing table.
Another function of Static Routing is to back up routing options for dynamic routing. If we have configured dynamic routing, We can manually change the priority of Static Routing, when a problem occurs in a dynamic route, the router can select this static route to forward data packets.
- Static route settings and related commands
- Detailed explanation of Huawei router static route configuration commands