
17
To do…
Use the command…
Remarks
View information of static routes
display ip routing-table
protocol
static
[
inactive
|
verbose
]
Delete all the static routes
delete static-routes all
Available In
system view
Static route configuration example
Basic static route configuration example
Network requirements
The IP addresses and masks of the switches and hosts are shown in Figure 2. Static routes are required for
interconnection between any two hosts.
Figure 2
Network diagram for static route configuration
Configuration procedure
1.
Configuring IP addresses for interfaces (omitted)
2.
Configuring static routes
Configure a default route on Switch A.
<SwitchA> system-view
[SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.4.2
Configure two static routes on Switch B.
<SwitchB> system-view
[SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.4.1
[SwitchB] ip route-static 1.1.3.0 255.255.255.0 1.1.5.6
Configure a default route on Switch C
<SwitchC> system-view