Presentation is loading. Please wait.

Presentation is loading. Please wait.

Route Selection in Cisco Routers. Route Selection One of the intriguing aspects of Cisco routers, especially for those new to routing, is how the router.

Similar presentations


Presentation on theme: "Route Selection in Cisco Routers. Route Selection One of the intriguing aspects of Cisco routers, especially for those new to routing, is how the router."— Presentation transcript:

1 Route Selection in Cisco Routers

2 Route Selection One of the intriguing aspects of Cisco routers, especially for those new to routing, is how the router chooses which route is the best.

3 Route Selection To understand it completely requires some knowledge about the way Cisco routers work.

4 Processes Involved There are three processes involved in building and maintaining the routing table in a Cisco router:

5 Processes Involved There are three processes involved in building and maintaining the routing table in a Cisco router: Various routing processes (Protocols) RIP EIGRP etc.

6 Processes Involved There are three processes involved in building and maintaining the routing table in a Cisco router: Various routing processes (Protocols) RIP EIGRP etc. The routing table itself

7 Processes Involved There are three processes involved in building and maintaining the routing table in a Cisco router: Various routing processes (Protocols) RIP EIGRP etc. The routing table itself The forwarding process

8 Routing Processes Dynamic Routing Protocols IGRP – EIGRP – OSPF – RIP – These processes populate the routing table.

9 The Routing Table Accepts information from the routing processes and also replies to requests for information from the forwarding process.

10 Forwarding Process Requests information from the routing table to make a packet forwarding decisions as to which router interface to forward the packet to.

11 Building the routing table Let's examine the interaction between the routing protocols and the routing table to understand how the routing table is built.

12 Building the routing table As each routing process ( EIGRP, RIP etc..) receives updates and other information, it chooses the best path to any given destination and attempts to install this path into the routing table.

13 Building the routing table For instance, if EIGRP learns of a path towards 10.1.1.0/24, and decides this particular path is the best EIGRP path to this destination, it tries to install the path it has learned into the routing table.

14 Building the routing table The router decides whether or not to install the routes presented by the routing processes based on the …. administrative distance of the route in question.

15 Administrative distance This is the believability of the route trying to be inserted into the routing table.

16 Administrative distance This is the believability of the route trying to be inserted into the routing table. Some Routing Processes are more trustworthy than others.

17 Administrative distance This is the believability of the route trying to be inserted into the routing table. Some Routing Processes are more trustworthy than others. Each Routing Process has a given Administrative Distance as a number.

18 Administrative distance The smaller the number the more believable the route.

19 Administrative distance The smaller the number the more believable the route. If two routing processes try to install the same route into the table one will be rejected.

20

21 Example To understand this better, let's look at an example.

22 Example To understand this better, let's look at an example.

23 Example Assume a router has four routing processes running: EIGRP, OSPF, RIP, and IGRP. Now, all four of these processes have learned of various routes to the 10.168.24.0/24 network, and each has chosen its best path to that network through its internal metrics and processes.

24 Example Each of these four processes attempts to install their route toward 10.168.24.0/24 into the routing table

25 Example The routing processes are each assigned an administrative distance, which is used to decide which route to install.

26

27 Example Since the internal EIGRP route has the best administrative distance, it's installed in the routing table

28 Backup Routes What do the other protocols? RIP, IGRP, and OSPF? do with the routes that weren't installed?

29 Backup Routes What do the other protocols? RIP, IGRP, and OSPF? do with the routes that weren't installed? What if the most preferred route, learned from EIGRP, fails?

30 Backup Routes Cisco IOS ® Software uses two approaches to solve this problem:

31 Backup Routes Cisco IOS ® Software uses two approaches to solve this problem: 1.The first is to have each routing process attempt to install its best routes periodically

32 Backup Routes Cisco IOS ® Software uses two approaches to solve this problem: 1.The first is to have each routing process attempt to install its best routes periodically ( RIP, IGRP ) 2.The second method is to store the route in a database and attempt to install it if the primary route fails. ( EIGRP, OSPF )

33 Prefix Lengths Let's look at another scenario to see how the router handles another common situation? varying prefix lengths.

34 Prefix Lengths Assume, again, that a router has four routing processes running on it, and each process has received these routes: EIGRP (internal): 10.168.32.0/26 RIP: 10.168.32.0/24 OSPF: 10.168.32.0/19

35 Prefix Lengths Which of these routes will be installed in the routing table? EIGRP (internal): 10.168.32.0/26 RIP: 10.168.32.0/24 OSPF: 10.168.32.0/19

36 Prefix Lengths Since EIGRP internal routes have the best administrative distance, it's tempting to assume the first one will be installed.

37 Prefix Lengths Since EIGRP internal routes have the best administrative distance, it's tempting to assume the first one will be installed. However, since each of these routes has a different prefix length (subnet mask), they're considered different destinations, and they will all be installed in the routing table.

38 Making Forwarding Decisions Which routing table entry show I use to get to the required destination ?

39 Making Forwarding Decisions Let's look at the three routes we just installed in the routing table, and see how they look on the router.....

