Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 Static Route Configuration 1-1 Static Route Overview1-1 Static Route 1-1 Default Route1-1 Application Environment of Static Routing 1-1 Configuring Static Route 1-2 Static Route Configuration Example 1-3
The term router in this document refers to both routers and Layer 3 switches.
Default Route
Without a default route, a packet matching no routing entry is discarded and an ICMP destination-unreachable packet is sent to the source. A default route is used to forward packets that match no entry in the routing table. It can be configured in either of the following two ways: The network administrator can configure a default route with both destination and mask being 0.0.0.0. The router forwards any packet whose destination address fails to match any entry in the routing table to the next hop of the default static route. Some dynamic routing protocols, such as OSPF, RIP and IS-IS, can also generate a default route. For example, an upstream router running OSPF can generate a default route and advertise it to other routers, which install the default route with the next hop being the upstream router.
While configuring a static route, specify both the destination IP address and mask in dotted decimal format. 2) Output interface and next hop address
1-1
While configuring a static route, you can specify either the output interface or the next hop address depending on the specific occasion. The next hop address can not be a local interfaces IP address; otherwise, the route configuration will not take effect. In fact, all the route entries must have a next hop address. When forwarding a packet, a router first searches the routing table for the route to the destination address of the packet. The system can find the corresponding link layer address and forward the packet only after the next hop address is specified. When specifying the output interface, note that: If the output interface is a Null 0 or loopback interface, there is no need to configure the next hop address. If the output interface is a point-to-point interface, there is no need to configure the next hop address. You need not change the configuration even if the peers address changes. For example, a PPP interface obtains the peers IP address through PPP negotiation, so you need only specify the output interface. If the output interface is an NBMA or P2MP interface, which support point-to-multipoint network, the IP address to link layer address mapping must be established. Therefore, it is recommended to configure both the next hop IP address and the output interface. You are not recommended to specify a broadcast interface (such as an Ethernet interface, virtual template, or VLAN interface) as the output interface, because a broadcast interface may have multiple next hops. If you have to do so, you need to specify the corresponding next hop for the output interface. 3) Other attributes
You can configure different priorities for different static routes so that route management policies can be applied more flexibly. For example, specifying the same priority for different routes to the same destination enables load sharing, while specifying different priorities for these routes enables route backup.
1-2
Table 1-1 describes the static route configuration items. Table 1-1 Static route configuration items
Item Destination Mask Next Hop Interface Remarks Type the destination IP address in dotted decimal notation Type the destination IP address mask Type the next hop IP address in dotted decimal notation Type the outbound interface Type the static route priority Priority The static route priority defaults to 60.
1-3
Configuration considerations
1) 2) 3) On Device A, configure a static route to Device B. On Device B, configure two static routes to Device A and Device C, respectively. On Device C, configure a static route to Device B.
Configuration procedure
1) Configure IP addresses of hosts and gateways. As shown in Figure 1-3, configure IP addresses of the hosts, and configure the default gateways of Host A, Host B and Host C as 1.1.2.3, 1.1.6.1 and 1.1.3.1, respectively. The configuration procedure is omitted. 2) 3) Configure IP address of the interfaces and security zones (omitted). Configure static routes.
# Configure a static route on Device A. Select Network > Routing Management > Static Routing from the navigation tree of Device A and click Add to perform the following configurations as shown in Figure 1-4. Figure 1-4 Configure a static route on Device A
Select 0.0.0.0 from the mask drop-down list. Type 1.1.4.2 as the nexthop. Click Apply. # Configure static routes on Device B. Select Network > Routing Management > Static Routing from the navigation tree of Device B and click Add. Type 1.1.2.0 as the destination IP address. Select 255.255.255.0 from the mask drop-down list. Type 1.1.4.1 as the nexthop. Click Apply. Click Add. Type 1.1.3.0 as the destination IP address. Select 255.255.255.0 from the mask drop-down list. Type 1.1.5.6 as the nexthop. Click Apply. # Configure a static route on Device C. Select Network > Routing Management > Static Routing from the navigation tree of Device C and click Add. Type 0.0.0.0 as the destination IP address. Select 0.0.0.0 from the mask drop-down list. Type 1.1.5.5 as the nexthop. Click Apply.
Configuration verification
# Ping Host A on Host B (suppose the host runs Windows XP).
C:\Documents and Settings\Administrator>ping 1.1.2.2
Reply from 1.1.2.2: bytes=32 time=1ms TTL=128 Reply from 1.1.2.2: bytes=32 time=1ms TTL=128 Reply from 1.1.2.2: bytes=32 time=1ms TTL=128 Reply from 1.1.2.2: bytes=32 time=1ms TTL=128 Ping statistics for 1.1.2.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 1ms, Maximum = 1ms, Average = 1ms
Tracing route to 1.1.2.2 over a maximum of 30 hops 1 2 <1 ms <1 ms <1 ms <1 ms <1 ms 1.1.6.1 <1 ms 1.1.4.1
1-5
1 ms
<1 ms
<1 ms 1.1.2.2
Trace complete.
1-6