Redes de Computadores (11558) Ano Lectivo 2014/2015 * 1º Semestre ! Licenciatura em Engenharia Informática ! Aula 9 01/12/2014 ! UNIVERSIDADE DA BEIRA INTERIOR ! Faculdade de Engenharia Departamento de Informática 1 Nuno M. Garcia, ngarcia@di.ubi.pt Redes de Computadores • Agenda •• Routing e Static Routing • outros assuntos? (adaptado do capítulo 1 e capítulo 2 do curso CCNA2 da Academia Cisco da UBI) ! UNIVERSIDADE DA BEIRA INTERIOR ! Faculdade de Engenharia Departamento de Informática 2 Nuno M. Garcia, ngarcia@di.ubi.pt Chapter 1: Routing Concepts Routing Protocols Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 1 1.0 Routing Concepts 1.1 Initial Configuration of a Router 1.2 Routing Decisions 1.3 Router Operation 1.4 Summary Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 1: 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 ‹#› Chapter 1: 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Functions of a Router Characteristics of a Network Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› 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) Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› 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 ‹#› 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Functions of a Router Routers Choose Best Paths Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Functions of a Router Packet Forwarding Methods ▪ 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 packettriggered like fast switching but change-triggered. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Connect Devices Connect to a Network Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› 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 ‹#› 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Connect Devices Device LEDs Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› Connect Devices Enable IP on a Switch ▪ Network infrastructure devices require IP addresses to enable remote management. ▪ On a switch, the management IP address is assigned on a virtual interface. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Basic Settings on a Router Configure Basic Router Settings 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 Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Basic Settings on a Router Configure an IPv4 Router Interface 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Basic Settings on a Router Configure an IPv6 Router Interface To configure interface with IPv6 address and subnet mask: ▪ Use the ipv6 address ipv6-address/ipv6length [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 - ipv6address /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 - ipv6address /ipv6-length link-local Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Verify Connectivity of Directly Connected Networks Filter Show Command Output Show command output can be filtered 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 Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Switching Packets between Networks Router Switching Functions Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Switching Packets between Networks Send a Packet Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Switching Packets between Networks Forward to the Next Hop Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Switching Packets between Networks Packet Routing Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Switching Packets between Networks Reach the Destination Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Path Determination Routing Decisions Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ! ! Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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. ! ! ! ! Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 EIGRPdiscovered 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. ! ! ! ! ! ! Presentation_ID ! © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ! ! ! ! ! Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› The Routing Table Routing Table Sources Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› 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) Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Directly Connected Routes Directly Connected Example A routing table with the directly connected interfaces of R1 configured and activated. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Directly Connected Routes Directly Connected IPv6 Example The show ipv6 route command shows the ipv6 networks and routes installed in the routing table. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 {exitintf | next-hop-ip} command. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Statically Learned Routes Default Static Routes Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Statically Learned Routes Static Routes Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Statically Learned Routes Static IPv6 Routes Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› Dynamic Routing Protocols IPv4 Routing Protocols Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Dynamic Routing Protocols IPv6 Routing Protocols Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 1: Summary ▪ This chapter introduced the router. The main purpose of a router is to connect multiple networks and forward packets from one network to the next. ▪ 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 one of two ways: either by the network administrator manually configuring static routes or by implementing a dynamic routing protocol. ▪ In many cases, a routing table will contain both static and dynamic routes. ▪ 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. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 2: Static Routing Routing Protocols Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 2 2.1 Static Routing Implementation 2.2 Configure Static and Default Routes 2.3 Review of CIDR and VLSM 2.4 Configure Summary and Floating Static Routes 2.5 Troubleshoot Static and Default Route Issues 2.6 Summary Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 2: Objectives ▪ Explain the advantages and disadvantages of static routing. ▪ Explain the purpose of different types of static routes. ▪ Configure IPv4 and IPv6 static routes by specifying a nexthop address. ▪ Configure an IPv4 and IPv6 default routes. ▪ Explain the use of legacy classful addressing in network implementation. ▪ Explain the purpose of CIDR in replacing classful addressing. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 2: Objectives (cont.) ▪ Design and implement a hierarchical addressing scheme. ▪ Configure an IPv4 and IPv6 summary network address to reduce the number of routing table updates. ▪ Configure a floating static route to provide a backup connection. ▪ Explain how a router processes packets when a static route is configured. ▪ Troubleshoot common static and default route configuration issues. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› 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 ‹#› Static Routing Why Use Static Routing? (cont.) 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 ‹#› 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 ‹#› 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 ‹#› Types of Static Routes Standard Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› Types of Static Routes Summary Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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. ▪ 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 ‹#› Configure IPv4 Static Routes ip route Command Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› 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 ‹#› Configure IPv4 Static Routes Configure Directly Connected Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 IOSs, 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 ‹#› 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 ‹#› Configure IPv4 Default Routes Default Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv4 Default Routes Configure a Default Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv4 Default Routes Verify a Default Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Static Routes The ipv6 route Command Most of parameters are identical to the IPv4 version of the command. IPv6 static routes can also be implemented as: ▪ Standard IPv6 static route ▪ Default IPv6 static route ▪ Summary IPv6 static route ▪ Floating IPv6 static route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Static Routes Next-Hop Options The next hop can be identified by an IPv6 address, exit interface, or both. How the destination is specified creates one of three route types: ▪ Next-hop IPv6 route - Only the next-hop IPv6 address is specified. ▪ Directly connected static IPv6 route - Only the router exit interface is specified. ▪ Fully specified static IPv6 route - The next-hop IPv6 address and exit interface are specified. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Static Routes Configure a Next-Hop Static IPv6 Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Static Routes Configure Directly Connected Static IPv6 Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Static Routes Configure Fully Specified Static IPv6 Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Static Routes Verify IPv6 Static Routes Along with ping and traceroute, useful commands to verify static routes include: ▪ show ipv6 route! ▪ show ipv6 route static! ▪ show ipv6 route network Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Default Routes Default Static IPv6 Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Default Routes Configure a Default Static IPv6 Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Default Routes Verify a Default Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Classful Addressing Classful Network Addressing Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Classful Addressing Classful Subnet Masks Class A Class B Class C Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Classful Addressing Classful Routing Protocol Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Classful Addressing Classful Addressing Waste Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› CIDR Classless Inter-Domain Routing Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› CIDR CIDR and Route Summarization Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› CIDR Static Routing CIDR Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› CIDR Classless Routing Protocol Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› VLSM Fixed Length Subnet Masking Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› VLSM Variable Length Subnet Masking Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› VLSM VLSM in Action VLSM allows the use of different masks for each subnet: ▪ After a network address is subnetted, those subnets can be further subnetted. ▪ VLSM is simply subnetting a subnet. VLSM can be thought of as sub-subnetting. ▪ Individual host addresses are assigned from the addresses of "sub-subnets". Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› VLSM Subnetting Subnets Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› VLSM VLSM Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv4 Summary Routes Route Summarization Route summarization, also known as route aggregation, is the process of advertising a contiguous set of addresses as a single address with a less-specific, shorter subnet mask: ▪ CIDR is a form of route summarization and is synonymous with the term supernetting. ▪ CIDR ignores the limitation of classful boundaries, and allows summarization with masks that are smaller than that of the default classful mask. ▪ This type of summarization helps reduce the number of entries in routing updates and lowers the number of entries in local routing tables. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv4 Summary Routes Calculate a Summary Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv4 Summary Routes Summary Static Route Example Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Summary Routes Summarize IPv6 Network Addresses ▪ Aside from the fact that IPv6 addresses are 128 bits long and written in hexadecimal, summarizing IPv6 addresses is actually similar to the summarization of IPv4 addresses. It just requires a few extra steps due to the abbreviated IPv6 addresses and hex conversion. ▪ Multiple static IPv6 routes can be summarized into a single static IPv6 route if: • The destination networks are contiguous and can be summarized into a single network address. • The multiple static routes all use the same exit interface or nexthop IPv6 address. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Summary Routes Calculate IPv6 Network Addresses There are seven steps to summarize IPv6 networks into a single IPv6 prefix: Step 1. List the network addresses (prefixes) and identify the part where the addresses differ. Step 2. Expand the IPv6 if it is abbreviated. Step 3. Convert the differing section from hex to binary. Step 4. Count the number of far left matching bits to determine the prefix-length for the summary route. Step 5. Copy the matching bits and then add zero bits to determine the summarized network address (prefix). Step 6. Convert the binary section back to hex. Step 7. Append the prefix of the summary route (result of Step 4). Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure IPv6 Summary Routes Configure an IPv6 Summary Address Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure Floating Static Routes Floating Static Routes Floating static routes are static routes that have an administrative distance greater than the administrative distance of another static route or dynamic routes: ▪ The administrative distance of a static route can be increased to make the route less desirable than that of another static route or a route learned through a dynamic routing protocol. ▪ In this way, the static route “floats” and is not used when the route with the better administrative distance is active. ▪ However, if the preferred route is lost, the floating static route can take over, and traffic can be sent through this alternate route. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure Floating Static Routes Configure a Floating Static Route Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Configure Floating Static Routes Test the Floating Static Route To test a 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 ‹#› Troubleshoot Static and Default Route Issues Static Routes and Packet Forwarding Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Troubleshoot Static and Default Route Issues Static Routes and Packet Forwarding (cont.) ▪ 1. The packet arrives on the interface GigabitEthernet 0/0 of R1. ▪ 2. R1 does not have a specific route to the destination network, 192.168.2.0/24; therefore, R1 uses the default static route. ▪ 3. R1 encapsulates the packet in a new frame. Because the link to R2 is a point-to-point link, R1 adds an "all 1s" address for the Layer 2 destination address. ▪ 4. The frame is forwarded out of the Serial 0/0/0 interface. The packet arrives on the Serial 0/0/0 interface on R2. ▪ 5. R2 de-encapsulates the frame and looks for a route to the destination. R2 has a static route to 192.168.2.0/24 out of the Serial 0/0/1 interface. ▪ 6. R2 encapsulates the packet in a new frame. Because the link to R3 is a point-to-point link, R2 adds an "all 1s" address for the Layer 2 destination address. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Troubleshoot Static and Default Route Issues Static Routes and Packet Forwarding (cont.) ▪ 7. The frame is forwarded out of the Serial 0/0/1 interface. The packet arrives on the Serial 0/0/1 interface on R3. ▪ 8. R3 de-encapsulates the frame and looks for a route to the destination. R3 has a connected route to 192.168.2.0/24 out of the GigabitEthernet 0/0 interface. ▪ 9. R3 looks up the ARP table entry for 192.168.2.10 to find the Layer 2 MAC address for PC3. If no entry exists, R3 sends an ARP request out of the GigabitEthernet 0/0 interface, and PC3 responds with an ARP reply, which includes the PC3 MAC address. ▪ 10. R3 encapsulates the packet in a new frame with the MAC address of the GigabitEthernet 0/0 interface as the source Layer 2 address and the MAC address of PC3 as the destination MAC address. ▪ 11. The frame is forwarded out of GigabitEthernet 0/0 interface. The packet arrives on the network interface card (NIC) interface of PC3. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› 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 ‹#› Troubleshoot IPv4 Static and Default Route Configuration Solve a Connectivity Problem ▪ Finding a missing (or misconfigured) route is a relatively straightforward process, if the right tools are used in a methodical manner. ▪ Use the ping command to confirm the destination can’t be reached. ▪ A traceroute would also reveal what is the closest router (or hop) that fails to respond as expected. In this case, the router would then send an Internet Control Message Protocol (ICMP) destination unreachable message back to the source. ▪ The next step is to investigate the routing table. Look for missing or misconfigured routes. ▪ Incorrect static routes are a common cause of routing problems. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 2: Summary ▪ Static routes can be configured with a next-hop IP address, which is commonly the IP address of the nexthop router. ▪ When a next-hop IP address is used, the routing table process must resolve this address to an exit interface. ▪ On point-to-point serial links, it is usually more efficient to configure the static route with an exit interface. ▪ On multi-access networks, such as Ethernet, both a nexthop IP address and an exit interface can be configured on the static route. ▪ Static routes have a default administrative distance of "1". Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 2: Summary (cont.) ▪ A static route is only entered in the routing table if the next-hop IP address can be resolved through an exit interface. ▪ Whether the static route is configured with a next-hop IP address or exit interface, if the exit interface that is used to forward that packet is not in the routing table, the static route is not included in the routing table. ▪ In many cases, several static routes can be configured as a single summary route. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Chapter 2: Summary (cont.) ▪ The ultimate summary route is a default route, configured with a 0.0.0.0 network address and a 0.0.0.0 subnet mask. ▪ If there is not a more specific match in the routing table, the routing table uses the default route to forward the packet to another router. ▪ A floating static route can be configured to back up a main link by manipulating its administrative value. Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#› Presentation_ID © 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential ‹#›