How to configure floating static routes on S series switches

If multiple static routes destined for the same IP address exist, you can specify different preferences for these routes. Routes with lower preferences are hidden in a routing table, which can be displayed using the display ip routing-table x.x.x.x verbose command (not the display ip routing-table command). The hidden routes are called floating static routes and are activated only when the preferred route becomes invalid.
On an S series switch, configure the preferences of static routes. The default value is 60, and a smaller value indicates a higher preference.
[HUAWEI]ip route-static 192.168.10.0 24 10.1.1.1 preference 50
[HUAWEI]ip route-static 192.168.10.0 24 10.2.2.1 preference 70
If the preferences of several static routes are different, the static route with the highest preference is in active state and is used to forward packets, while the other routes are in inactive state. When the route with the highest preference fails, the route with a secondary highest preference becomes active and takes over packet forwarding.

Scroll to top