Saturday, October 22, 2011

Determining the route next hop / Determining the last routing update

Determining the route next hop
9.1.7 Routing algorithms fill routing tables with a variety of information. Destination next hop associations determine the best path and which router to forward the packet to next. This router represents the next hop on the way to the final destination. 
When a router receives an incoming packet, it checks the destination address and attempts to associate this address with a next hop. 
Determining the last routing update 
9.1.8 
  • show ip route 
  • show ip route address 
  • show ip protocols 
  • show ip rip database 

Determining the route metric

Determining the route metric 
9.1.6 Routing protocols use metrics to determine the best route to a destination. The metric is a value that measures the desirability of a route. Some routing protocols use only one factor to calculate a metric. For example, RIP v1 uses hop count as the only factor to determine the metric of a route. Other protocols base their metric on hop count, bandwidth, delay, load, reliability, and cost. 
Each routing algorithm interprets what is best in its own way. The algorithm generates a number, called the metric value, for each path through the network. A lower metric number generally indicates a better path.
Factors such as bandwidth and delay are static because they remain the same for each interface until the router is reconfigured or the network is redesigned. Factors such as load and reliability are dynamic because they are calculated for each interface in real-time by the router.  
The more factors that make up a metric, the greater the flexibility to tailor network operations to meet specific needs. By default, IGRP uses the static factors bandwidth and delay to calculate a metric value. These two factors can be configured manually to control which routes a router chooses. IGRP may also be configured to include the dynamic factors of load and reliability in the metric calculation. By using dynamic factors, IGRP routers can make decisions based on current conditions. If a link becomes heavily loaded or unreliable, IGRP will increase the metric of routes using that link. An alternate route with a lower metric would be used instead.
IGRP calculates the metric by adding the weighted values of different characteristics of the link to the network in question. Here is the formula for calculating the composite metric for IGRP:
Metric = [K1 * Bandwidth + (K2 * Bandwidth)/(256-load) + K3*Delay] * [K5/(reliability + K4)]
The default constant values are K1 = K3 = 1 and K2 = K4 = K5 = 0.
If K5 = 0, the [K5/(reliability + K4)] term is not used. Given the default values for K1 through K5, the composite metric calculation used by IGRP reduces to Metric = Bandwidth + Delay.
The Interactive Media Activity will help students understand route metrics.
The next page explains how a next hop is chosen.

Determining the route administrative distance

Determining the route administrative distance 
9.1.5 A router can discover routes through dynamic routing protocols or routes can be configured manually. After the routes are discovered or configured, the router must choose the best routes to other networks.
The router uses the administrative distance of each route to determine the best path to a particular destination. The administrative distance is a number that measures the trustworthiness of the source of the route information. The lower the administrative distance, the more trustworthy the source.
Different routing protocols have different default administrative distances. The path with the lowest administrative distance is installed in the routing table.
In the Lab Activity, students will analyze two routing protocols.
The next page will discuss route metrics.

Friday, October 14, 2011

Determining L2 and L3 addresses

Determining L2 and L3 addresses 
9.1.4 This page will explain how Layer 2 and Layer 3 addresses are used to route a packet.
For a packet to get from the source to the destination, both Layer 2 and Layer 3 addresses are used. Figure explains the process that occurs as a packet moves through a network.
The Layer 3 address is used to route the packet from the source network to the destination network. The source and destination IP addresses remain the same. The MAC address changes at each hop or router. A data link layer address is necessary because delivery within the network is determined by the address in the Layer 2 frame header.
The Interactive Media Activity will help students recognize physical and logical addresses.
The next page will describe the administrative distance of a route.

Determining route source and destination

