Cisco Routing Concepts (Part 1) PDF
Document Details
Uploaded by HumaneBarbizonSchool3912
جامعة الدلتا التكنولوجية
Tags
Summary
This document provides an overview of routing concepts, focusing on how routers function and make forwarding decisions. It covers various aspects such as router functions, path determination, and packet forwarding, providing essential information for understanding internetwork communications in a networking context.
Full Transcript
Routing Concepts (Part 1) Module Objectives Module Title: Routing Concepts Module Objective: Explain how routers use information in packets to make forwarding decisions. Topic Title Topic Objective Router Functions and Structure Explain the functions of routers...
Routing Concepts (Part 1) Module Objectives Module Title: Routing Concepts Module Objective: Explain how routers use information in packets to make forwarding decisions. Topic Title Topic Objective Router Functions and Structure Explain the functions of routers and its structure. Path Determination Explain how routers determine the best path. Packet Forwarding Explain how routers forward packets to the destination. Basic Router Configuration Review Configure basic settings on a router. IP Routing Table Describe the structure of a routing table. Static and Dynamic Routing Compare static and dynamic routing concepts. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2 Functions and Structure © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3 Functions of a Router Why Routing? ▪ The router is responsible for the routing of traffic between networks. ▪ When a packet arrives on a router interface, the router uses its routing table to determine how to reach the destination network. ▪ The destination of the IP packet might be a web server in another country or an email server on the local area network. ▪ It is the responsibility of routers to deliver those packets efficiently. ▪ The effectiveness of internetwork communications depends, to a large degree, on the ability of routers to forward packets in the most efficient way possible. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4 Functions of a Router Why Routing? Layer 3 devices ▪ A router connects multiple networks: Interfaces on different IP networks © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5 Routers Determine the Best Path IP Packet enters router’s Ethernet interface. Router examines the packet’s destination IP address. Router searches for a best match between packet’s destination IP address and network address in routing table. Using the exit-interface in the route, the packet is forwarded to the next router or the final destination. ▪ Routing table Determines best path. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Best match between destination IP address and network address in routing table 6 Router Functions Routers Are Computers ▪ CPU - Executes operating system instructions ▪ Different Memory Types © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7 Router Functions Routers Are Computers Router physical characteristics © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8 Router Functions Routers Are Computers Ports and Interfaces ▪ Port - normally means one of the management ports used for administrative access ▪ Interface normally refers to interfaces that are capable of sending and receiving user traffic. ▪ Note: However, these terms are often used interchangeably in the industry and even with IOS output. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9 Router Functions Routers Are Computers Management Ports Console port Auxiliary (AUX) port Terminal ▪Not all routers have auxiliary PC running terminal emulator software ports. ▪At times, can be used similarly ▪ No need for network access to a console port ▪ Used for initial configuration ▪Can also be used to attach a © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential modem. 10 Router Functions Routers Are Computers Router Interfaces ▪ Interfaces - Receive and forward packets. Various types of networks Different types of media and connectors. Different types of interfaces. ▪ Fast Ethernet interfaces - LANs ▪ Serial interfaces - WAN connections including T1, DSL, and ISDN © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11 Router Interfaces FastEthernet 0/0 MAC: 0c00-41cc-ae12 10.1.0.1/16 FastEthernet 0/0 MAC: 0c00-3a44-190a 192.168.1.1/24 Serial 0/0 Serial 0/1 172.16.1.1/24 172.16.1.2/24 ▪ Router Interface: Different network IP address and subnet mask of that network ▪ Cisco IOS will not allow two active interfaces on the same router to belong © 2016 to the Cisco and/or its affiliates. same All rights network. reserved. Cisco Confidential 12 Router Functions Routers Are Computers LAN Interfaces Ethernet and Fast Ethernet interfaces ▪ Connects the router to the LAN Layer 2 MAC address Participates in the Ethernet Address Resolution Protocol (ARP): Maintains ARP cache for that interface Sends ARP requests when needed Responds with ARP replies when required ▪ Typically an RJ-45 jack (UTP). Router to switch: straight-through cable Router to router: crossover cable © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13 Router Functions Routers Are Computers WAN Interfaces ▪ Point-to-Point, ISDN, and Frame Relay interfaces ▪ Connects routers to external networks. ▪ The Layer 2 encapsulation can be different types including: PPP Frame Relay HDLC (High-Level Data Link Control). ▪ Note: MAC addresses are used only on Ethernet interfaces and are not on WAN interfaces. ▪ Layer 2 WAN encapsulation types and addresses are covered in a later © 2016 Cisco and/or its affiliates. All rights reserved. course. Cisco Confidential 14 Router Interfaces © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15 Router Functions Routers Are Computers Routers Operate at Layers 1, 2, and 3 © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16 Router Functions Routers Are Computers Cisco IOS - Internetwork Operating System ▪ Responsible for managing the hardware and software resources: Allocating memory Managing processes Security Managing file systems ▪ Many different IOS images. ▪ An IOS image is a file that contains the entire IOS for that router. Router model IOS features ▪ Example IPv6 or a routing protocol such as Intermediate System–to–Intermediate System (IS-IS). © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17 Router Functions Routers Are Computers ▪When you turn the router on, it runs through the following boot process. ▪The Power-On Self Test (POST) checks the router’s Router Bootup Process hardware. When the POST completes successfully, the System OK LED indicator comes on. ▪The router checks the configuration register to identify where to load the IOS image from. ▪A setting of 0x2102 means that the router will use information in the startup-config file to locate the IOS image. ▪If the startup-config file is missing or does not specify a location, it will check the following locations for the IOS image: 1. Flash (the default location) 2. TFTP server 3. ROM (used if no other source is found) ▪The router loads the configuration file into RAM (which configures the router). The router can load a configuration file from: 1. NVRAM (startup-configuration file) 2. TFTP server ▪If a configuration file is not found, the router starts in setup mode. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18 Exercise Where is the permanent configuration file stored used during boot-up? NVRAM Where is the diagnostics software stored executed by hardware modules? ROM Where is the backup (partial) copy of the IOS stored? ROM Where is IOS permanently stored before it is copied into RAM? FLASH Where are the bootsystem commands stored which are used to locate NVRAM the IOS? running-config startup-config IOS Bootup program IOS (running) ios (partial) © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19 IP Routing Table © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20 IP Routing Table 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 source for each route in the routing table is identified by a code. Common codes include the following: L - Identifies the address assigned to a router interface. 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. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21 IP Routing Table Routing Table Entries 1. Route source - This identifies how the route was learned. 2. Destination network (prefix and prefix length) - This identifies the address of the remote network. 3. Administrative distance - This identifies the trustworthiness of the route source. Lower values indicate preferred route source. 4. Metric - This identifies the value assigned to reach the remote network. Lower values indicate preferred routes. 5. Next-hop - This identifies the IP address of the next router to which the packet would be forwarded. 6. Route timestamp - This identifies how much time has passed since the route was learned. Note: The prefix length of the destination 7. Exit interface - This identifies the egress interface to network specifies the minimum number of far- use for outgoing packets to reach their final left bits that must match between the IP destination. address of the packet and the destination network (prefix) for this route to be used. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22 IP Routing Table Directly Connected Networks To learn about any remote networks, the router 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 ▪For IPv4 local routes the prefix length is /32 and for IPv6 local contains a network prefix and prefix routes the prefix length is /128. length. ▪This means the destination IP address of the packet must match The routing table also contains a all the bits in the local route for this route to be a match. local route for each of its directly ▪The purpose of the local route is to efficiently determine when it connected networks, indicated by receives a packet for the interface instead of a packet that needs © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23 the status code of L. to be forwarded. IP Routing Table 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. ❑They are not automatically updated and must be manually reconfigured if the network topology changes. ❑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 © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24 only one neighbor. IP Routing Table Static Routes in the IP Routing Table ❑The topology in the figure is simplified to show only one LAN attached to each router. ❑The figure shows IPv4 and IPv6 static routes configured on R1 to reach the 10.0.4.0/24 and 2001:db8:acad:4::/64 networks on R2. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25 IP Routing Table 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. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26 IP Routing Table Dynamic Routes in the Routing Table ❑OSPF is now being used in our sample topology to dynamically learn all the networks connected to R1 and R2. ❑ The routing table 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. R1# show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area (output omitted for brevity) O 10.0.4.0/24 [110/50] via 10.0.3.2, 00:24:22, Serial0/1/1 O 10.0.5.0/24 [110/50] via 10.0.3.2, 00:24:15, Serial0/1/1 R1# show ipv6 route IPv6 Routing Table - default - 10 entries (Output omitted) NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter O 2001:DB8:ACAD:4::/64 [110/50] via FE80::2:C, Serial0/1/1 O 2001:DB8:ACAD:5::/64 [110/50] © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27 via FE80::2:C, Serial0/1/1 IP Routing Table Default Route ❑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. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 28 IP Routing Table Structure of an IPv4 Routing Table ❑IPv4 was standardized using the now obsolete classful addressing architecture. ❑The IPv4 routing table is organized using this same classful structure. ❑Although the lookup process no longer uses classes, the structure of the IPv4 routing table still retains in this format. ❑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. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 29 IP Routing Table Routing Table Terms ❑The routing table is actually a hierarchical structure that is used to speed up the lookup process when locating routes and forwarding packets. ❑Within this structure, the hierarchy includes several levels. ❑Routes are discussed in terms of: ▪ Ultimate route ▪ Level 1 route ▪ Level 1 parent route ▪ Level 2 child routes © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30 IP Routing Table Ultimate Route ▪ An ultimate route is a routing table entry that contains either a next- hop IP address or an exit interface. ▪ Directly connected, dynamically learned, and link local routes are ultimate routes. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 31 IP Routing Table Level 1 Route ▪A level 1 route is a route with a subnet mask equal to or less than the classful mask of the network address. ▪Therefore, a level 1 route can be: Network route - A network route that has a subnet mask equal to that of the classful mask. Supernet route - A supernet route is a network address with a mask less than the classful mask, for example, a summary address. Default route - A default route is a static route with the address 0.0.0.0/0. ▪The source of the level 1 route can be a directly connected network, static route, or a dynamic routing protocol. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 32 IP Routing Table Level 1 Parent Route ▪level 1 parent route is a level 1 network route that is subnetted. ▪A parent route can never be an ultimate route. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 33 IP Routing Table Level 2 Child Route ▪level 2 child route is a route that is a subnet of a classful network address. ▪A level 1 parent route is a level 1 network route that is subnetted. ▪A level 1 parent routes contain level 2 child routes. ▪Like a level 1 route, the source of a level 2 route can be a directly connected network, a static route, or a dynamically learned route. ▪Level 2 child routes are also ultimate routes. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 34 Example © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 35 IP Routing Table Route Lookup Process 1. If the best match is a level 1 ultimate route, then this route is used to forward the packet. 2. If the best match is a level 1 parent route, proceed to the next step. 3. The router examines child routes (the subnet routes) of the parent route for a best match. 4. If there is a match with a level 2 child route, that subnet is used to forward the packet. 5. If there is not a match with any of the level 2 child routes, proceed to the next step. 6. The router continues searching level 1 supernet routes in the routing table for a match, including the default route, if there is one. 7. If there is now a lesser match with a level 1 supernet or default routes, the router uses that route to forward the packet. 8. If there is not a match with any route in the routing table, the router drops the packet. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 36 IP Routing Table Route Lookup Process © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 37 IP Routing Table Structure of an IPv6 Routing Table R1# show ipv6 route The concept of (output omitted for brevity) classful OE2 ::/0 [110/1], tag 2 addressing was via FE80::2:C, Serial0/0/1 C 2001:DB8:ACAD:1::/64 [0/0] never part of via GigabitEthernet0/0/0, directly connected IPv6, so the L 2001:DB8:ACAD:1::1/128 [0/0] structure of an via GigabitEthernet0/0/0, receive C 2001:DB8:ACAD:2::/64 [0/0] IPv6 routing via GigabitEthernet0/0/1, directly connected table is very L 2001:DB8:ACAD:2::1/128 [0/0] straight via GigabitEthernet0/0/1, receive C 2001:DB8:ACAD:3::/64 [0/0] forward. Every via Serial0/1/1, directly connected IPv6 route entry L 2001:DB8:ACAD:3::1/128 [0/0] is formatted via Serial0/1/1, receive O 2001:DB8:ACAD:4::/64 [110/50] and aligned the via FE80::2:C, Serial0/1/1 same way. O 2001:DB8:ACAD:5::/64 [110/50] via FE80::2:C, Serial0/1/1 L FF00::/8 [0/0] via Null0, receive R1# © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 38 IP Routing Table Administrative Distance ❑A route entry for a specific network address (prefix and prefix length) can only appear once in the routing table. Administrative Route Source ❑ However, it is possible that the routing table learns about the Distance same network address from more than one routing source. Directly connected 0 ❑Except for very specific circumstances, only one dynamic Static route 1 routing protocol should be implemented on a router. EIGRP summary route 5 ❑Each routing protocol may decide on a different path to reach the destination based on the metric of that routing protocol. External BGP 20 Internal EIGRP 90 ❑This raises a few questions, such as the following: OSPF 110 ▪ How does the router know which source to use? IS-IS 115 ▪ Which route should it install in the routing table? RIP 120 External EIGRP 170 ❑Cisco IOS uses what is known as the administrative distance Internal BGP 200 (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. © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 39