The following uses an IPv4 static route as an example to describe the composition of a static route.
On the FW, you can run the ip route-static command to configure a static route, which consists of the following:
In the ip route-static command, the IPv4 address is expressed in dotted decimal notation, and the mask is expressed in dotted decimal notation or represented by the mask length (the number of consecutive 1s in the mask).
When configuring a static route, you can specify an outbound interface, a next-hop address, or both the outbound interface and the next hop-address as required.
Actually, each routing entry requires a next-hop address. Before sending a packet, a device needs to search its routing table for the route matching the destination address in the packet by using the longest match rule. The device can find the associated link layer address to forward the packet only after the next-hop address of the packet is specified.
When specifying an outbound interface, note the following:
After a DHCP client is configured on the outbound interface, the DHCP client obtains network parameters such as the IP address and gateway address of the outbound interface from the DHCP server. The device uses the gateway address of the outbound interface as the next-hop address.
When the next-hop address is not specified, if no DHCP client is configured on the outbound interface or the DHCP client is configured but the gateway address is not obtained, packet forwarding fails.
The number of equal-cost static routes that are actually delivered to the FIB table is restricted by the maximum number of equal-cost routes supported in the FIB table. The excess equal-cost static routes do not take effect.