CH.14 Routing Concepts

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Default Route

- A default route is similar to a default gateway on a host. 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. This means that zero or no bits need to match between the destination IP address and the default route. - Most enterprise routers have a default route in their routing table. This is to reduce the number of routes in a routing table. - A router, such as a home or small office router that only has one LAN, may reach all its remote networks through a default route. This is useful when the router has only directly connected networks and one exit point to a service provider router.

Dynamic Routes in the IP Routing Table

- A previous example used static routes to the 10.0.4.0/24 and 2001:db8:acad:4::/64 networks. These static routes are no longer configured and OSPF is now being used to dynamically learn all the networks connected to R1 and R2. The following examples show the IPv4 and IPv6 OSPF routing entries on R1 that can reach these networks on R2. Notice that both routing entries use the status code of O to indicate the route was learned by the OSPF routing protocol. Both entries also include the IP address of the next-hop router, via ip-address. Note: IPv6 routing protocols use the link-local address of the next-hop router. Note: OSPF routing configuration for IPv4 and IPv6 is beyond the scope of this course.

Administrative Distance

- A route entry for a specific network address (prefix and prefix length) can only appear once in the routing table. However, it is possible that the routing table learns about the same network address from more than one routing source. - Except for very specific circumstances, only one dynamic routing protocol should be implemented on a router. However, it is possible to configure both OSPF and EIGRP on a router, and both routing protocols may learn of the same destination network. Each routing protocol may decide on a different path to reach the destination based on the metric of that routing protocol.

Two Functions of Router

- A router connects multiple networks, which means that it has multiple interfaces that each belong to a different IP network. - When a router receives an IP packet on one interface, it determines which interface to use to forward the packet to the destination - The interface that the router uses to forward the packet may be the final destination, or it may be a network connected to another router that is used to reach the destination network. Each network that a router connects to typically requires a separate interface, but this may not always be the case. - 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.

Topology

- A router creates a routing table to help it determine where to forward packets. But before diving into the details of the IP routing table, this topic reviews basic router configuration and verification tasks. You will also complete a Packet Tracer activity to refresh your skills.

Static Routes

- After directly connected interfaces are configured and added to the routing table, static or dynamic routing can be implemented for accessing remote networks. - Static routes are manually configured. They define an explicit path between two networking devices. Unlike a dynamic routing protocol, static routes are not automatically updated and must be manually reconfigured if the network topology changes. The benefits of using static routes include improved security and resource efficiency. Static routes use less bandwidth than dynamic routing protocols, and no CPU cycles are used to calculate and communicate routes. The main disadvantage to using static routes is the lack of automatic reconfiguration if the network topology changes.

Process Switching

- An older packet forwarding mechanism still available for Cisco routers. 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. It is important to understand that the router does this for every packet, even if the destination is the same for a stream of packets. This process-switching mechanism is very slow and is rarely implemented in modern networks. Contrast this with fast switching.

Filter Command Output

- Another useful feature that improves user experience in the command-line interface (CLI) is filtering show output. Filtering commands can be used to display specific sections of output. To enable the filtering command, enter a pipe (|) character after the show command and then enter a filtering parameter and a filtering expression.

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 - Static routes are useful for smaller networks with only one path to an outside network. They also provide security in a larger network for certain types of traffic, or links to other networks that need more control.

Packet Forwarding Mechanisms

- As mentioned previously, the primary responsibility of the packet forwarding function is to encapsulate packets in the appropriate data link frame type for the outgoing interface. The more efficiently a router can perform this task, the faster packets can be forwarded by the router.

Best Path

- Before a path to a remote network is offered to the routing table, the dynamic routing protocol must determine the best path to that network. Determining the best path may involve the evaluation of multiple paths to the same destination network and selecting the optimum or shortest path to reach that network. Whenever multiple paths to the same network exist, each path uses a different exit interface on the router to reach that network. - 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. - Dynamic routing protocols typically use their own rules and metrics to build and update routing tables. The routing algorithm generates a value, or a metric, for each path through the network. Metrics can be based on either a single characteristic or several characteristics of a path. Some routing protocols can base route selection on multiple metrics, combining them into a single metric.

