Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 The Routing Table: A Closer Look Routing Protocols and Concepts – Chapter.

Similar presentations


Presentation on theme: "© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 The Routing Table: A Closer Look Routing Protocols and Concepts – Chapter."— Presentation transcript:

1 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 The Routing Table: A Closer Look Routing Protocols and Concepts – Chapter 8 Modified by Tony Chen 04/01/2008

2 ITE PC v4.0 Chapter 1 2 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Notes:  If you see any mistake on my PowerPoint slides or if you have any questions about the materials, please feel free to me at Thanks! Tony Chen College of DuPage Cisco Networking Academy

3 ITE PC v4.0 Chapter 1 3 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Objectives  Describe the various route types found in the routing table structure  Describe the routing table lookup process.  Describe routing behavior in routed networks.

4 ITE PC v4.0 Chapter 1 4 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Introduction  Chapter Focus –Structure of the routing table Will examine the format of the routing table and learn about level 1 and level 2 routes. –Lookup process of the routing table –Classless and classful routing behaviors Cisco IP Routing, by Alex Zinin (ISBN ).

5 ITE PC v4.0 Chapter 1 5 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Lab Topology  3 router setup -R1 and R2 share a common /16 network with /24 subnets. -R2 and R3 are connected by the /24 network. -R3 also has a /24 subnet, which is disconnected, or discontiguous, from the network that R1 and R2 share. In a later section, we will configure the interfaces for R2

6 ITE PC v4.0 Chapter 1 6 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  The figure shows routing table entries come from the following sources -Directly connected networks -Static routes -Dynamic routing protocols

7 ITE PC v4.0 Chapter 1 7 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  The figure shows what happens as the Serial 0/0/1 interface for R2 is configured with the /24 address. – R1 and R3 already have their interfaces configured with the appropriate IP addresses and subnet masks. –We will now configure the interfaces for R2 and use debug ip routing to view the routing table process that is used to add these entries.  As soon as the “no shutdown” command is issued the route is added to routing table debug ip routing

8 ITE PC v4.0 Chapter 1 8 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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

9 ITE PC v4.0 Chapter 1 9 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Level 1 Routes –Have a subnet mask equal to or less than the classful mask of the network address. – /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 network.  Level 1 route can function as –Default route A default route is a static route with the address /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.

10 ITE PC v4.0 Chapter 1 10 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  The level 1 route /24 can be further defined as an ultimate route.  ultimate route includes either: -A next-hop ip address (another path) OR -An exit interface  The directly connected network /24 –It is a level 1 network route because it has a subnet mask that is the same as its classful mask. –This same route is also an ultimate route because it contains the exit interface Serial 0/0/1.

11 ITE PC v4.0 Chapter 1 11 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public  A parent route is a level 1 route –A parent route does not contain any next-hop IP address or exit interface information  When the subnet was added to the routing table, another route, , was also added. –The first entry, /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. Parent and Child Routes

12 ITE PC v4.0 Chapter 1 12 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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. – /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 is directly connected, FastEthernet0/0

13 ITE PC v4.0 Chapter 1 13 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  The parent route contains the The classful network address for our subnet.  Level 2 child routes contain , route source & the network address of the route –Notice that the subnet mask is not included with the subnet, the level 2 child route. The subnet mask for this child route (subnet) is the /24 mask included in its parent route,  Level 2 child routes are also considered ultimate routes –Reason: they contain the next hop address &/or exit interface

14 ITE PC v4.0 Chapter 1 14 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  The figure shows the configuration of the Serial 0/0/0 interface on R2. –The routing table shows two child routes for the same /24 parent route. Both and are members of the same parent route, because they are both members of the /16 classful network

15 ITE PC v4.0 Chapter 1 15 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Both child routes have the same subnet mask -This means the parent route maintains the /24 mask Note: If there is only a single level 2 child route and that route is removed, the level 1 parent route will be automatically deleted. A level 1 parent route exists only when there is at least one level 2 child route. The role of the parent route will be examined when we discuss the route lookup process.

16 ITE PC v4.0 Chapter 1 16 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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.

17 ITE PC v4.0 Chapter 1 17 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Parent & Child Routes: Classless Networks

18 ITE PC v4.0 Chapter 1 18 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Structure  Parent & Child Routes: classful and classless Networks Network Type Parent route’s Classful mask is Displayed Term variably subnetted is seen in parent route in routing table Includes the # of different masks of child routes Subnet mask included with each child route entry Class- ful No Class- less Yes classful classless

19 ITE PC v4.0 Chapter 1 19 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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

20 ITE PC v4.0 Chapter 1 20 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Lookup Process  Longest Match: Level 1 Network Routes –Best match is also known as the longest match –The best match is the one that has the most number of left most bits matching between the destination IP address and the route in the routing table.  For example, in the figure we have a packet destined for Many possible routes could match this packet. Three possible routes are shown that do match this packet: /12, /18, and /26. Of the three routes, /26 has the longest match.

21 ITE PC v4.0 Chapter 1 21 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Lookup Process  Finding the subnet mask used to determine the longest match Scenario: –PC1 pings –Router examines level 1 route for best match –There exist a match between & / 24 –Router forwards packets out s0/0/0

22 ITE PC v4.0 Chapter 1 22 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Lookup Process  The process of matching –1st there must be a match made between the parent route & destination IP If a match is made then an attempt at finding a match between the destination IP and the child route is made. Do at least 16 of the left-most bits of the parent route match the first 16 bits of the packet's destination IP address of ? –The answer, no,