40 Making Forwarding Decisions Pod1_1603#show ip route D 10.168.32.0/26 [90/25789217] via 10.1.1.1 R 10.168.32.0/24 [120/4] via 10.1.1.2 O 10.168.32.0/19 [110/229840] via 10.1.1.3 Identifies which Process installed the route. D = EIGRP, R = RIP, O = OSPF

41 Making Forwarding Decisions Pod1_1603#show ip route D 10.168.32.0/26 [90/25789217] via 10.1.1.1 R 10.168.32.0/24 [120/4] via 10.1.1.2 O 10.168.32.0/19 [110/229840] via 10.1.1.3 Identifies the Admin Distance.

42 Making Forwarding Decisions Pod1_1603#show ip route D 10.168.32.0/26 [90/25789217] via 10.1.1.1 R 10.168.32.0/24 [120/4] via 10.1.1.2 O 10.168.32.0/19 [110/229840] via 10.1.1.3 Identifies the next HOP IP address or Interface to Forward the packet to.

43 Making Forwarding Decisions Pod1_1603#show ip route D 10.168.32.0/26 [90/25789217] via 10.1.1.1 R 10.168.32.0/24 [120/4] via 10.1.1.2 O 10.168.32.0/19 [110/229840] via 10.1.1.3 If a packet arrives on a router interface destined for 10.168.32.1, which route would the router choose?

44 Making Forwarding Decisions Pod1_1603#show ip route D 10.168.32.0/26 [90/25789217] via 10.1.1.1 R 10.168.32.0/24 [120/4] via 10.1.1.2 O 10.168.32.0/19 [110/229840] via 10.1.1.3 It depends on the prefix length, or the number of bits set in the subnet mask. Longer prefixes are always preferred over shorter ones when forwarding a packet.

45 Making Forwarding Decisions Pod1_1603#show ip route D 10.168.32.0/26 [90/25789217] via 10.1.1.1 R 10.168.32.0/24 [120/4] via 10.1.1.2 O 10.168.32.0/19 [110/229840] via 10.1.1.3 It depends on the prefix length, or the number of bits set in the subnet mask. Longer prefixes are always preferred over shorter ones when forwarding a packet.

46 Making Forwarding Decisions Pod1_1603#show ip route D 10.168.32.0/26 [90/25789217] via 10.1.1.1 R 10.168.32.0/24 [120/4] via 10.1.1.2 O 10.168.32.0/19 [110/229840] via 10.1.1.3 Before I tell you which route is preferred lets break down each route to see what it is describing !

47 Routing table entries D 10.168.32.0/26 /26 = 255.255.255.192 256 – 192 = 64 So networks are 0, 64, 128, 192 This route is describing Subnetwork 0 10.168.32.0/26 IP host addresses covered = ( 1 thru 63 )

48 Routing table entries R10.168.32.0/24 /24 = 255.255.255.0 256 – 255 = 1 So networks are 0,1, 2, 3, 4 in 3 rd Octet This route is describing Network 10.168.32.0 IP host addresses covered = ( 1 thru 255 )

49 Routing table entries O 10.168.32.0/19 /19 = 255.255.224.0 256 – 224 = 32 So networks are 0,32,64,96,etc.. in 3 rd Octet This route is describing Network 10.168.32.0 IP host addresses covered = ( 1 thru 255 )

50 Back to our Example If a packet arrives on a router interface destined for 10.168.32.1, which route would the router choose? /26IP host addresses covered = ( 1 thru 63 ) /24IP host addresses covered = ( 1 thru 255 ) /19IP host addresses covered = ( 1 thru 255 )

51 Back to our Example If a packet arrives on a router interface destined for 10.168.32.1, which route would the router choose? /26IP host addresses covered = ( 1 thru 63 ) /24IP host addresses covered = ( 1 thru 255 ) /19IP host addresses covered = ( 1 thru 255 ) This is for Host 1 on network 10.168.32.0

52 Back to our Example If a packet arrives on a router interface destined for 10.168.32.1, which route would the router choose? /26IP host addresses covered = ( 1 thru 63 ) /24IP host addresses covered = ( 1 thru 255 ) /19IP host addresses covered = ( 1 thru 255 ) This is for Host 1 on network 10.168.32.0 All entries cover this host, so the longest Prefix is used.

53 Back to our Example If a packet arrives on a router interface destined for 10.168.32.100, which route would the router choose? /26IP host addresses covered = ( 1 thru 63 ) /24IP host addresses covered = ( 1 thru 255 ) /19IP host addresses covered = ( 1 thru 255 ) This is for Host 100 on network 10.168.32.0

54 Back to our Example If a packet arrives on a router interface destined for 10.168.32.100, which route would the router choose? /26IP host addresses covered = ( 1 thru 63 ) /24IP host addresses covered = ( 1 thru 255 ) /19IP host addresses covered = ( 1 thru 255 ) This is for Host 100 on network 10.168.32.0 /26 Does not cover this host address ( 10.168.32.64 / 26 now this does !!!!! But that’s not in the table )

