Top Banner

of 55

CA Ex S2M8 the Routing Table

Apr 06, 2018

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/3/2019 CA Ex S2M8 the Routing Table

    1/55

    Chapter 8:

    The Routing Table: A Closer Look

    CCNA Ex loration version 4.0

    Please purchase apersonal license.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    2/55

    Objectives

    Describe the various route types found in the routingtable structure

    Describe the routing table lookup process. Describe routing behavior in routed networks.

    Hc vin mng Bach Khoa - Website: www.bkacad.com 2

  • 8/3/2019 CA Ex S2M8 the Routing Table

    3/55

    Routing Table Structure

    Hc vin mng Bach Khoa - Website: www.bkacad.com 3

  • 8/3/2019 CA Ex S2M8 the Routing Table

    4/55

    Lab Topologies

    Hc vin mng Bach Khoa - Website: www.bkacad.com 4

  • 8/3/2019 CA Ex S2M8 the Routing Table

    5/55

    Routing Table Structure

    Hc vin mng Bach Khoa - Website: www.bkacad.com 5

    Routing table entries come from the following sources Directly connected networks

    Static routes

    Dynamic routing protocols

    The source of the route does not affect the structure of the routing table. Although the routing table incorporates both classful and classless addressing,

    the overall structure is still built around this classful scheme.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    6/55

    Routing Table StructureRIP v1Classful address

    RIP v2

    Classful address

    Hc vin mng Bach Khoa - Website: www.bkacad.com 6

    RIP v2

    Classless address

  • 8/3/2019 CA Ex S2M8 the Routing Table

    7/55

    Routing Table Structure

    Hc vin mng Bach Khoa - Website: www.bkacad.com 7

    Level 1 Routes

    As soon as the no shutdown command is issued the routeis added to routing table

  • 8/3/2019 CA Ex S2M8 the Routing Table

    8/55

    Routing Table Structure

    Cisco IP routing tableis a hierarchicalstructure

    The reason for this

    Hc vin mng Bach Khoa - Website: www.bkacad.com 8

    lookup process

  • 8/3/2019 CA Ex S2M8 the Routing Table

    9/55

    A level 1 route is a route with a subnet mask equal to or less thanthe classful mask of the network address. 192.168.1.0/24 is a level1 network route, because the subnet mask is equal to thenetwork's classful mask. /24 is the classful mask for class Cnetworks, such as the 192.168.1.0 network.

    Routing Table Structure

    Hc vin mng Bach Khoa - Website: www.bkacad.com 9

    A level 1 route can function as a: 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.

    A network route can also be a parent route.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    10/55

    Routing Table Structure

    Hc vin mng Bach Khoa - Website: www.bkacad.com 10

    Ultimate Route

    The level 1 route 192.168.1.0/24 can be further defined as anultimate route.

    An ultimate route is a route that includes: either a next-hop IP address (another path)

    and/or an exit interface

  • 8/3/2019 CA Ex S2M8 the Routing Table

    11/55

    Parent and ChildRoutes

    A parent route is alevel 1 route

    A parent route does

    -

    Routing Table Structure

    Hc vin mng Bach Khoa - Website: www.bkacad.com 11

    hop IP address or exitinterface information

    The subnet is thelevel 2 child route of

    the parent route.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    12/55

    A level 1 parent route is

    automatically created any timea subnet is added to the routingtable.

    A parent route is created

    Parent and Child Routes: Classful Networks

    Hc vin mng Bach Khoa - Website: www.bkacad.com 12

    greater than the classful maskis entered into the routing table.

    Child routes Child routes are level 2

    routes Child routes are a subnet ofa classful network address

  • 8/3/2019 CA Ex S2M8 the Routing Table

    13/55

    Parent and Child Routes: Classful Networks

    Hc vin mng Bach Khoa - Website: www.bkacad.com 13

    Level 2 child routes are also considered ultimate routes because theywill contain the next-hop IP address and/or exit interface.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    14/55

    Parent and Child Routes: Classful Networks

    Hc vin mng Bach Khoa - Website: www.bkacad.com 14

    Both child routes have the same subnet mask

    This means the parent route maintains the /24 mask

  • 8/3/2019 CA Ex S2M8 the Routing Table

    15/55

    Parent and Child Routes: Classless Networks

    Hc vin mng Bach Khoa - Website: www.bkacad.com 15

    In classless networks, child routes do not have to share the same subnetmask.

    Regardless of the addressing scheme used by the network (classless orclassful), the routing table will use a classful scheme.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    16/55

    Parent and Child Routes: Classless Networks

    Hc vin mng Bach Khoa - Website: www.bkacad.com 16

  • 8/3/2019 CA Ex S2M8 the Routing Table

    17/55

    NetworkParent routesClassful mask

    Term variablysubnetted is

    seen in parent

    Includes the #

    of different

    Subnet maskincludedwith each

    Routing Table Structure

    Hc vin mng Bach Khoa - Website: www.bkacad.com 17

    is displayed route in routing

    table

    routeschild route

    entry

    Classful No No No No

    Classless Yes Yes Yes Yes

  • 8/3/2019 CA Ex S2M8 the Routing Table

    18/55

    Routing Table Lookup Process

    Hc vin mng Bach Khoa - Website: www.bkacad.com 18

  • 8/3/2019 CA Ex S2M8 the Routing Table

    19/55

  • 8/3/2019 CA Ex S2M8 the Routing Table

    20/55

    Result of Routing

    Hc vin mng Bach Khoa - Website: www.bkacad.com 20

  • 8/3/2019 CA Ex S2M8 the Routing Table

    21/55

    Routing Table Lookup Process

    Let's examine in more depth how the routers determinethe best routes to use when sending packets and whyclassful routing protocols do not work with discontiguous

    designs. We will consider:

    1. What happens when a router receives an IP packet,

    Hc vin mng Bach Khoa - Website: www.bkacad.com 21

    ,address up in the routing table?

    2. How does the router decide which route in the routingtable is the best match?

    3. What effect does the subnet mask have on the routingtable lookup process?

    4. How does the router decide whether or not to use asupernet or default route if a better match is not found?

  • 8/3/2019 CA Ex S2M8 the Routing Table

    22/55

    Routing Table Lookup Process

    Examine level 1 routes

    If best match a level 1 ultimate route and is not a parentroute this route is used to forward packet

    If the best match is a level 1 parent route examines level 2routes

    Router examines level 2 (child) routes

    If there is a match with level 2 child route then that subnet

    Hc vin mng Bach Khoa - Website: www.bkacad.com 22

    is used to forward packet If no match then

    Determine routing behavior type

    Router determines classful or classless routing behavior

    If classful then packet is dropped If classless then router searches level one supernet and

    default routes

    If there exists a level 1 supernet or default route match thenpacket is forwarded. If not packet is dropped.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    23/55

    Steps in the Route Lookup Process: 8.2.1.2

    Hc vin mng Bach Khoa - Website: www.bkacad.com 23

  • 8/3/2019 CA Ex S2M8 the Routing Table

    24/55

    Longest Match: Level 1 Network Routes

    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 routein the routing table.

    Hc vin mng Bach Khoa - Website: www.bkacad.com 24

  • 8/3/2019 CA Ex S2M8 the Routing Table

    25/55

    Longest Match: Level 1 Network Routes

    Finding the subnet maskused to determine the

    longest match

    Scenario:

    PC1 pings 192.168.1.2

    Router examines level 1

    Hc vin mng Bach Khoa - Website: www.bkacad.com 25

    route for best match

    There exist a matchbetween192.168.1.2 &192.168.1.0 / 24

    Router forwards packetsout s0/0/0

  • 8/3/2019 CA Ex S2M8 the Routing Table

    26/55

    Longest Match: Level 1 Network Routes

    Hc vin mng Bach Khoa - Website: www.bkacad.com 26

  • 8/3/2019 CA Ex S2M8 the Routing Table

    27/55

    Longest Match: Level 1 Network Routes

    Hc vin mng Bach Khoa - Website: www.bkacad.com 27

  • 8/3/2019 CA Ex S2M8 the Routing Table

    28/55

    Longest Match: Level 1 Network Routes

    Hc vin mng Bach Khoa - Website: www.bkacad.com 28

    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 matchbetween the destination IP and the child route is made.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    29/55

    Longest Match: Level 1 Network Routes

    Hc vin mng Bach Khoa - Website: www.bkacad.com 29

    Finding a match between packets destination IP address and thenext route in the routing table

    The figure shows a match between the destination IP of

    192.168.1.0 and the level one IP of 192.168.1.0 / 24 then packet

    forwarded out s0/0/0

  • 8/3/2019 CA Ex S2M8 the Routing Table

    30/55

    Longest Match: Level 1 Parent and Level 2 Child Routes

    Hc vin mng Bach Khoa - Website: www.bkacad.com 30

    Level 1 Parent & Level 2 Child Routes

    Before level 2 child routes are examined, there must be amatch between classful level one parent route and

    destination IP address.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    31/55

    Longest Match: Level 1 Parent and Level 2 Child Routes

    After the match with parent route has been made Level 2 childroutes will be examined for a match Route lookup process searches for child routes with a match

    with destination IP

    Hc vin mng Bach Khoa - Website: www.bkacad.com 31

  • 8/3/2019 CA Ex S2M8 the Routing Table

    32/55

    Longest Match: Level 1 Parent and Level 2 Child Routes

    Hc vin mng Bach Khoa - Website: www.bkacad.com 32

  • 8/3/2019 CA Ex S2M8 the Routing Table

    33/55

    Longest Match: Level 1 Parent and Level 2 Child Routes

    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

    Destination of172.16.3.10 10101100 00010000 00000011 00001010

    Hc vin mng Bach Khoa - Website: www.bkacad.com 33

    Matches Parent Route23rd bit does not match. First 24 bit

    much match next route entry

    24rd bit does not match. First 24 bit

    much match next route entryFirst 24 bits match

    IP Packet

    Level 1 ParentRoute

    172.16.0.0/16 10101100 00010000 00000000 00000000

    Level 2 ChildRoute

    172.16.1.0/24 10101100 00010000 00000001 00000000

    Level 2 Child

    Route 172.16.2.0/24 10101100 00010000 00000010 00000000Level 2 Child

    Route172.16.3.0/24 10101100 00010000 00000011 00000000

  • 8/3/2019 CA Ex S2M8 the Routing Table

    34/55

    Longest Match: Level 1 Parent and Level 2 Child Routes

    Example: Route LookupProcess with VLSM

    The use of VLSM does notchange the lookupprocess

    Hc vin mng Bach Khoa - Website: www.bkacad.com 34

    If there is a matchbetween destination IP

    address and the level 1parent route then

    Level 2 child routes will besearched

  • 8/3/2019 CA Ex S2M8 the Routing Table

    35/55

    Routing Behavior

    Hc vin mng Bach Khoa - Website: www.bkacad.com 35

  • 8/3/2019 CA Ex S2M8 the Routing Table

    36/55

    Classful and Classless Routing Behavior

    Hc vin mng Bach Khoa - Website: www.bkacad.com 36

    Classful & classless routingprotocols

    Influence how routing table is

    populated Classful & classless routing

    behaviors

    Determines how routing table is

    searched after it is filled

  • 8/3/2019 CA Ex S2M8 the Routing Table

    37/55

    Classful and Classless Routing Behavior

    Hc vin mng Bach Khoa - Website: www.bkacad.com 37

  • 8/3/2019 CA Ex S2M8 the Routing Table

    38/55

    Classful Routing Behavior: no ip classless

    What happens if thereis not a match with anylevel 2 child routes of

    the parent? Router must determine

    if the routing behavioris classless or classful

    Hc vin mng Bach Khoa - Website: www.bkacad.com 38

    If router is utilizingclassful routingbehavior then lookupprocess is terminatedand packet is dropped

    The commands no ip classlessand ipclasslessare global configuration

    commands and can be viewed bytyping show running-config.

    In IOS versions 11.3 and later, thecommand ip classlessis the default,implementing a classless route lookupprocess.

  • 8/3/2019 CA Ex S2M8 the Routing Table

    39/55

    Classful Routing Behavior: no ip classless

    Hc vin mng Bach Khoa - Website: www.bkacad.com 39

  • 8/3/2019 CA Ex S2M8 the Routing Table

    40/55

    Classful Routing Behavior Search Process

    An example of when classful routing behavior is ineffect and why the router drops the Packet

    The destinations subnet mask is a /24 and none of

    the child routes left most bits match the first 24 bits.This means packet is dropped

    Hc vin mng Bach Khoa - Website: www.bkacad.com 40

  • 8/3/2019 CA Ex S2M8 the Routing Table

    41/55

    Classful Routing Behavior Search Process

    Hc vin mng Bach Khoa - Website: www.bkacad.com 41

    First 24 bits must match

  • 8/3/2019 CA Ex S2M8 the Routing Table

    42/55

    Classful Routing Behavior Search Process

    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 beused if the router does not have a better route. In our example,R2's default route is not examined nor used, although it is amatch. This is often a very surprising result when a networkadministrator does not understand the difference between classful

    Hc vin mng Bach Khoa - Website: www.bkacad.com 42

    an c ass ess rou ng e av or.

    The reason why the router will not search beyond the child routes Originally networks were all classful

    This meant an organization could subnet a major networkaddress and enlighten all the organizations routers about

    the subnetting

    Therefore, if the subnet was not in the routing table, thesubnet did not exist and packet was dropped

  • 8/3/2019 CA Ex S2M8 the Routing Table

    43/55

    Classless Routing Behavior: ip classless

    Commands: Router(config)#ip classless Beginning with IOS 11.3, ip classless was configured by default Classless routing behavior works for:

    Discontiguous networks CIDR supernets

    Hc vin mng Bach Khoa - Website: www.bkacad.com 43

    Cl l R ti B h i i l l

  • 8/3/2019 CA Ex S2M8 the Routing Table

    44/55

    Classless Routing Behavior: ip classless

    Route lookup process when ip classless is in use If classless routing behavior in effect then

    Search level 1 routes Supernet routes Checked first

    If a match exists then forward packet

    Hc vin mng Bach Khoa - Website: www.bkacad.com 44

    Default routes Checked second

    If there is no match or no default route then the Packetis dropped

    Cl l R ti B h i i l l

  • 8/3/2019 CA Ex S2M8 the Routing Table

    45/55

    Classless Routing Behavior: ip classless

    Hc vin mng Bach Khoa - Website: www.bkacad.com 45

    Classless Routing Behavior: ip classless

  • 8/3/2019 CA Ex S2M8 the Routing Table

    46/55

    Classless Routing Behavior: ip classless

    Hc vin mng Bach Khoa - Website: www.bkacad.com 46

    Classless Routing Behavior: ip classless

  • 8/3/2019 CA Ex S2M8 the Routing Table

    47/55

    Classless Routing Behavior: ip classless

    Hc vin mng Bach Khoa - Website: www.bkacad.com 47

    Classless Routing Behavior: Search Process

  • 8/3/2019 CA Ex S2M8 the Routing Table

    48/55

    Classless Routing Behavior: Search Process

    Hc vin mng Bach Khoa - Website: www.bkacad.com 48

    Classless Routing Behavior: Search Process

  • 8/3/2019 CA Ex S2M8 the Routing Table

    49/55

    Classless Routing Behavior: Search Process

    Hc vin mng Bach Khoa - Website: www.bkacad.com 49

    Classless Routing Behavior: Search Process

  • 8/3/2019 CA Ex S2M8 the Routing Table

    50/55

    Classless Routing Behavior: Search Process

    Hc vin mng Bach Khoa - Website: www.bkacad.com 50

    Classless Routing Behavior: Search Process

  • 8/3/2019 CA Ex S2M8 the Routing Table

    51/55

    Classless Routing Behavior: Search Process

    Hc vin mng Bach Khoa - Website: www.bkacad.com 51

    Classless Routing Behavior: Search Process

  • 8/3/2019 CA Ex S2M8 the Routing Table

    52/55

    Classless Routing Behavior: Search Process

    IP Packet 172.16.4.10 10101100 00010000 00000100 00001010

    Longest-bit-match! (11 bits match, 8 bits minimum)

    Supernet 172.0.0.0/8 10101100 00000000 00000000 00000000

    Supernet 160.0.0.0/4 10100000 00000000 00000000 00000000

    Hc vin mng Bach Khoa - Website: www.bkacad.com 52

    RouterB#show ip route

    172.16.0.0/24 is subnetted, 3 subnets

    R 172.16.1.0 [120/1] via 172.16.2.1, 00:00:20, Serial0

    C 172.16.2.0 is directly connected, Serial0

    C 172.16.3.0 is directly connected, FastEthernet0C 192.168.1.0/24 is directly connected, Serial1

    S 172.0.0.0/8 is directly connected, Serial1

    S 160.0.0.0/4 is directly connected, Serial1

    S* 0.0.0.0/0 is directly connected, Serial1

    RouterB#

    e au . . .

    Classless Routing Behavior: Search Process

  • 8/3/2019 CA Ex S2M8 the Routing Table

    53/55

    Classless Routing Behavior: Search Process

    Hc vin mng Bach Khoa - Website: www.bkacad.com 53

    ass u vs. ass ess ou ng e av or

    It is recommended to use classless routing behavior so supernetand default routes can be used whenever needed

    Remember that classful and classless routing behaviors areindependent from classful and classless routing protocols. A router

    could be configured with classful routing behavior (no ip classless)and a classless routing protocol, such as RIPv2. A router could alsobe configured with classless routing behavior (ip classless) and aclassful routing protocol, such as RIPv1.

    Summary

  • 8/3/2019 CA Ex S2M8 the Routing Table

    54/55

    Summary

    Hc vin mng Bach Khoa - Website: www.bkacad.com 54

  • 8/3/2019 CA Ex S2M8 the Routing Table

    55/55

    Hc vin mng Bach Khoa - Website: www.bkacad.com 55