Directly Connected Networks (again)

- Before a router can learn about any remote networks, it must have at least one active interface configured with an IP address and subnet mask (prefix length). This is known as a directly connected network or a directly connected route. Routers add a directly connected route to its routing table when an interface is configured with an IP address and is activated. A directly connected network is denoted by a status code of C in the routing table. The route contains a network prefix and prefix length. - The routing table also contains a local route for each of its directly connected networks, indicated by the status code of L. This is the IP address that is assigned to the interface on that directly connected network. For IPv4 local routes the prefix length is /32 and for IPv6 local routes the prefix length is /128. This means the destination IP address of the packet must match all the bits in the local route for this route to be a match. The purpose of the local route is to efficiently determine when it receives a packet for the interface instead of a packet that needs to be forwarded.

Cisco Express Forwarding (CEF)

- CEF is the most recent and default Cisco IOS packet-forwarding mechanism. Like fast switching, CEF builds a Forwarding Information Base (FIB), and an adjacency table. However, the table entries are not packet-triggered like fast switching but change-triggered, such as when something changes in the network topology. Therefore, 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. Cisco Express Forwarding is the fastest forwarding mechanism and the default on Cisco routers and multilayer switches. - CEF builds the FIB and adjacency tables after the network has converged. All five packets are quickly processed in the data plane.

How does the router know which source to use? Which route should it install in the routing table? The route learned from OSPF, or the route learned from EIGRP?

- 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. Because EIGRP has an AD of 90 and OSPF has an AD of 110, the EIGRP route entry would be installed in the routing table. Note: The AD does not necessarily represent which dynamic routing protocol is best. - A more common example is a router learning the same network address from a static route and a dynamic routing protocol, such as OSPF. A static route has an AD of 1, whereas an OSPF-discovered route has an AD of 110. Given two separate route sources to the same destination, the router chooses to install the route with the lowest AD. When a router has the choice of a static route and an OSPF route, the static route takes precedence. Note: Directly connected networks have the lowest AD of 0. Only a directly connected network can have an AD of 0.

Directly Connected Networks

- 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).

Dynamic Routing Protocols

- Dynamic routing protocols are used by routers to automatically share information about the reachability and status of remote networks. Dynamic routing protocols perform several activities, including network discovery and maintaining routing tables. - Important advantages of dynamic routing protocols are the ability to select a best path, and the ability to automatically discover a new best path when there is a change in the topology. - Network discovery is the ability of a routing protocol to share information about the networks that it knows about with other routers that are also using the same routing protocol. Instead of depending on manually configured static routes to remote networks on every router, a dynamic routing protocol allows the routers to automatically learn about these networks from other routers. These networks, and the best path to each, are added to the routing table of the router, and identified as a network learned by a specific dynamic routing protocol.

Dynamic Routing Evolution

- Dynamic routing protocols have been used in networks since the late 1980s. One of the first routing protocols was RIP. RIPv1 was released in 1988, but some of the basic algorithms within the protocol were used on the Advanced Research Projects Agency Network (ARPANET) as early as 1969. - As networks evolved and became more complex, new routing protocols emerged. The RIP protocol was updated to RIPv2 to accommodate growth in the network environment. However, RIPv2 still does not scale to the larger network implementations of today. To address the needs of larger networks, two advanced routing protocols were developed: OSPF and Intermediate System-to-Intermediate System (IS-IS). Cisco developed the Interior Gateway Routing Protocol (IGRP), which was later replaced by Enhanced IGRP (EIGRP), which also scales well in larger network implementations. Additionally, there was the need to connect the different routing domains of different organizations and provide routing between them. The Border Gateway Protocol (BGP), the successor of Exterior Gateway Protocol (EGP) is used between Internet Service Providers (ISPs). BGP is also used between ISPs and some private organizations to exchange routing information.

