Sunday, May 1, 2011

Configuring default route forwarding

Configuring default route forwarding 
 6.1.4 
This page will show students how to configure default static routes.
Default routes are used to route packets with destinations that do not match any of the other routes in the routing table. Routers are typically configured with a default route for Internet-bound traffic, since it is often impractical and unnecessary to maintain routes to all networks in the Internet. A default route is actually a special static route that uses this format:
ip route 0.0.0.0 0.0.0.0 [next-hop-address | outgoing interface ]
The 0.0.0.0 mask, when logically ANDed to the destination IP address of the packet to be routed, will always yield the network 0.0.0.0. If the packet does not match a more specific route in the routing table, it will be routed to the 0.0.0.0 network.
Use the following steps to configure default routes:
Step 1 Enter global configuration mode.
Step 2 Type the ip route command with 0.0.0.0 for the prefix and 0.0.0.0 for the mask. The address option for the default route can be either the local router interface that connects to the outside networks or the IP address of the next-hop router.
Step 3 Exit global configuration mode.
Step 4 Use the copy running-config startup-config command to save the active configuration to NVRAM.
On the previous page, static routes were configured on Hoboken to access networks 172.16.1.0 on Sterling and 172.16.5.0 on Waycross. It should now be possible to route packets to both of these networks from Hoboken. However, Sterling and Waycross will not know how to return packets to any network that is not directly connected. A static route could be configured on Sterling and Waycross for each of these destination networks. This would not be a scalable solution on a larger network.
Sterling connects to all networks that are not directly connected through interface Serial 0. Waycross has only one connection to all non-directly connected networks. This is through interface Serial 1. A default route on Sterling and Waycross will be used to route all packets that are destined for networks that are not directly connected.  
In the Lab Activity, students will configure a default static route.
The next page will show students how to verify static route configurations.

Configuring static routes

Configuring static routes 
6.1.3
This page lists the steps used to configure static routes and gives an example of a simple network for which static routes might be configured.
Use the following steps to configure static routes:
Step 1 Determine all desired prefixes, masks, and addresses. The address can be either a local interface or a next hop address that leads to the desired destination.
Step 2 Enter global configuration mode.
Step 3 Type the ip route command with a prefix and mask followed by the corresponding address from Step 1. The administrative distance is optional.
Step 4 Repeat Step 3 for all the destination networks that were defined in Step 1.
Step 5 Exit global configuration mode.
Step 6 Use the copy running-config startup-config command to save the active configuration to NVRAM.
The example network is a simple three-router configuration. Hoboken must be configured so that it can reach the 172.16.1.0 network and the 172.16.5.0 network. Both of these networks have a subnet mask of 255.255.255.0.
Packets that have a destination network of 172.16.1.0 need to be routed to Sterling and packets that have a destination address of 172.16.5.0 need to be routed to Waycross. Static routes can be configured to accomplish this task.
Both static routes will first be configured to use a local interface as the gateway to the destination networks. Since the administrative distance was not specified, it will default to 1 when the route is installed in the routing table.
The same two static routes can also be configured with a next-hop address as their gateway. The first route to the 172.16.1.0 network has a gateway of 172.16.2.1. The second route to the 172.16.5.0 network has a gateway of 172.16.4.2. Since the administrative distance was not specified, it defaults to 1.
The Lab Activity will help students learn how to configure static routes.
The next page will explain how default routes are configured.

Static route operation

Static route operation 
6.1.2
This page will explain how static routes operate and how they are created.
Static route operations can be divided into these three parts:
  • Network administrator configures the route
  • Router installs the route in the routing table
  • The static route is used to route packets.
An administrator must use the ip route command to manually configure a static route. The correct syntax for the ip route command is shown in Figure .
In Figures and , the network administrator of the Hoboken router needs to configure a static route to the 172.16.1.0/24 and 172.16.5.0/24 networks on the other routers. The administrator could enter either of two commands to accomplish this objective. The method in Figure specifies the outgoing interface. The method in Figure specifies the next-hop IP address of the adjacent router. Either of the commands will install a static route in the routing table of Hoboken.
The administrative distance is an optional parameter that indicates the reliability of a route. A lower value for the administrative distance indicates a more reliable route. A route with a lower administrative distance will be installed before a similar route with a higher administrative distance. The default administrative distance when using a static route is 1. In the routing table, it will show the static route with the outgoing interface option as being directly connected. This is sometimes confusing, since a true directly connected route has an administrative distance of 0. To verify the administrative distance of a particular route, use the show ip routeaddress command, where the ip address of the particular route is inserted for the address option. If an administrative distance other than the default is desired, a value between 0 and 255 is entered after the next-hop or outgoing interface as follows:
waycross(config)#ip route 172.16.3.0 255.255.255.0 172.16.4.1 130
If the router cannot reach the outgoing interface that is being used in a route, the route will not be installed in the routing table. This means if that interface is down, the route will not be placed in the routing table.
Sometimes static routes are used for backup purposes. A static route can be configured on a router that will only be used when the dynamically learned route has failed. To use a static route as a backup, set a higher administrative distance than the dynamic routing protocol.
The Lab Activities will show students how static routes are created and used to troubleshoot networks.
The next page will teach students how to configure static routes.