Module 14 Cisco
Module 14 Cisco
Path Determination
The primary functions of a router are to determine the best path to forward packets
based on the information in its routing table, and to forward packets toward their
destination. The best path in the routing table is also known as the longest match.
The longest match is the route in the routing table that has the greatest number of
far-left matching bits with the destination IP address of the packet. Directly connected
networks are networks that are configured on the active interfaces of a router. A
directly connected network is added to the routing table when an interface is
configured with an IP address and subnet mask (prefix length) and is active (up and
up). Routers learn about remote networks in two ways: static routes are added to the
routing table when a route is manually configured, and with dynamic routing
protocols. Using dynamic routing protocols such as EIGRP and OSPF, routes are
added to the routing table when routing protocols dynamically learn about the remote
network.
Packet Forwarding
After a router determines the correct path, it can forward the packet on a directly
connected network, it can forward the packet to a next-hop router, or it can drop the
packet. The primary responsibility of the packet forwarding function is to encapsulate
packets in the appropriate data link frame type for the outgoing interface. Routers
support three packet forwarding mechanisms: process switching, fast switching, and
CEF. The following steps describe the packet forwarding process:
1. The data link frame with an encapsulated IP packet arrives on the ingress
interface.
2. The router examines the destination IP address in the packet header and
consults its IP routing table.
3. The router finds the longest matching prefix in the routing table.
4. The router encapsulates the packet in a data link frame and forwards it out the
egress interface. The destination could be a device connected to the network
or a next-hop router.
5. However, if there is no matching route entry the packet is dropped.
section - Shows entire section that starts with the filtering expression
include - Includes all output lines that match the filtering expression
exclude - Excludes all output lines that match the filtering expression
begin - Shows all the output lines from a certain point, starting with the line
that matches the filtering expression
IP Routing Table
A routing table contains a list of routes known networks (prefixes and prefix lengths).
The source of this information is derived from directly connected networks, static
routes, and dynamic routing protocols. Common routing table codes include:
L - Identifies the address assigned to a router interface. This allows the router
to efficiently determine when it receives a packet for the interface instead of
being forwarded.
C - Identifies a directly connected network.
S - Identifies a static route created to reach a specific network.
O - Identifies a dynamically learned network from another router using the
OSPF routing protocol.
* - This route is a candidate for a default route.
Every router makes its decision alone, based on the information it has in its own
routing table. The information in a routing table of one router does not necessarily
match the routing table of another router. Routing information about a path does not
provide return routing information. Routing table entries include the route source,
destination network, AD, metric, next-hop, route timestamp, and exit interface. To
learn about remote networks, a router must have at least one active interface
configured with an IP address and subnet mask (prefix length), called a directly
connected network. Static routes are manually configured and define an explicit path
between two networking devices. Dynamic routing protocols can discover a network,
maintain routing tables, select a best path, and automatically discover a new best
path if the topology changes. The 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. A default route can be either a static route or learned automatically from
a dynamic routing protocol. A default route has an IPv4 route entry of 0.0.0.0/0 or an
IPv6 route entry of ::/0. IPv4 routing tables still have a structure based on classful
addressing represented by levels of indentation. IPv6 routing tables do not use the
IPv4 routing table structure. Cisco IOS uses what is known as the administrative
distance (AD) to determine the route to install into the IP routing table. The AD
represents the "trustworthiness" of the route. The lower the AD, the more trustworthy
the route source.
Current routing protocols include IGPs and EGPs. IGPs exchange routing information
within a routing domain administered by a single organization. The only EGP is BGP.
BGP exchanges routing information between different organizations. BGP is used by
ISPs to route packets over the internet. Distance vector, link-state, and path vector
routing protocols refer to the type of routing algorithm used to determine best path.
The main components of dynamic routing protocols are data structures, routing
protocol messages, and algorithms. The best path is selected by a routing protocol
based on the value or metric it uses to determine the distance to reach a network. A
metric is the quantitative value used to measure the distance to a given network. The
best path to a network is the path with the lowest metric. When a router has two or
more paths to a destination with equal cost metrics, then the router forwards the
packets using both paths equally. This is called equal cost load balancing.