2-4
Configuration procedure
When only one interface of the device is interconnected with another network segment, you can
implement network communication by configuring either a static route or default route.
1) Perform the following configurations on the device.
# Approach 1: Configure static routes on Switch A.
<SwitchA> system-view
[SwitchA] ip route-static 1.1.3.0 255.255.255.0 1.1.2.2
[SwitchA] ip route-static 1.1.4.0 255.255.255.0 1.1.2.2
[SwitchA] ip route-static 1.1.5.0 255.255.255.0 1.1.2.2
# Approach 2: Configure a static route on Switch A.
<SwitchA> system-view
[SwitchA] ip route-static 0.0.0.0 0.0.0.0 1.1.2.2
# Approach 1: Configure static routes on Switch B.
<SwitchB> system-view
[SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.3.1
[SwitchB] ip route-static 1.1.5.0 255.255.255.0 1.1.3.1
[SwitchB] ip route-static 1.1.1.0 255.255.255.0 1.1.3.1
# Approach 2: Configure a static route on Switch B.
<SwitchB> system-view
[SwitchB] ip route-static 0.0.0.0 0.0.0.0 1.1.3.1
# Configure static routes on Switch C.
<SwitchC> system-view
[SwitchC] ip route-static 1.1.1.0 255.255.255.0 1.1.2.1
[SwitchC] ip route-static 1.1.4.0 255.255.255.0 1.1.3.2
2) Perform the following configurations on the host.
# Set the default gateway address of Host A to 1.1.5.1. Detailed configuration procedure is omitted.
# Set the default gateway address of Host B to 1.1.4.1. Detailed configuration procedure is omitted.
# Set the default gateway address of Host C to 1.1.1.1. Detailed configuration procedure is omitted.
Now, all the hosts and devices in the figure can communicate with each other.
Troubleshooting a Static Route
Symptom: The device is not configured with a dynamic routing protocol. Both the physical status and
the link layer protocol status of an interface are up, but IP packets cannot be forwarded on the interface.
Solution: Perform the following procedure.
1) Use the display ip routing-table protocol static command to view whether the corresponding
static route is correctly configured.
2) Use the display ip routing-table command to view whether the static route is valid.