Fast Switching

- Fast switching is 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 also 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. - With fast switching, notice how only the first packet of a flow is process-switched and added to the fast-switching cache. The next four packets are quickly processed based on the information in the fast-switching cache.

Structure of an IPv4 Routing Table

- IPv4 was standardized in the early 1980s using the now obsolete classful addressing architecture. The IPv4 routing table is organized using this same classful structure. In the show ip route output, notice that some route entries are left justified while others are indented. This is based on how the routing process searches the IPv4 routing table for the longest match. This was all because of classful addressing. Although the lookup process no longer uses classes, the structure of the IPv4 routing table still retains in this format. Note: The IPv4 routing table in the example is not from any router in the topology used in this module. Although the details of the structure are beyond the scope of this module, it is helpful to recognize the structure of the table. An indented entry is known as a child route. A route entry is indented if it is the subnet of a classful address (class A, B or C network). Directly connected networks will always be indented (child routes) because the local address of the interface is always entered in the routing table as a /32. The child route will include the route source and all the forwarding information such as the next-hop address. - The classful network address of this subnet will be shown above the route entry, less indented, and without a source code. That route is known as a parent route. Note: This is just a brief introduction to the structure of an IPv4 routing table and does not cover details or specifics of this architecture.

Forwards the Packet to a Next-Hop Router

- If the route entry indicates that the destination IP address is on a remote network, this means the destination IP address of the packet belongs to a device on network that is not directly connected. Therefore, the packet must be forwarded to another router, specifically a 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. Note: This process will vary for other types of Layer 2 networks.

Forwards the Packet to a Device on a Directly Connected Network

- If the route entry indicates that the egress interface is a directly connected network, this means that the destination IP address of the packet belongs to a device on the directly connected network. Therefore, the packet can be forwarded directly to the destination device. The destination device is typically an end device on an Ethernet LAN, which means the packet must be encapsulated in an Ethernet frame. - 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: IPv4 packet - The router checks its ARP table for the destination IPv4 address and an associated Ethernet MAC address. If there is no match, the router sends an ARP Request. The destination device will return an ARP Reply with its MAC address. The router can now forward the IPv4 packet in an Ethernet frame with the proper destination MAC address. IPv6 packet - The router checks its neighbor cache for the destination IPv6 address and an associated Ethernet MAC address. If there is no match, the router sends an ICMPv6 Neighbor Solicitation (NS) message. The destination device will return an ICMPv6 Neighbor Advertisement (NA) message with its MAC address. The router can now forward the IPv6 packet in an Ethernet frame with the proper destination MAC address.

Drops 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.

Enhanced Interior Gateway Routing Protocol (EIGRP)

- It calculates a metric based on the slowest bandwidth and delay values. - It could also include load and reliability into the metric calculation.

Static routing has three primary uses:

- It provides ease of routing table maintenance in smaller networks that are not expected to grow significantly. - It uses 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. - It routes to and from stub networks. A stub network is a network accessed by a single route, and the router has only one neighbor.

Packet Forwarding Decision Process

- Now that the router has determined the best path for a packet based on the longest match, it must determine how to encapsulate the packet and forward it out the correct egress interface.

A common analogy used to describe these three different packet-forwarding mechanisms is as follows

- Process switching solves a problem by doing math long hand, even if it is the identical problem that was just solved. - Fast switching solves a problem by doing math long hand one time and remembering the answer for subsequent identical problems. - CEF solves every possible problem ahead of time in a spreadsheet.

Best Path Equals Longest Match

