When creating static routes, you can specify both the outbound interface and next hop. Alternatively, you can specify only the outbound interface or next hop, depending on the interface type:
•For point-to-point (P2P) interfaces, specify the outbound interface.
•For non-broadcast multiple access (NBMA) interfaces, specify the next hop.
•For broadcast interfaces (for example, Ethernet interfaces), specify the next hop.
Specifying the same preference value for static routes to the same destination implements load balancing among these routes. Conversely, specifying different preference values for static routes to the same destination implements route backup among the routes.
Setting the destination IP address and mask to all 0s configures the default IPv4 static route. By default, no default IPv4 static route is configured.
Procedure
1.Run:
system-view
The system view is displayed.
2.Configure IPv4 static routes.
•For public networks, run:
ip route-static ip-address { mask | mask-length } { nexthop-address | interface-type interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-address } [ preference preference | tag tag ] * [ description text ]
An IPv4 static route is configured on the public network.
•For VPN instances, run:
ip route-static vpn-instance vpn-source-name destination-address { mask | mask-length } { nexthop-address [ public ] | interface-type interface-number [ nexthop-address ] | vpn-instance vpn-instance-name nexthop-address } [ preference preference | tag tag ] * [ description text ]
An IPv4 static route is configured on a VPN instance.