Module 14: Routing Concepts
Directly Connected Networks:
Added to the routing table when a local interface is configured with an IP address and subnet mask (prefix length) and is active (up and up).
Static routes -
Added to the routing table when a route is manually configured.
Dynamic routing protocols -
Added to the routing table when routing protocols dynamically learn about the remote network.
L -
Identifies the address assigned to a router interface.
Drop the Packet - No Match in Routing Table
If there is no match between the destination IP address and a prefix in the routing table, and if there is no default route, the packet will be dropped.
The source for each route in the routing table is identified by a code. Common codes include the following:
L C S O * - This route is a candidate for a default route.
Static routes are commonly used in the following scenarios:
- As a default route forwarding packets to a service provider - For routes outside the routing domain and not learned by the dynamic routing protocol - When the network administrator wants to explicitly define the path for a specific network - For routing between stub networks
Forward the Packet to a Next-Hop Router
- If the route entry indicates that the destination IP address is on a remote network, meaning a device on network that is not directly connected. The packet must be forwarded to the next-hop router. The next-hop address is indicated in the route entry. - If the forwarding router and the next-hop router are on an Ethernet network, a similar process (ARP and ICMPv6 Neighbor Discovery) will occur for determining the destination MAC address of the packet as described previously. The difference is that the router will search for the IP address of the next-hop router in its ARP table or neighbor cache, instead of the destination IP address of the packet.
Forward the Packet to a Device on a Directly Connected Network
- If the route entry indicates that the egress interface is a directly connected network, the packet can be forwarded directly to the destination device. Typically this is an Ethernet LAN. - To encapsulate the packet in the Ethernet frame, the router needs to determine the destination MAC address associated with the destination IP address of the packet. The process varies based on whether the packet is an IPv4 or IPv6 packet.
Dynamic routing protocols are commonly used in the following scenarios:
- In networks consisting of more than just a few routers - When a change in the network topology requires the network to automatically determine another path - For scalability. As the network grows, the dynamic routing protocol automatically learns about any new networks.
Algorithm -
An algorithm is a finite list of steps used to accomplish a task. Routing protocols use algorithms for facilitating routing information and for the best path determination.
Fast Switching:
Another, older packet forwarding mechanism which was the successor to process switching. Fast switching uses a fast-switching cache to store next-hop information. When a packet arrives on an interface, it is forwarded to the control plane where the CPU searches for a match in the fast-switching cache. If it is not there, it is process-switched and forwarded to the exit interface. The flow information for the packet is then stored in the fast-switching cache. If another packet going to the same destination arrives on an interface, the next-hop information in the cache is re-used without CPU intervention.
The main components of dynamic routing protocols include the following:
Data structures Routing protocol messages Algorithm
A routing table contains a list of routes to known networks (prefixes and prefix lengths). The source of this information is derived from the following:
Directly connected networks Static routes Dynamic routing protocols
A routing protocol is a set of processes, algorithms, and messages that are used to exchange routing information and populate the routing table with the choice of best paths. The purpose of dynamic routing protocols includes the following:
Discovery of remote networks Maintaining up-to-date routing information Choosing the best path to destination networks Ability to find a new best path if the current path is no longer available
After a router has determined the best path, it could do the following:
Forward the Packet to a Device on a Directly Connected Network Forward the Packet to a Next-Hop Router Drop the Packet - No Match in Routing Table
C -
Identifies a directly connected network
O -
Identifies a dynamically learned network from another router using the OSPF routing protocol.
S -
Identifies a static route created to reach a specific network.
Remote Networks:
Networks that are not directly connected to the router.
Routers support the following three packet forwarding mechanisms:
Process switching Fast switching Cisco Express Forwarding (CEF)
Static routing has three primary uses:
Providing ease of routing table maintenance in smaller networks that are not expected to grow significantly. Routing to and from stub networks. A stub network is a network accessed by a single route, and the router has only one neighbor. Using a single default route to represent a path to any network that does not have a more specific match with another route in the routing table. Default routes are used to send traffic to any destination beyond the next upstream router.
Data structures -
Routing protocols typically use tables or databases for their operations. This information is kept in RAM.
Routing protocol messages -
Routing protocols use various types of messages to discover neighboring routers, exchange routing information, and other tasks to learn and maintain accurate information about the network.
Default Route:
Specifies a next-hop router to use when the routing table does not contain a specific route that matches the destination IP address. The default route can be entered manually as a static route, or learned automatically from a dynamic routing protocol.
Routers learn about remote networks in two ways:
Static routes and default routes
Cisco Express Forwarding (CEF):
The most recent and default Cisco IOS packet-forwarding mechanism. CEF builds a Forwarding Information Base (FIB), and an adjacency table. The table entries are not packet-triggered like fast switching but change-triggered, such as when something changes in the network topology. When a network has converged, the FIB and adjacency tables contain all the information that a router would have to consider when forwarding a packet.
Route timestamp -
This identifies how much time has passed since the route was learned.
Route source -
This identifies how the route was learned.
Next-hop -
This identifies the IP address of the next router to which the packet would be forwarded.
Destination network (prefix and prefix length) -
This identifies the address of the remote network.
Exit interface -
This identifies the egress interface to use for outgoing packets to reach their final destination.
Administrative distance -
This identifies the trustworthiness of the route source. Lower values indicate preferred route source.
Metric -
This identifies the value assigned to reach the remote network. Lower values indicate preferred routes.
* -
This route is a candidate for a default route.
A default route has a /0 prefix length. This means that no bits need to match the destination IP address for this route entry to be used. If there are no routes with a match longer than 0 bits, the default route is used to forward the packet. The default route is sometimes referred to as a gateway of last resort.
True
Static and dynamic routing are not mutually exclusive. Rather, most networks use a combination of dynamic routing protocols and static routes.
True
The primary responsibility of the packet forwarding function is to encapsulate packets in the appropriate data link frame type for the outgoing interface.
True
Process Switching:
When a packet arrives on an interface, it is forwarded to the control plane where the CPU matches the destination address with an entry in its routing table, and then determines the exit interface and forwards the packet.
The best path in the routing table is also known as the ...
longest match