- The best path in the routing table is also known as the longest match. The longest match is a process the router uses to find a match between the destination IP address of the packet and a routing entry in the routing table. - The routing table contains route entries consisting of a prefix (network address) and prefix length. For there to be a match between the destination IP address of a packet and a route in the routing table, a minimum number of far-left bits must match between the IP address of the packet and the route in the routing table. The prefix length of the route in the routing table is used to determine the minimum number of far-left bits that must match. - Remember that an IP packet only contains the destination IP address and not the prefix length. - 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. The route with the greatest number of equivalent far-left bits, or the longest match, is always the preferred route. Note: The term prefix length will be used to refer to the network portion of both IPv4 and IPv6 addresses.

Open Shortest Path First (OSPF)

- The metric is "cost" which is the based on the cumulative bandwidth from source to destination. - Faster links are assigned lower costs compared to slower (higher cost) links.

Routing Information Protocol (RIP)

- The metric is "hop count". - Each router along a path adds a hop to the hop count. - A maximum of 15 hops allowed.

End-to-End Packet Forwarding

- The primary responsibility of the packet forwarding function is to encapsulate packets in the appropriate data link frame type for the outgoing interface. For example, the data link frame format for a serial link could be Point-to-Point (PPP) protocol, High-Level Data Link Control (HDLC) protocol, or some other Layer 2 protocol.

Load Balancing

- What happens if a routing table has two or more paths with identical metrics to the same destination network? - 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. The routing table contains the single destination network, but has multiple exit interfaces, one for each equal cost path. The router forwards packets using the multiple exit interfaces listed in the routing table. - If configured correctly, load balancing can increase the effectiveness and performance of the network. - Equal cost load balancing is implemented automatically by dynamic routing protocols. It is enabled with static routes when there are multiple static routes to the same destination network using different next-hop routers. Note: Only EIGRP supports unequal cost load balancing.

Common verification commands include the following:

- show ip interface brief - show running-config interface interface-type number - show interfaces - show ip interface - show ip route - ping * In each case, replace ip with ipv6 for the IPv6 version of the command

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. However, if there is no matching route entry the packet is dropped.

Route Sources

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

The main components of dynamic routing protocols include the following...

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. 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. * Routing protocols determine the best path, or route, to each network. That route is then offered to the routing table. The route will be installed in the routing table if there is not another routing source with a lower AD. A primary benefit of dynamic routing protocols is that routers exchange routing information when there is a topology change. This exchange allows routers to automatically learn about new networks and to find alternate paths when there is a link failure to a current network.

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

Dynamic Routing Protocols (again)

Dynamic routing protocols help the network administrator manage the time-consuming and exacting process of configuring and maintaining static routes. - Dynamic routing protocols are implemented in any type of network consisting of more than just a few routers. Dynamic routing protocols are scalable and automatically determine better routes if there is a change in the topology. - 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.

In the routing tables for R1 and R2, notice that the sources for each route are identified by a code. The code identifies how the route was learned. For instance, common codes include the following...

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.

Routers support the following three packet forwarding mechanisms...

Process switching Fast switching Cisco Express Forwarding (CEF)

Remote Networks

Remote networks are networks that are not directly connected to the router. Routers learn about remote networks in two ways: 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. Dynamic routing protocols include Enhanced Interior Gateway Routing Protocol (EIGRP), Open Shortest Path First (OSPF), as well as several others.

The filtering parameters that can be configured after the pipe include...

section - This displays the entire section that starts with the filtering expression. include - This includes all output lines that match the filtering expression. exclude - This excludes all output lines that match the filtering expression. begin - This displays all the output lines from a certain point, starting with the line that matches the filtering expression. Note: Output filters can be used in combination with any show command.


Kaugnay na mga set ng pag-aaral

Chapter 10 Test review Development Through the Lifespan, 7e

View Set

Chapter 2 - test review - planes

View Set

Kiwaha from he kohinga kiwaha- Wairua Pai

View Set

CD5, CAD/CAM in Operative Dentistry:

View Set

Chapter 7.1 is it Short, Long, Irregular, or flat bones.

View Set

Abeka 9th VSP Quiz 8 revised 2021

View Set