PPt_4face_021208.jpg © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Presentation_ID ‹#› Cisco_NewLogo Cisco Chapter 4: Routing Concepts Routing & Switching Cisco Networking Academy program Routing Protocols Chapter 4: Routing Concepts Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Chapter 4 §4.0 Routing Concepts §4.1 Initial Configuration of a Router §4.2 Routing Decisions §4.3 Router Operation §4.4 Summary Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png 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. § 4. Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Chapter 4: Objectives (cont.) §Explain how a router builds a routing table using static routes. §Explain how a router builds a routing table using a dynamic routing protocol. § 4. Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Functions of a Router Characteristics of a Network 4.1.1.1 Characteristics of a Network Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Functions of a Router Why Routing? §The router is responsible for the routing of traffic between networks. 4.1.1.2 Why Routing? Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §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) § Functions of a Router Routers are Computers 4.1.1.3 Routers are Computers Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §Routers use specialized ports and network interface cards to interconnect to other networks. Functions of a Router Routers are Computers 4.1.1.3 Routers are Computers Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §Routers can connect multiple networks. §Routers have multiple interfaces, each on a different IP network. Functions of a Router Routers Interconnect Networks 4.1.1.4 Routers Interconnect Networks Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Functions of a Router Routers Choose Best Paths §Routers use static routes and dynamic routing protocols to learn about remote networks and build their routing tables. §Routers use routing tables to determine the best path to send packets. §Routers encapsulate the packet and forward it to the interface indicated in routing table. 4.1.1.5 Routers Choose Best Paths Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png § Functions of a Router Routers Choose Best Paths 4.1.1.5 Routers Choose Best Paths Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §Process switching – An older packet forwarding mechanism still available for Cisco routers. §Fast switching – A common packet forwarding mechanism which uses a fast-switching cache to store next hop information. §Cisco Express Forwarding (CEF) – The most recent, fastest, and preferred Cisco IOS packet-forwarding mechanism. Table entries are not packet-triggered like fast switching but change-triggered. § § Functions of a Router Packet Forwarding Methods 4.1.1.6 Packet Forwarding Methods 4.1.1.7 Activity – Identify Router Components 4.1.1.8 Packet Tracer – Using Traceroute to Discover Networks 4.1.1.9 Lab – Mapping the Internet Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png § § Connect Devices Connect to a Network 4.1.2.1 Connect to a Network Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png § 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. § § § Connect Devices Default Gateways 4.1.2.2 Default Gateways Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §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 § § Connect Devices Document Network Addressing 4.1.2.3 Document Network Addressing Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Connect Devices Enable IP on a Host §Statically Assigned IP address – The host is manually assigned an IP address, subnet mask and default gateway. A 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. 4.1.2.4 Enable IP on a Host Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Connect Devices Device LEDs 4.1.2.5 Device LEDs Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §Console access requires: • Console cable – RJ-45-to-DB-9 console cable • Terminal emulation software – Tera Term, PuTTY, HyperTerminal § Connect Devices Console Access 4.1.2.6 Console Access Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §Network infrastructure devices require IP addresses to enable remote management. §On a switch, the management IP address is assigned on a virtual interface. § Connect Devices Enable IP on a Switch 4.1.2.7 Enable IP on a Switch 4.1.2.8 Activity – Document an Addressing Scheme 4.1.2.9 Packet Tracer – Documenting the Network Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §Basics tasks that should be first configured on a Cisco Router and Cisco Switch: §Name the device – Distinguishes it from other routers §Secure management access – Secures privileged EXEC, user EXEC, and Telnet access, and encrypts passwords to their highest level § § § § §Configure a banner – Provides legal notification of unauthorized access. §Save the Configuration § Basic Settings on a Router Configure Basic Router Settings 4.1.3.1 Configure Basic Router Settings Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §To be available, a router interface must be: §Configured with an address and subnet mask . §Must be activated using no shutdown command. By default LAN and WAN interfaces are not activated. §Serial cable end labeled DCE must be configured with the clock rate command. §Optional description can be included. Basic Settings on a Router Configure an IPv4 Router Interface 4.1.3.2 Configure an IPv4 Router Interface Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §To configure interface with IPv6 address and subnet mask: §Use the ipv6 address ipv6-address/ipv6-length [link-local | eui-64]interface configuration command. §Activate using the no shutdown command. §IPv6 interfaces can support more than one address: §Configure a specified global unicast - ipv6-address /ipv6-length §Configure a global IPv6 address with an interface identifier (ID) in the low-order 64 bits - ipv6-address /ipv6-length eui-64 §Configure a link-local address - ipv6-address /ipv6-length link-local Basic Settings on a Router Configure an IPv6 Router Interface 4.1.3.3 Configure an IPv6 Router Interface Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Basic Settings on a Router Configure a Loopback Interface §A loopback interface is a logical interface that is internal to the router: §It is not assigned to a physical port, it is considered a software interface that is automatically in an UP state. §A loopback interface is useful for testing. §It is important in the OSPF routing process. 4.1.3.5 Packet Tracer – Configuring IPv4 and IPv6 Interfaces Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Verify Connectivity of Directly Connected Networks Verify Interface Settings §Show commands are used to verify operation and configuration of interface: §show ip interfaces brief §show ip route §show running-config §Show commands are used to gather more detailed interface information: §show interfaces §show ip interfaces 4.1.4.1 Verify Interface Settings Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Verify Connectivity of Directly Connected Networks Verify Interface Settings §Some of the common commands to verify the IPv6 interface configuration are: §show ipv6 interface brief - displays a summary for each of the interfaces. §show ipv6 interface gigabitethernet 0/0 - displays the interface status and all the IPv6 addresses for this interface. § show ipv6 route - verifies that IPv6 networks and specific IPv6 interface addresses have been installed in the IPv6 routing table. § § § 4.1.4.2.Verify IPv6 Interface Settings Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png §Show command output can be managed using the following command and filters: §Use the terminal length number command to specify the number of lines to be displayed. A value of 0 (zero) prevents the router from pausing between screens of output. §To filter specific output of commands use the (|)pipe character after show command. Parameters that can be used after pipe include: section, include, exclude, begin § § Verify Connectivity of Directly Connected Networks Filter Show Command Output 4.1.4.3 Filter Show Command Output Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Verify Connectivity of Directly Connected Networks Command History Feature §The command history feature temporarily stores a list of executed commands for access: §To recall commands press Ctrl+P or the UP Arrow. §To return to more recent commands press Ctrl+N or the Down Arrow. §By default, command history is enabled and the system captures the last 10 commands in the buffer. Use the show history privileged EXEC command to display the buffer contents. §Use the terminal history size user EXEC command to increase or decrease size of the buffer. § 4.1.4.4 Command History Feature 4.1.4.5 Packet Tracer – Configuring and Verifying a Small Network 4.1.4.6 Lab – Configuring Basic Router Settings with IOS CLI 4.1.4.7 Lab – Configuring Basic Router Settings with CCP Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Switching Packets between Networks Router Switching Functions 4.2.1.1 Router Switching Functions Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Switching Packets between Networks Send a Packet 4.2.1.2 Send a Packet this graphic is from page 4.2.1.5, please replace with the graphic from 4.2.1.3 Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Switching Packets between Networks Forward to the Next Hop § § § § § § 4.2.1.3 Forward to the Next Hop Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Switching Packets between Networks Packet Routing § § § § § § 4.2.1.4 Packet Routing Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Switching Packets between Networks Reach the Destination 4.2.1.5 Reach the Destination 4.2.1.6 Activity – Match Layer 2 and Layer 3 Addressing Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Path Determination Routing Decisions 4.2.2.1 Routing Decisions Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png 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: §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 § § § § § § 4.2.2.2 Best Path Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png 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: •Equal cost load balancing can improve network performance. •Equal cost load balancing can be configured to use both dynamic routing protocols and static routes. •RIP, OSPF and EIGRP support equal cost load balancing. § § § § § § 4.2.2.3 Load Balancing Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png 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 lowest Administrative Distance (AD): •A static route with an AD of 1 is more reliable than an EIGRP-discovered route with an AD of 90. •A directly connected route with an AD of 0 is more reliable than a static route with an AD of 1. § § § § § § § § 4.2.2.4 Administrative Distance 4.2.2.5 Activity – Order the Steps in the Packet Forwarding Process Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png The Routing Table The Routing Table § § A routing table is a file stored in RAM that contains information about: §Directly connected routes §Remote routes §Network or next hop associations § § § § § 4.3.1.1 The Routing Table Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png The Routing Table Routing Table Sources § § § § § § § § § § § §The show ip route command is used to display the contents of the routing table: §Local route 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. § § § § 4.3.1.2 Routing Table Sources Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png The Routing Table Routing Table Sources § § § § § § § § § § § § § § § 4.3.1.2 Routing Table Sources Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png The Routing Table Remote Network Routing Entries § § § § § § § § § § § §Interpreting the entries in the routing table. § § § § 4.3.1.3 Remote Network Routing Entries 4.3.1.4 Activity- Interpret the Content of a Routing Table Entry Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png 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) §Directly Connected (C) § § § § § 4.3.2.1 Directly Connected Interfaces 4.3.2.2 Directly Connected Route Table Entries Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Directly Connected Routes Directly Connected Example § § § § § § § § § § § §A routing table with the directly connected interfaces of R1 configured and activated. 4.3.2.3 Directly Connected Route Table Entries Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Directly Connected Routes Directly Connected IPv6 Example § § § § § § § § § § § §The show ipv6 route command shows the ipv6 networks and routes installed in the routing table. § § § 4.3.2.4 Directly Connected IPv6 Example 4.3.2.5 Packet Tracer – Investigating Directly Connected Routes Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Statically Learned Routes Static Routes § § § § § § § § § § § §Static routes and default static routes can be implemented after directly connected interfaces are added to the routing table: §Static routes are manually configured §They define an explicit path between two networking devices. §Static routes must be manually updated if the topology changes. §Their benefits include improved security and control of resources. §Configure a static route to a specific network using the ip route network mask {next-hop-ip | exit-intf} command. §A default static route is used when the routing table does not contain a path for a destination network. §Configure a default static route using the ip route 0.0.0.0 0.0.0.0 {exit-intf | next-hop-ip} command. § 4.3.3.1 Static Routes Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Statically Learned Routes Default Static Routes Example § § § § § § § § § § § § 4.3.3.2 Default Static Routes Example Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Statically Learned Routes Static Routes Example § § § § § § § § § § § § 4.3.3.2 Static Routes Example (cont.) Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Statically Learned Routes Static IPv6 Routes Example § § § § § § § § § § § § 4.3.3.3 Static IPv6 Route Example Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Dynamic Routing Protocols Dynamic Routing § § § § § § § § § § § §Dynamic routing is used by routers to share information about the reachability and status of remote networks. It performs network discovery and maintains routing tables. § 4.3.4.1 Dynamic Routing Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png 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 § 4.3.4.2 IPv4 Routing Protocols Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Dynamic Routing Protocols IPv4 Routing Protocols § § § § § § § § § § § 4.3.4.3 IPv4 Routing Protocols Example Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Dynamic Routing Protocols IPv6 Routing Protocols § § § § § §Cisco ISR routers can support a variety of dynamic IPv6 routing protocols including: §RIPng - RIP next generation §OSPFv3 §EIGRP for IPv6 §MP-BGP4 - Multicast Protocol-Border Gateway Protocol § 4.3.4.4 IPv6 Routing Protocols Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Dynamic Routing Protocols IPv6 Routing Protocols § § § § § 4.3.4.5 IPv6 Routing Protocols Example Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Chapter 4: Summary §There are many key structures and performance-related characteristics referred to when discussing networks: topology, speed, cost, security, availability, scalability, and reliability. §Cisco routers and Cisco switches have many similarities. They support a similar modal operating system, similar command structures, and many of the same commands. §One distinguishing feature between switches and routers is the type of interfaces supported by each. §The main purpose of a router is to connect multiple networks and forward packets from one network to the next. This means that a router typically has multiple interfaces. Each interface is a member or host on a different IP network. Chapter 4 Summary Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Chapter 4: Summary (cont.) §The routing table is a list of networks known by the router. § A remote network is a network that can only be reached by forwarding the packet to another router. §Remote networks are added to the routing table in two ways: either by the network administrator manually configuring static routes or by implementing a dynamic routing protocol. §Static routes do not have as much overhead as dynamic routing protocols; however, static routes can require more maintenance if the topology is constantly changing or is unstable. §Dynamic routing protocols automatically adjust to changes without any intervention from the network administrator. Dynamic routing protocols require more CPU processing and also use a certain amount of link capacity for routing updates and messages. Chapter 4 Summary Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png Chapter 4: Summary (cont.) §Routers make their primary forwarding decision at Layer 3, the Network layer. However, router interfaces participate in Layers 1, 2, and 3. Layer 3 IP packets are encapsulated into a Layer 2 data link frame and encoded into bits at Layer 1. §Router interfaces participate in Layer 2 processes associated with their encapsulation. For example, an Ethernet interface on a router participates in the ARP process like other hosts on that LAN. §Components of the IPv6 routing table are very similar to the IPv4 routing table. For instance, it is populated using directly connected interfaces, static routes and dynamically learned routes. Chapter 4 Summary Presentation_ID ‹#› © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential Rev08_Cisco_BrandBar10_060408.png CNA_largo-onwhite