< Home

Components of Static Routes

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:

Destination Address and Mask

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).

Outbound Interface and Next-Hop Address

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:

  • For a Point-to-Point (P2P) interface, the next-hop address is specified after you specify the outbound interface. That is, the address of the remote interface connected to this interface is the next-hop address.
  • Non-Broadcast Multiple-Access (NBMA) interfaces are applicable to Point-to-Multipoint (P2MP) networks. Therefore, IP routes and the mappings between IP addresses and link layer addresses are required. In this case, you need to configure next-hop addresses.
  • When configuring static routes, it is not recommended to specify the Ethernet interface or the virtual-template (VT) interface as the outbound interface. This is because an Ethernet interface is a broadcast interface and a VT interface can be associated with several virtual access (VA) interfaces. If the Ethernet interface or the VT interface is specified as the outbound interface, a unique next hop cannot be determined because multiple next hops exist. In actual applications, to specify a broadcast interface (such as an Ethernet interface) or a VT interface as the outbound interface, you are advised to specify the associated next-hop address.
  • When a Non Broadcast Multiple Access (NBMA) interface, broadcast interface (such as an Ethernet interface), or Virtual-template (VT) interface is specified as the outbound interface and the next-hop address is not specified, you can configure a DHCP client on the outbound interface to specify the next-hop address.

    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.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >