15While configuring a static route, you can specify either the output interface or the next hop addressdepending on the specific occasion. For a NULL0 interface, if the output interface has already beenconfigured, there is no need to configure the next hop addressIn fact, all the route entries must have a next hop address. When forwarding a packet, a router firstsearches the routing table for the route to the destination address of the packet. The system can findthe corresponding link layer address and forward the packet only after the next hop address isspecified. The next hop address can not be a local interface IP address; otherwise, the routeconfiguration will not take effect.• Other attributes:You can configure different preferences for different static routes so that route management policiescan be applied more flexibly.Configuring a static routeConfiguration prerequisitesBefore configuring a static route, complete the following tasks:• Configure the physical parameters for related interfaces• Configure the link-layer attributes for related interfaces• Configure the IP addresses for related interfacesConfiguration procedureFollow these steps to configure a static route:To do… Use the command… Remarks1. Enter system view system-view —2. Configure a staticrouteip route-static dest-address { mask | mask-length } { next-hop-address | interface-typeinterface-number [ next-hop-address ] } [preference preference-value ] [ descriptiondescription-text ]RequiredBy default, preference for staticroutes is 60 and no descriptioninformation is configured.3. Configure thedefault preferencefor static routesip route-static default-preferencedefault-preference-valueOptional60 by default• When configuring a static route, the static route does not take effect if you specify the next hop address first andthen configure it as the IP address of a local interface.• If you do not specify the preference when configuring a static route, the default preference will be used.Reconfiguring the default preference applies only to newly created static routes.• If the destination IP address and mask are both configured as 0.0.0.0 with the ip route-static command, theroute is the default route.