Chapter 12 Static Route Configuration
Confidential and Proprietary Information of ZTE CORPORATION 163
TABLE 203 CONFIG TERMINAL COMMAND
Command
Format
Command
Mode
Command Function
config
terminal
Exec Enters into global configuration
mode
Result: This enables to enter into global configuration mode.
2. To configure static route, use ip route <prefix> <net-
mask> {[<interface-number>] [<forwarding-address>]}
[<distance-metric>] [globle] [tag <tag>] command in
global configuration mode, as shown in
Table 204.
TABLE 204 STATIC ROUTE COMMAND
Command Format
Command
Mode
Command Function
ip route <prefix>
<net-mask>
{[<interface-number>]
[<forwarding-
address>]} [<distance-
metric>] [globle] [tag
<tag>]
global
config
This configures static
route.
Result: This sets static route.
Tag is a route label. Two static routes (with different next
hop IP addresses) to same destination network cannot have
the same tag value.
E
ND OF STEPS
Example: Figure 80 shows a simple network on which three
routers are interconnected.
FIGURE 80 STATIC ROUTE CONFIGURATION
R1 R2 R3
192.168.3.1/24
192.168.4.1/24
192.168.4.2/24
192.168.5.1/24
192.168.5.2/24
192.168.6.1/24
For R1 to access the network on R3, static route configuration is
as follows:
ZXR10_R1(config)#ip route 192.168.5.0 255.255.255.0 192.168.4.2
ZXR10_R1(config)#ip route 192.168.6.0 255.255.255.0 192.168.4.2
This can be seen from above configuration that a static route is
configured in global configuration mode and only one static route
can be configured at a time. After ip route command, remote
network, its subnet mask code and next IP address to the
remote network is configured.
In other words, for R1 to send a packet to network
192.168.5.0/24, this must give the packet to R2 with IP address
of 192.168.4.2, since R1 is directly connected to R2.