Lec 8 Introduction to Routing PDF
Document Details
Uploaded by AmazingScholarship1213
Higher Technological Institute "HTI"
2008
Tags
Summary
This document is a Cisco networking introduction to routing concepts. It discusses routing protocols, objectives, functions of routers, and the use of different types of routing.
Full Transcript
Chapter 4: Routing Concepts Routing Protocols Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1 Chapter 4 4.0 Routing Concepts 4.1 Routing Decisions 4.3 Routing Operation 4.4 Summary Presentati...
Chapter 4: Routing Concepts Routing Protocols Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 1 Chapter 4 4.0 Routing Concepts 4.1 Routing Decisions 4.3 Routing Operation 4.4 Summary Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 2 Chapter 4: Objectives ▪ Configure a router to route between multiple directly connected networks ▪ Describe the primary functions and features of a router. ▪ Explain how routers use information in data packets to make forwarding decisions in a small to medium-sized business network. ▪ Explain the encapsulation and de-encapsulation process used by routers when switching packets between interfaces ▪ Compare ways in which a router builds a routing table when operating in a small to medium-sized business network. ▪ Explain routing table entries for directly connected networks. ▪ Explain how a router builds a routing table of directly connected networks. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 3 Chapter 4: Objectives (continued) ▪ Explain how a router builds a routing table using static routes. ▪ Explain how a router builds a routing table using a dynamic routing protocol. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 4 Functions of a Router Characteristics of a Network Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 5 Functions of a Router Why Routing? ▪ The router is responsible for the routing of traffic between networks. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 6 Functions of a Router Routers are Computers ▪ Routers are specialized computers containing the following required components to operate: Central processing unit (CPU) Operating system (OS) - Routers use Cisco IOS Memory and storage (RAM, ROM, NVRAM, Flash, hard drive) ▪ Routers utilize the following memory: Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 7 Functions of a Router Routers are Computers ▪ Routers use specialized ports and network interface cards to interconnect to other networks Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 8 Functions of a Router Routers Interconnect Networks ▪ Routers can connect multiple networks. ▪ Routers have multiple interfaces, each on a different IP network. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 9 Functions of a Router Routers Choose Best Paths ▪ Determine the best path to send packets Uses its routing table to determine path ▪ Forward packets toward their destination Forwards packet to interface indicated in routing table. Encapsulates the packet and forwards out toward destination. ▪ Routers use static routes and dynamic routing protocols to learn about remote networks and build their routing tables. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 10 Connect Devices Connect to a Network Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 11 Connect Devices Default Gateways To enable network access devices must be configured with the following IP address information ▪IP address - Identifies a unique host on a local network. ▪Subnet mask - Identifies the host’s network subnet. ▪Default gateway - Identifies the router a packet is sent to to when the destination is not on the same local network subnet. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 12 Connect Devices Document Network Addressing Network Documentation should include at least the following in a topology diagram and addressing table: ▪ Device names ▪ Interfaces ▪ IP addresses and subnet mask ▪ Default gateways Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 13 Connect Devices Enable IP on a Host ▪ Statically Assigned IP address – host is manually assigned the IP address, subnet mask and default gateway. DNS server IP address can also be assigned. Used to identify specific network resources such as network servers and printers Can be used in very small networks with few hosts. ▪ Dynamically Assigned IP Address – IP Address information is dynamically assigned by a server using Dynamic Host Configuration Protocol (DHCP) Most hosts acquire their IP address information through DHCP DHCP services can be provided by Cisco routers Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 14 Connect Devices Console Access ▪ Console access requires: Console cable – RJ-45-to-DB-9 console cable Terminal emulation software – Tera Term, PuTTY, HyperTerminal Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 15 Switching Packets between Networks Router Switching Functions Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 16 Router Paths and Packet Switching ▪ Path determination is a process used by a router to pick the best path to a destination ▪ One of 3 path determinations results from searching for the best path Directly connected network Remote network No route determined Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 17 Router Paths and Packet Switching ▪ Switching Function of Router is the process used by a router to switch a packet from an incoming interface to an outgoing interface on the same router. -A packet received by a router will do the following: ▪ Strips off layer 2 headers. ▪ Examines destination IP address located in Layer 3 header to find best route to destination. ▪ Re-encapsulates layer 3 packet into layer 2 frame. ▪ Forwards frame out exit interface. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 18 Router Paths and Packet Switching ▪ As a packet travels from one networking device to another -The Source and Destination IP addresses NEVER change -The Source & Destination MAC addresses CHANGE as packet is forwarded from one router to the next. -TTL field decrement by one until a value of zero is reached at which point router discards packet (prevents packets from endlessly traversing the network) Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 19 Switching Packets between Networks Send a Packet Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 20 Switching Packets between Networks Forward to the Next Hop Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 21 Switching Packets between Networks Packet Routing Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 22 Switching Packets between Networks Reach the Destination Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 23 Path Determination Routing Decisions Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 24 Path Determination Best Path ▪ 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 value used to measure the distance to a given network. ▪ Best path to a network is the path with the lowest metric. ▪ Dynamic routing protocols use their own rules and metrics to build and update routing tables for example: Routing Information Protocol (RIP) - Hop count Open Shortest Path First (OSPF) - Cost based on cumulative bandwidth from source to destination Enhanced Interior Gateway Routing Protocol (EIGRP) - Bandwidth, delay, load, reliability Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 25 Path Determination Load Balancing ▪ 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 26 Path Determination of the route Administrative Distance ▪ If multiple paths to a destination are configured on a router, the path installed in the routing table is the one with the best (lowest) Administrative Distance (AD). ▪ Administrative Distance is the “trustworthiness” of the route ▪ The Lower the AD the more trustworthy the route. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 27 The Routing Table The Routing Table ▪ Routing Table is a file stored in RAM that contains information about ▪ Directly Connected Routes ▪ Remote Routes ▪ Network or Next hop Associations Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 28 The Routing Table Routing Table Sources ▪ Show ip route command is used to display the contents of the routing table ▪ Link local Interfaces –Added to the routing table when an interface is configured. (displayed in IOS 15 or newer) ▪ Directly connected interfaces -Added to the routing table when an interface is configured and active. ▪ Static routes - Added when a route is manually configured and the exit interface is active. ▪ Dynamic routing protocol - Added when EIGRP or OSPF are implemented and networks are identified. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 29 The Routing Table Routing Table Sources Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 30 The Routing Table Remote Network Routing Entries ▪ Interpreting the entries in the routing table. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 31 Directly Connected Routes Directly Connected Interfaces ▪ A newly deployed router, without any configured interfaces, has an empty routing table. ▪ An active, configured directly connected interface creates two routing table entries Link Local (L) and Directly Connected (C) Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 32 Statically Learned Routes Static Routes ▪ Manually configured ▪ Define an explicit path between two networking devices. ▪ Must be manually updated if the topology changes. ▪ Benefits include improved security and control of resources. ▪ Static route to a specific network. ip routenetworkmask {next-hop-ip | exit-intf} ▪ Default Static Route used when the routing table does not contain a path for a destination network. ip route 0.0.0.0 0.0.0.0 {exit-intf | next-hop-ip Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 33 Dynamic Routing Protocols Dynamic Routing ▪ Used by routers to share information about the reachability and status of remote networks. ▪ Performs network discovery and maintaining routing tables. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 34 Dynamic Routing Protocols IPv4 Routing Protocols ▪ Cisco ISR routers can support a variety of dynamic IPv4 routing protocols including: ▪ EIGRP – Enhanced Interior Gateway Routing Protocol ▪ OSPF – Open Shortest Path First ▪ IS-IS – Intermediate System-to-Intermediate System ▪ RIP – Routing Information Protocol Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 35 Dynamic Routing Protocols IPv4 Routing Protocols Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 36 Chapter 6: Static Routing Routing Protocols Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 37 Static Routing Reach Remote Networks A router can learn about remote networks in one of two ways: Manually - Remote networks are manually entered into the route table using static routes. Dynamically - Remote routes are automatically learned using a dynamic routing protocol. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 38 Static Routing Why Use Static Routing? Static routing provides some advantages over dynamic routing, including: ▪ Static routes are not advertised over the network, resulting in better security. ▪ Static routes use less bandwidth than dynamic routing protocols, no CPU cycles are used to calculate and communicate routes. ▪ The path a static route uses to send data is known. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 39 Static Routing Why Use Static Routing? (continued) Static routing has the following disadvantages: ▪ Initial configuration and maintenance is time- consuming. ▪ Configuration is error-prone, especially in large networks. ▪ Administrator intervention is required to maintain changing route information. ▪ Does not scale well with growing networks; maintenance becomes cumbersome. ▪ Requires complete knowledge of the whole network for proper implementation. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 40 Static Routing When to Use Static Routes 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 no other neighbors. ▪ 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 41 Types of Static Routes Static Route Applications Static Routes are often used to: ▪ Connect to a specific network ▪ Provide a Gateway of Last Resort for a stub network ▪ Reduce the number of routes advertised by summarizing several contiguous networks as one static route ▪ Create a backup route in case a primary route link fails Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 42 Types of Static Routes Standard Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 43 Types of Static Routes Default Static Route ▪ A default static route is a route that matches all packets. ▪ A default route identifies the gateway IP address to which the router sends all IP packets that it does not have a learned or static route. ▪ A default static route is simply a static route with 0.0.0.0/0 as the destination IPv4 address. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 44 Types of Static Routes Summary Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 45 Types of Static Routes Floating Static Route ▪ Floating static routes are static routes that are used to provide a backup path to a primary static or dynamic route, in the event of a link failure. ▪ The floating static route is only used when the primary route is not available. ▪ In order to accomplish this, the floating static route is configured with a higher administrative distance than the primary route. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 46 Configure IPv4 Static Routes Next-Hop Options The next hop can be identified by an IP address, exit interface, or both. How the destination is specified creates one of the three following route types: ▪ Next-hop route - Only the next-hop IP address is specified. ▪ Directly connected static route - Only the router exit interface is specified. ▪ Fully specified static route - The next-hop IP address and exit interface are specified. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 47 Configure IPv4 Static Routes Configure a Next-Hop Static Route When a packet is destined for the 192.168.2.0/24 network, R1: 1. Looks for a match in the routing table and finds that it has to forward the packets to the next-hop IPv4 address 172.16.2.2. 2. R1 must now determine how to reach 172.16.2.2; therefore, it searches a second time for a 172.16.2.2 match. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 48 Configure IPv4 Static Routes Configure Directly Connected Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 49 Configure IPv4 Static Routes Configure a Fully Specified Static Route ▪ In a fully specified static route, both the output interface and the next-hop IP address are specified. ▪ This is another type of static route that is used in older IOS’s, prior to CEF. ▪ This form of static route is used when the output interface is a multi-access interface and it is necessary to explicitly identify the next hop. ▪ The next hop must be directly connected to the specified exit interface. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 50 Configure IPv4 Static Routes Verify a Static Route Along with ping and traceroute, useful commands to verify static routes include: ▪ show ip route ▪ show ip route static ▪ show ip route network Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 51 Configure IPv4 Default Routes Default Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 52 Configure IPv4 Default Routes Configure a Default Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 53 Configure IPv4 Default Routes Verify a Default Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 54 Classful Addressing Classful Subnet Masks Class A Class B Class C Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 55 Classful Addressing Classful Routing Protocol Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 56 Classful Addressing Classful Addressing Waste Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 57 CIDR Classless Inter-Domain Routing Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 58 CIDR CIDR and Route Summarization Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 59 CIDR Static Routing CIDR Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 60 CIDR Classless Routing Protocol Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 61 Configure Floating Static Routes Test the Floating Static Route ▪ Use a show ip route command to verify that the routing table is using the default static route. ▪ Use a traceroute command to follow the traffic flow out the primary route. ▪ Disconnect the primary link or shutdown the primary exit interface. ▪ Use a show ip route command to verify that the routing table is using the floating static route. ▪ Use a traceroute command to follow the traffic flow out the backup route. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 62 Troubleshoot IPv4 Static and Default Route Configuration Troubleshoot a Missing Route Common IOS troubleshooting commands include: ▪ ping ▪ traceroute ▪ show ip route ▪ show ip interface brief ▪ show cdp neighbors detail Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 63 Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential 64