1 / 49

Routing Table

Routing Table. CCNA Exploration Semester 2 Chapter 8. Topics. The routing table Types of route Route lookup Routing behaviour in routed networks no ip classless and ip classless commands IOS 11.3 classless is default. Adding a connected route. Configure IP address on interface

kynan
Télécharger la présentation

Routing Table

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Routing Table CCNA Exploration Semester 2 Chapter 8

  2. Topics • The routing table • Types of route • Route lookup • Routing behaviour in routed networks • no ip classless and ip classless commands • IOS 11.3 classless is default

  3. Adding a connected route • Configure IP address on interface • Give no shutdown command • Directly connected route is put in routing table at once. • Use debug ip routing to see this.

  4. Routing Table Structure • Cisco IP routing table is a hierarchical structure • The reason for this is to speed up lookup process • The hierarchy includes several levels. • level 1 • level 2

  5. Routing Table Structure • Level 1 Routes • Have a subnet mask equal to or less than the classful mask of the network address. • 192.168.1.0/24 is a level 1 network route, because the subnet mask is equal to the network's classful mask. /24 for class C networks, such as the 192.168.1.0 network. • Level 1 route can function as • Default route • A default route is a static route with the address 0.0.0.0/0. • Supernet route • A supernet route is a network address with a mask less than the classful mask. • Network route • A network route is a route that has a subnet mask equal to that of the classful mask. • The source of the level 1 route can be a directly connected network, static route, or a dynamic routing protocol.

  6. Level 1 routes • A route with a subnet mask equal to or less than the classful mask. • 192.168.1.0/24 is a level 1 network route. /24 is the classful mask. • 192.168.128.0/20 is a level 1 supernet route. Less than classful mask. • 0.0.0.0/0 Default route • Can be directly connected, static or dynamic

  7. Ultimate Route • An ultimate route is a route that includes: • either a next-hop IP address (another path) • and/or an exit interface • C 192.168.1.0/24 is directly connected, Serial0/0/1

  8. Parent and Child Routes • A parent route is a level 1 route • A parent routedoes not contain any next-hop IP address or exit interface information • When the 172.16.3.0 subnet was added to the routing table, another route, 172.16.0.0, was also added. • The first entry, 172.16.0.0/24, does not contain any next-hop IP address or exit interface information. • This route is known as a level 1 parent route. • A parent route is actually a heading that indicates the presence of level 2 routes, also known as child routes.

  9. Routing Table Structure • A level 1 parent route is automatically created any time a subnet is added to the routing table. • In other words, a parent route is created whenever a route with a mask greater than the classful mask is entered into the routing table. • 172.16.0.0/24 is subnetted, 1 subnets • A level 2 route is a route that is a subnet of a classful network address. • Child routes are level 2 routes • Child routes are a subnet of a classful network address • C 172.16.3.0 is directly connected, FastEthernet0/0

  10. Parent and child Level 1Parent routeAdded when child route is addedNo exit information Level 2Child routeSubnet of classful network

  11. Parent and child Parent route shows subnet mask used by child route(s). This is shown when all subnets have the same mask.

  12. Routing Table Structure • In classless networks, child routes do not have to share the same subnet mask • Whenever there are two or more child routes with different subnet masks belonging to the same classful network, the routing table presents a slightly different view, which states that this parent network is variably subnetted.

  13. VLSM used (classless) • Parent route shown with default mask, variably subnetted, number of subnets and masks used. • Each child route shown with its own mask.

  14. Routing Table Structure • Parent & Child Routes: Classless Networks

  15. Hierarchy

  16. More than one child route • Parent route can have several child routes. • Parent route is added with first child route. • Parent is deleted if all child routes are deleted.

  17. Routing Table Lookup Process • The Route Lookup Process 1. Examine level 1 routes • If best match a level 1 ultimate route and is not a parent route this route is used to forward packet • If the best match is a level 1 parent route, proceed to Step 2 2. Router examines level 2 (child) routes • If there is a match with level 2 child route then that subnet is used to forward packet • If no match then proceed to Step 3 3. Router determines classful or classless routing behavior • If classful then packet is dropped • If classless then router searches level one supernet and default routes 4. If there exists a level 1 supernet or default route match then Packet is forwarded 5. If not packet is dropped

  18. Route lookup step 1 • Packet addressed to 192.168.3.4 • Examine level 1 routes for best match • Finds match with 192.168.3.0/24 • Ultimate route – forward packet 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.1.4/30 is directly connected, Serial0/0C 172.16.1.8/30 is directly connected, Serial0/1C 172.16.1.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 is directly connected, Serial0/0

  19. Route lookup step 1 • Packet addressed to 172.16.1.6 • Examine level 1 routes for best match • Finds match with 172.16.0.0/16 (parent) • Examine child routes of this parent 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.1.4/30 is directly connected, Serial0/0C 172.16.1.8/30 is directly connected, Serial0/1C 172.16.1.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 is directly connected, Serial0/0

  20. Route lookup step 2 • Packet addressed to 172.16.1.6 • Examine child routes of 172.16.0.0 • Match with 172.16.1.0/24 • Ultimate route – forward packet 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.1.4/30 is directly connected, Serial0/0C 172.16.1.8/30 is directly connected, Serial0/1C 172.16.1.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 is directly connected, Serial0/0

  21. Route lookup step 1 • Packet addressed to 172.16.2.8 • Examine level 1 routes for best match • Finds best match with 172.16.0.0/16 (parent) • Examine child routes of this parent 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.1.4/30 is directly connected, Serial0/0C 172.16.1.8/30 is directly connected, Serial0/1C 172.16.1.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 is directly connected, Serial0/0

  22. Route lookup step 2 • Packet addressed to 172.16.2.8 • Examine child routes of 172.16.0.0 • None of the child routes matches • Are we doing classful or classless routing? 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.1.4/30 is directly connected, Serial0/0C 172.16.1.8/30 is directly connected, Serial0/1C 172.16.1.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 is directly connected, Serial0/0

  23. Route lookup step 3 • Packet addressed to 172.16.2.8 • Classful routing • That’s it – drop the packet 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.1.4/30 is directly connected, Serial0/0C 172.16.1.8/30 is directly connected, Serial0/1C 172.16.1.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 is directly connected, Serial0/0

  24. Route lookup step 4 • Packet addressed to 172.16.2.8 • Classless routing • Check level 1 routes for any other match • Find match with default route and use that 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.1.4/30 is directly connected, Serial0/0C 172.16.1.8/30 is directly connected, Serial0/1C 172.16.1.0/24 is directly connected, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/1S* 0.0.0.0/0 is directly connected, Serial0/0

  25. 10100011.00010000.00000000.00000000 IP PacketDestination Route 1 172.16.0.10 10100011.00010000.00000000.00001010 172.16.0.0/12 Best (longest) match Match 12 bits? Yes

  26. 10100011.00010000.00000000.00000000 10100011.00010000.00000000.00000000 IP PacketDestination Route 1 Route 2 172.16.0.10 10100011.00010000.00000000.00001010 172.16.0.0/12 172.16.0.0/18 Best (longest) match Match 18 bits? Yes - better

  27. 10100011.00010000.00000000.00000000 10100011.00010000.00000000.00000000 10100011.00010000.00000000.00000000 IP PacketDestination Route 1 Route 2 Route 3 172.16.0.10 10100011.00010000.00000000.00001010 172.16.0.0/12 172.16.0.0/18 172.16.0.0/26 Best (longest) match Match 26 bits? Yes – better still

  28. 10100011.00010001.00000000.00000000 IP PacketDestination Route 4 172.16.0.10 10100011.00010000.00000000.00001010 172.17.0.0/16 No match Need to match 16 bits. No. Only the first 15 bits match so no good.

  29. 00000000.00000000.00000000.00000000 IP PacketDestination Default Route 172.16.0.10 10100011.00010000.00000000.00001010 0.0.0.0/0 Default route match 0 bits need to match. Anything can match with the default route but it will always be the least good match

  30. Routing Table Lookup Process • Example: Route Lookup Process with VLSM -The use of VLSM does not change the lookup process -If there is a match between destination IP address and the level 1 parent route then -Level 2 child routes will be searched

  31. Routing Behavior • Classful & classless routing protocols Influence how routing table is populated • Classful & classless routing behaviors Determines how routing table is searched after it is filled

  32. Routing Behavior • Classful Routing Behavior: no ip classless • What happens if there is not a match with any level 2 child routes of the parent? -Router must determine if the routing behavior is classless or classful -If router is utilizing classful routing behavior then Lookup process is terminated and packet is dropped ip classless and no ip classless

  33. Using the ip classless command The "ip classless" command prevents the existence of a single "subnet" route from blocking access via the default route to other subnets of the same old-style network. Default only works with single-homed ISPs…RFC 1879 IP classless command is not easy to understand, we know that. But I bet, after you read the following lines, you will understand what it is all about.  First, you must understand a very simple logic. Here is the logic: • Me and you are on a journey. • If you break my leg, then you must carry me all the way! • If you understand this logic, you will understand "IP classless".

  34. Using the ip classless command (cont) • RIP is telling you: I am classful, if you break my class, then you have to show me every route there is, or I will drop your packet. I will drop it even though there is a default route (0.0.0.0). • What is classful? Classful means that a class A subnet should be shown as x.0.0.0 such as 10.0.0.0 255.0.0.0 • If you show it as 10.44.0.0 255.255.0.0, you are breaking its class. • Or, a class B subnet should be shown as x.x.0.0 255.255.0.0 such as 172.29.0.0 255.255.0.0 • If you show it as 172.29.26.0 255.255.255.0, you are breaking its class.

  35. Using the ip classless command (cont.) • Let’s assume RIP knows about 10.0.0.0 • If you break 10.0.0.0 into three, for example to 10.1.0.0 and 10.2.0.0 and 10.3.0.0, and then give RIP a packet with a destination of 10.4.0.1, RIP will drop it. Why? Why doesn’t RIP send the packet to the default route? • Because RIP told you, if you break my class, then you have to show me every damn route, otherwise I will drop it. Here, you broke RIP's class so you must show him the way to 10.4.0.1 and every other 10.x.x.x route in the universe. Otherwise RIP will drop the packet, even if there is a default route. RIP will not care about your default route or last resort gateway; it will drop your packet. • How do you ask RIP not to drop your packet and send the unknown destinations to the default route, although you have been so mean to him and have broken its class? You tell him: please, please, ip classless! • If no ip classless, drop the packet ….If ip classless, send the packet to the default.

  36. Routing Behavior • ip Classless • Beginning with IOS 11.3, “ip classless” was configured by default • The command “no ip classless” means that the route lookup process uses classful routing table lookups by default. • Classless routing behavior works for -Discontiguous networks And -CIDR supernets

  37. Routing Behavior “no ip classless” • Classful Routing Behavior – Search Process • when classful routing behavior is in effect (no ip classless) the process will not continue searching level 1 routes in the routing table. If a packet doesn't match a child route for the parent network route, then the router drops the packet. • R2 receives a packet destined for PC3 at 172.16.4.10. • Even with the default route configured. • The destination’s subnet mask is a /24 and none of the child routes left most bits match the first 24 bits. This means packet is dropped

  38. Routing Behavior “no ip classless” • Classful Routing Behavior – Search Process • The reason why the router will not search beyond the child routes • At the beginning of the Internet's growth, networks were all classful • This meant an organization could subnet a major network address and “enlighten” all the organization’s routers about the subnetting • Therefore, if the subnet was not in the routing table, the subnet did not exist and packet was dropped • The routing table process will not use the default route, 0.0.0.0/0, or any other route.

  39. Routing Behavior “no ip classless” • The routing table process will not use the default route, 0.0.0.0/0, or any other route. • A common error is to assume that a default route will always be used if the router does not have a better route. • In our example, R2's default route is not examined nor used, although it is a match. • This is often a very surprising result when a network administrator does not understand the difference between classful and classless routing behavior.

  40. Routing Behavior “ip classless” • Classless Routing Behavior- • ip classless • Step 3: If classless routing behavior in effect then, continue searching level 1 supernet routes in the routing table for a match, including the default route, if there is one. • Step 4: Match with supernet or default • Supernet routes Checked first • If a match exists then forward packet • Default routes Checked second • Step 5: If there is no match or no default route then the Packet is dropped

  41. Routing Behavior • Classfulvs. ClasslessRouting Behavior -It is recommended to use classless routing behavior • Reason: so supernet and default routes can be used whenever needed

  42. How do you get to 172.16.2.2?There it is via serial 0/0. There it is, via 172.16.2.2 Recursive lookup reminder Find a route to 172.16.1.0/24

  43. Routing source Routing sources Directly connected networks Static routes Classful routing protocols RIPv1, IGRP Classless routing protocols RIPv2, EIGRP, OSPF, IS-IS Build up routing table Can use several sources

  44. Routing behaviour Routing behaviours No IP classless Classful behaviour IP classless Classless behaviour Searching routing table Can only use one Default since IOS version 11.3

  45. A puzzle • A router has a default route but it still drops packets. • Possible solution: the router is using classful routing behaviour. It will drop packets addressed to subnets that are not in its routing table if the parent network is in the routing table. • Change to classless routing behaviour

  46. Summary Content/structure of a routing table • Routing table entries -Directly connected networks -Static route -Dynamic routing protocols • Routing tables are hierarchical -Level 1 route Have a subnet mask that is less than or equal to classful subnet mask for the network address -Level 2 route These are subnets of a network address

  47. Summary Routing table lookup process • Begins with examining level 1 routes for best match with packet’s destination IP • If the best match = an ultimate route then • -Packet is forwarded -Else- • -Parent route is examined • If parent route & destination IP match then Level 2 (child) routes are examined • Level 2 route examination • If a match between destination IP and child route found then Packet forwarded -Else • If Router is using classful routing behavior then Packet is dropped -Else • If router is using classless routing behavior then • Router searches Level 1 supernet & default routes for a match • If a match is found then Packet if forwarded -Else • Packet is dropped

  48. Summary • Routing behaviors -This refers to how a routing table is searched • Classful routing behavior -Indicated by the use of the no ip classless command -Router will not look beyond child routes for a lesser match • Classless routing behavior -Indicated by the use of the ip classless command -Router will look beyond child routes for a lesser match

  49. The End

More Related