0.0.0.0. You can run the display ip routing-table command to check whether the default route
is configured.
If the destination address of a packet does not match any entry in the routing table, the switch
uses the default route to forward this packet. If no default route exists and the destination address
of the packet does not match any entry in the routing table, the packet is discarded. An Internet
Control Message Protocol (ICMP) packet is then sent back to the originating host, informing
that the destination host or network is unreachable.
1.3 Configuring an IPv4 Static Route
On an IPv4 network, you can accurately control route selection by configuring IPv4 static routes.
1.3.1 Establishing the Configuration Task
Before configuring an IPv4 static route, familiarize yourself with the applicable environment,
complete the pre-configuration tasks, and obtain the data required for the configuration. This
will help you complete the configuration task quickly and accurately.
Applicable Environment
When configuring an IPv4 static route, note the following:
lDestination address and mask
In the ip route-static command, the IPv4 destination address is in dotted decimal notation,
and the mask can be either expressed in dotted decimal notation or replaced by the mask
length (namely, the number of consecutive 1s in the mask).
lOutbound interface and next-hop address
When configuring a static route, you can specify either interface-type interface-number or
nexthop-address according to the actual situation.
In practice, every routing entry requires a next-hop address. When sending a packet, the
switch first searches for the matched route in the routing table according to the destination
address.
In some cases, for example, the link layer is encapsulated with PPP, you can also specify
outbound interfaces when configuring the switch even if the remote address is not known.
In this manner, it is unnecessary to modify the switch configuration when the remote
address changes.
lOther attributes
Setting different preferences for static routes helps flexibly apply routing policies. For
example, when configuring multiple routes to the same destination address, you can set the
same preference for these routes to implement load balancing. You can also set different
preferences to implement routing redundancy.
When the ip route-static command is run to configure a static route, if the destination
address and the mask are set to all 0s (0.0.0.0 0.0.0.0), it indicates that a default route is
configured.
Pre-configuration Tasks
Before configuring an IPv4 static route, complete the following task:
Quidway S2700 Series Ethernet Switches
Configuration Guide - IP Routing 1 IP Static Route Configuration
Issue 01 (2011-07-15) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
3