23 ITE PC v4.0 Chapter 1 23 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Lookup Process  Finding a match between packet’s destination IP address and the next route in the routing table –The figure shows a match between the destination IP of and the level one IP of / 24 then packet forwarded out s0/0/0 –Not only does the minimum of 24 bits match, but a total of 30 bits match, as shown in the figure.

24 ITE PC v4.0 Chapter 1 24 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Lookup Process  In the example in the figure, PC1 sends a ping to PC2 at What happens when there is a match with a level 1 parent route?  Before level 2 child routes are examined -There must be a match between classful level one parent route and destination IP address.

25 ITE PC v4.0 Chapter 1 25 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Lookup Process  After the match with parent route has been made Level 2 child routes will be examined for a match -Route lookup process searches for child routes with a match with destination IP

26 ITE PC v4.0 Chapter 1 26 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Table Lookup Process  How a router finds a match with one of the level 2 child routes –First router examines parent routes for a match –If a match exists then: Child routes are examined Child route chosen is the one with the longest match  First, the router examines the parent route for a match.  The router checks the last child route for /24 and finds a match. The first 24 bits do match. The routing table process will use this route, /24, to forward the packet with the destination IP address of out the exit interface of Serial 0/0/0.  R [120/1] via , 00:00:25, Serial0/0/0

27 ITE PC v4.0 Chapter 1 27 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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

28 ITE PC v4.0 Chapter 1 28 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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

29 ITE PC v4.0 Chapter 1 29 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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

30 ITE PC v4.0 Chapter 1 30 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Using the ip classless command (cont.) What is IP Classless?  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".  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 ( ).  What is classful? Classful means that a class A subnet should be shown as x such as  If you show it as , you are breaking its class.  Or, a class B subnet should be shown as x.x such as  If you show it as , you are breaking its class.  Let’s assume RIP knows about  If you break into three, for example to and and , and then give RIP a packet with a destination of , 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 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.

31 ITE PC v4.0 Chapter 1 31 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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

32 ITE PC v4.0 Chapter 1 32 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Behavior  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 –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 “no ip classless”

33 ITE PC v4.0 Chapter 1 33 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Behavior  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, or any other route. “no ip classless”

34 ITE PC v4.0 Chapter 1 34 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Behavior  The routing table process will not use the default route, /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. “no ip classless”

35 ITE PC v4.0 Chapter 1 35 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Behavior  Classless Routing Behavior- ip lassless  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 “ip classless”

36 ITE PC v4.0 Chapter 1 36 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Behavior  Classless Routing Behavior – Search Process  Router begins search process by finding a match between destination IP and parent route After finding the above mentioned match, then there is a search of the child route  There is no match with the level 2 child routes. “ip classless”

37 ITE PC v4.0 Chapter 1 37 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Behavior  If no match is found in child routes of previous slide then –Router continues to search the routing table for a match that may have fewer than 16 bits in the match  The /24 route does not have 24 left-most bits that match the destination IP address. C /24 is directly connected, Serial0/0/1 “ip classless”

38 ITE PC v4.0 Chapter 1 38 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Behavior S* /0 is directly connected, Serial0/0/1  The mask is /0, which means that zero or no bits need to match.  A default route will be the lowest-bit match. In classless routing behavior, if no other route matches, the default route will match. –In this case the router will use the default route, because it is the best match. The packet will be forwarded out the Serial 0/0/1 interface. “ip classless”

39 ITE PC v4.0 Chapter 1 39 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Behavior  What does R3 do with return traffic back to PC2 at ?  In this case, R3 uses the /16 child route and forwards the traffic out Serial 0/0/1 back to R2.

40 ITE PC v4.0 Chapter 1 40 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Routing Behavior  Classful vs. Classless Routing Behavior -It is recommended to use classless routing behavior  Reason: so supernet and default routes can be used whenever needed

41 ITE PC v4.0 Chapter 1 41 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Longest Match  Let's look at the three routes we just installed in the routing table, and see how they look on the router.  router# show ip route.... D /26 [90/ ] via  ( to ) R /24 [120/4] via  ( to ) O /19 [110/229840] via  ( to )....  If a packet arrives on a router interface destined for , which route would the router choose?  If a packet arrives on a router interface destined for , which route would the router choose? Answers are on the next page POP QUIZ

42 ITE PC v4.0 Chapter 1 42 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public Longest Match  Let's look at the three routes we just installed in the routing table, and see how they look on the router.  router# show ip route.... D /26 [90/ ] via  ( to ) R /24 [120/4] via  ( to ) O /19 [110/229840] via  ( to )....  If a packet destined to is directed toward , because falls within the /26 network ( to ). It also falls within the other two routes available, but the /26 has the longest prefix within the routing table (26 bits verses 24 or 19 bits).  if a packet destined for arrives on one of the router's interfaces, it's forwarded to , because doesn't fall within /26 ( through ), but it does fall within the /24 destination ( through ). Again, it also falls into the range covered by /19, but /24 has a longer prefix length

43 ITE PC v4.0 Chapter 1 43 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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

44 ITE PC v4.0 Chapter 1 44 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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

45 ITE PC v4.0 Chapter 1 45 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 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

46 ITE PC v4.0 Chapter 1 46 © 2007 Cisco Systems, Inc. All rights reserved.Cisco Public


Download ppt "© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 The Routing Table: A Closer Look Routing Protocols and Concepts – Chapter."

Similar presentations


Ads by Google