55 Back to our Example If a packet arrives on a router interface destined for 10.168.32.100, which route would the router choose? /24IP host addresses covered = ( 1 thru 255 ) /19IP host addresses covered = ( 1 thru 255 ) This is for Host 100 on network 10.168.32.0 Both cover host 100 So longest Prefix is used = /24

56 Back to our Example If a packet arrives on a router interface destined for 10.168.32.100, which route would the router choose? /24IP host addresses covered = ( 1 thru 255 ) /19IP host addresses covered = ( 1 thru 255 ) This is for Host 100 on network 10.168.32.0 Both cover host 100 So longest Prefix is used = /24

57 Conclusion These examples are to make you think and to examine just what the routing table entry is describing.

58 Conclusion Its tempting to just go for the Longest prefix

59 Conclusion That’s OK if the longest prefix describes your host !!!!

60 IP Classless Where the ip classless configuration command falls within the routing and forwarding processes is often confusing.

61 IP Classless In reality, IP classless only affects the operation of the forwarding processes in IOS; it doesn't affect the way the routing table is built.

62 IP Classless If IP classless isn't configured (using the no ip classless command), the router won't forward packets to subnets it does not specifically know about !!!! As an example, let's again place three routes in the routing table and route packets through the router

63 IP Classless router#show ip route.... 172.30.0.0/16 is variably subnetted, 2 subnets, 2 masks D 172.30.32.0/20 [90/4879540] via 10.1.1.2 D 172.30.32.0/24 [90/25789217] via 10.1.1.1 S* 0.0.0.0/0 [1/0] via 10.1.1.3

64 IP Classless Remembering that the 172.30.32.0/24 network = Addresses 172.30.32.1 through 172.30.32.255 ( /24 = Network bits = 255.255.255.0 ) ( Networks increment in 1’s ) ( As such just one network is described )

65 IP Classless Remembering that the 172.30.32.0/24 network = Addresses 172.30.32.1 through 172.30.32.255 ( /24 = Network bits = 255.255.255.0 ) ( Networks increment in 1’s ) ( As such just one network is described )

66 IP Classless Remembering that the 172.30.32.0/24 network = Addresses 172.30.32.0 through 172.30.32.255 ( /24 = Network bits = 255.255.255.0 ) ( Networks increment in 1’s ) ( As such just one network is described )

67 IP Classless and the 172.30.32.0/20 network includes the addresses 172.30.32.0 through 172.30.47.255 ( /20 = 255.255.240.0 ) ( Networks increment in 16’s ) Networks 0,16,32,48,64 etc….. This mask therefore describes networks 32 - 47

68 NO IP Classless Finally the routing table entry 0.0.0.0/0 Is the DEFAULT route to take However the NO IP CLASSLESS command affects how this works.

69 NO IP Classless You only take the Default route for a subnet if your table knows of NO other subnet for the CLASSFULL MAJOR NETWORK

70 NO IP Classless We can try switching three packets through this routing table and see what the results are. D 172.30.32.0/20 [90/4879540] via 10.1.1.2 D 172.30.32.0/24 [90/25789217]via 10.1.1.1 S* 0.0.0.0/0 [1/0] via 10.1.1.3

71 NO IP Classless A packet destined to 172.30.32.1 is forwarded to 10.1.1.1, since this is the longest prefix match. D 172.30.32.0/20 [90/4879540] via 10.1.1.2 D 172.30.32.0/24 [90/25789217]via 10.1.1.1 S* 0.0.0.0/0 [1/0] via 10.1.1.3

72 NO IP Classless A packet destined to 172.30.33.1 is forwarded to 10.1.1.2, since this is the longest prefix match. D 172.30.32.0/20 [90/4879540] via 10.1.1.2 D 172.30.32.0/24 [90/25789217]via 10.1.1.1 S* 0.0.0.0/0 [1/0] via 10.1.1.3

73 NO IP Classless A packet destined to 10.168.10.1 is forwarded to 10.1.1.3; since this network doesn't exist in the routing table, this packet is forwarded to the default route. D 172.30.32.0/20 [90/4879540] via 10.1.1.2 D 172.30.32.0/24 [90/25789217]via 10.1.1.1 S* 0.0.0.0/0 [1/0] via 10.1.1.3

74 NO IP Classless A packet destined to 172.30.254.1 is dropped. D 172.30.32.0/20 [90/4879540] via 10.1.1.2 D 172.30.32.0/24 [90/25789217]via 10.1.1.1 S* 0.0.0.0/0 [1/0] via 10.1.1.3

75 NO IP Classless A packet destined to 172.30.254.1 is dropped. Because No table entry described this route IP CLASSLESS will not allow the default route to be taken, because we know some routes to the MAJOR network 172.30.0.0 So its dropped !!

76 No IP Classless

77

78 Blocks access to any 10.x.x.x subnet in the cloud but allows internet access to any other Major Network / Subnetwork.

79 Lets Break and then attempt LAB 4


Download ppt "Route Selection in Cisco Routers. Route Selection One of the intriguing aspects of Cisco routers, especially for those new to routing, is how the router."

Similar presentations


Ads by Google