Determining route source and destination 
9.1.3 This page will explain how a router chooses a path for packet delivery.
For traffic going through a network cloud, path determination occurs at the network layer. The path determination function enables a router to evaluate the available paths to a destination and to establish the preferred handling of a packet. Routing services use network topology information to evaluate network paths. This information can be configured by the network administrator or collected through dynamic processes that are used in the network.
The network layer provides best-effort, end-to-end, packet delivery across interconnected networks. The network layer uses the IP routing table to send packets from the source network to the destination network. After the router determines which path to use, it forwards the packet from one interface to the interface or port that leads to the destination.  
The next page will discuss Layer 2 and Layer 3 addresses.

Determining the gateway of last resort

Determining the gateway of last resort 
9.1.2 This page will teach students how to configure a gateway of last resort and why it is used.
It is not feasible, or even desirable, for a router to maintain routes to every possible destination. Instead, routers keep a default route, or a gateway of last resort. Default routes are used when the router is unable to match a destination network with a more specific entry in the routing table. The router uses this default route to reach the gateway of last resort in an effort to forward the packet. 
A key scalability feature is that default routes keep routing tables as lean as possible. They make it possible for routers to forward packets destined to any Internet host without having to maintain a table entry for every Internet network. Default routes can be statically entered by an administrator or dynamically learned using a routing protocol.
Default routing begins with the administrator. Before routers can dynamically exchange information, an administrator must configure at least one router with a default route. Depending on the desired results, an administrator can use either of the following commands to statically configure a default route: 
ip default-network
or
ip route 0.0.0.0 0.0.0.0
The ip default-network command is used to establish a default route in networks that use dynamic routing protocols. The ip default-network command is classful, which means if the router has a route to the subnet indicated by this command, it installs the route to the major net. The ip default-network command must be issued using the major net, in order to flag the candidate default route.
The global command ip default-network 192.168.17.0 defines the Class C network 192.168.17.0 as the destination path for packets that have no routing table entries. Any routes to a network configured with ip default-network will be flagged as a candidate for the default route. 
The ip route 0.0.0.0/0 command can also be used to configure a default route. 
Router(config)#ip route prefix mask {address 1 interface } [distance ]
After configuring a default route or default network, the command show ip route will show the following: 
Gateway of last resort is 172.16.1.2 to network 0.0.0.0
The Lab Activity will show students how to configure a gateway of last resort.
The next page explains how path determination occurs.

Examining the Routing Table / The show ip route command

Examining the Routing Table 
The show ip route command 
9.1.1 This page will explain the functions of the show ip route command.
One of the primary functions of a router is to determine the best path to a given destination. A router learns paths, which are also called routes, from the configurations entered by an administrator or from other routers through routing protocols. Routers store this routing information in routing tables using on-board random access memory (RAM). A routing table contains a list of the best available routes. Routers use the routing table to make packet forwarding decisions.
The show ip route command displays the contents of the IP routing table. This table contains entries for all known networks and subnetworks, as well as a code that indicates how that information was learned. The following are some additional commands that can be used with the show ip route command:
  • show ip route connected
  • show ip routeaddress
  • show ip route rip
  • show ip route igrp
  • show ip route static
A routing table maps network prefixes to an outbound interface. When RTA receives a packet destined for 192.168.4.46, it looks for the prefix 192.168.4.0/24 in its table. RTA then forwards the packet out interface Ethernet0 based on the routing table entry. If RTA receives a packet destined for 10.3.21.5, it sends that packet out Serial 0/0.
The example routing table shows four routes for directly connected networks. These routes are labeled with a C. RTA drops any packet destined for a network that is not listed in the routing table. The routing table for RTA will have to include more routes before it can forward to other destinations. There are two ways to add new routes:
  • Static routing - An administrator manually defines routes to one or more destination networks.
  • Dynamic routing - Routers follow rules defined by a routing protocol to exchange routing information and independently select the best path.
Administratively defined routes are said to be static because they do not change until a network administrator manually programs the changes. Routes learned from other routers are dynamic because they change automatically as directly connected routers update each other with new information. Each method has fundamental advantages and disadvantages. 
The Lab Activity will allow students to use the show ip route command to examine routing tables.
The next page will define a gateway of last resort.