Routing
Index
●   Introduction
●   Addressing and subnetting
●   Routing
●   ARP protocol
●   IP header
●   ICMP protocol
●   DHCP protocol
●   NAT mechanism
●   RIP dynamic routing
●   Security notions
                                Lucas Bazilio - Udemy
                            IP Routing
➢   Manner in which datagrams “walk” over the network
                                                        Lucas Bazilio - Udemy
                             IP Routing
➢   Manner     in   which     datagrams    “walk”   over   the    network
➢   How does PC1 know that PC2, PC3, … exist?
➢   How can it transmit datagrams to them?
                                                           Lucas Bazilio - Udemy
Lucas Bazilio - Udemy
                                         IP Routing
           ➢    Manner     in    which    datagrams     “walk”    over    the     network
                → Routing Table
                 - Database that each router and host has
                 - Contains the information necessary to reach all destinations
                                       IP Routing
Acquisition        Destination          Mask           Gateway                  Interface
                         Indicates which are the       Indicates if to reach          Indicates through
 Indicates how                                                                        which interface it is
 an entry in the         destinations reachable by     a destination it is
                         this device in terms of @IP   necessary to go                necessary         to
 table has been                                                                       transmit to reach
 acquired                and mask. Destinations can    through a router or
                         be @IP, network addresses,    if the destination is          the destination
                         or all destinations           in     the      same
                                                       network
                                                                               Lucas Bazilio - Udemy
                                   IP Routing
Acquisition    Destination           Mask                Gateway            Interface
   Each entry in this table forms what is called a route to a destination
      ●   A route between source and destination is determined as the sum
          of next steps (or hops)
      ●   That is, each element of this network determines only a part of the
          entire route.
                                                                       Lucas Bazilio - Udemy
                                       IP Routing
                                     PC1 routing table
Acquisition     Destination               Mask                     Gateway        Interface
   C             10.0.0.0              255.255.255.0               0.0.0.0        e0
    When configuring the @IP of e0 of PC1, this entry is created
                                                                             Lucas Bazilio - Udemy
                                       IP Routing
                                     PC1 routing table
Acquisition     Destination               Mask                     Gateway        Interface
   C             10.0.0.0              255.255.255.0               0.0.0.0        e0
    When configuring the @IP of e0 of PC1, this entry is created
    It says how to transmit to the destinations of 10.0.0.0/24
                                                                             Lucas Bazilio - Udemy
Lucas Bazilio - Udemy
                                                 IP Routing
                                               PC1 routing table
       Acquisition      Destination                 Mask                     Gateway               Interface
           C              10.0.0.0               255.255.255.0               0.0.0.0               e0
            When configuring the @IP of e0 of PC1, this entry is created
            It says how to transmit to the destinations of 10.0.0.0/24
            C: direct connection (PC1 is connected to network 10.0.0.0/24 and can reach all destinations on this network)
Lucas Bazilio - Udemy
                                                 IP Routing
                                               PC1 routing table
       Acquisition      Destination                 Mask                     Gateway               Interface
           C              10.0.0.0               255.255.255.0               0.0.0.0               e0
            When configuring the @IP of e0 of PC1, this entry is created
            It says how to transmit to the destinations of 10.0.0.0/24
            C: direct connection (PC1 is connected to network 10.0.0.0/24 and can reach all destinations on this network)
            Gateway 0.0.0.0: indicates that it is not necessary to go through a router, the destinations are local
Lucas Bazilio - Udemy
                                                 IP Routing
                                               PC1 routing table
       Acquisition      Destination                 Mask                     Gateway               Interface
           C              10.0.0.0               255.255.255.0               0.0.0.0               e0
            When configuring the @IP of e0 of PC1, this entry is created
            It says how to transmit to the destinations of 10.0.0.0/24
            C: direct connection (PC1 is connected to network 10.0.0.0/24 and can reach all destinations on this network)
            Gateway 0.0.0.0: indicates that it is not necessary to go through a router, the destinations are local
            e0: indicates that the interface called e0 must be used to transmit
Lucas Bazilio - Udemy
                                           IP Routing
                                         PC1 routing table
       Acquisition      Destination          Mask                 Gateway           Interface
           C             10.0.0.0         255.255.255.0           0.0.0.0           e0
        The next step in this case is to send the datagram to the destination that is on the same
        network as the source.
Lucas Bazilio - Udemy
                                               IP Routing
                                              PC1 routing table
       Acquisition      Destination                Mask                     Gateway                 Interface
           C             10.0.0.0              255.255.255.0                0.0.0.0                 e0
           S             10.0.1.10             255.255.255.255              10.0.0.1                e0
                                                They are all 1s since all   We have to go through
                          The @IP of a host     the bits in the             router 10.0.0.1 to
       Static input                             Destination column          reach the destination
       (manually                                identify the
       configured)                              destination.
Lucas Bazilio - Udemy
                                           IP Routing
                                         PC1 routing table
       Acquisition      Destination          Mask                Gateway            Interface
           C             10.0.0.0         255.255.255.0          0.0.0.0            e0
           S             10.0.1.10        255.255.255.255        10.0.0.1           e0
        The next step is to pass the datagram to router 10.0.0.1 by transmitting out interface e0
        to reach host 10.0.1.10
Lucas Bazilio - Udemy
                                                     PC1 routing table
       Acquisition           Destination                     Mask          Gateway                Interface
           C                  10.0.0.0                   255.255.255.0     0.0.0.0                e0
           S                  10.0.1.10                  255.255.255.255   10.0.0.1               e0
           S                  10.0.2.0                   255.255.255.0     10.0.0.1               e0
                                                                            We have to go through router 10.0.0.1
                             All destinations of thisIs the mask of the     to reach the destination
     Static input            network                 destination network
     (manually configured)
Lucas Bazilio - Udemy
                                                     PC1 routing table
       Acquisition           Destination                     Mask          Gateway                Interface
           C                  10.0.0.0                   255.255.255.0     0.0.0.0                e0
           S                  10.0.1.10                  255.255.255.255   10.0.0.1               e0
           S                  10.0.2.0                   255.255.255.0     10.0.0.1               e0
                                                                            We have to go through router 10.0.0.1
                             All destinations of thisIs the mask of the     to reach the destination
     Static input            network                 destination network
     (manually configured)
           The next step is to pass the datagram to the router 10.0.0.1 transmitting through the
           interface e0 to be able to reach any @IP of the network 10.0.2.0/24
Lucas Bazilio - Udemy
                                                  PC1 routing table
       Acquisition         Destination                 Mask           Gateway                  Interface
           C                    10.0.0.0            255.255.255.0     0.0.0.0                  e0
           S                    10.0.1.10           255.255.255.255   10.0.0.1                 e0
           S                    10.0.2.0            255.255.255.0     10.0.0.1                 e0
                                                                      10.0.0.1                 e0
           S                    0.0.0.0              0.0.0.0
                                Any destination      Any mask         We have to go through router 10.0.0.1
        Static input                                                  to reach the destination
        (manually configured)
Lucas Bazilio - Udemy
                                 PC1 routing table
       Acquisition Destination       Mask       Gateway   Interface
                                                              R1 routing table
           Acquisition              Destination             Mask                 Gateway   Interface
Lucas Bazilio - Udemy
                                 PC1 routing table
       Acquisition Destination       Mask       Gateway   Interface
                                                              R1 routing table
           Acquisition              Destination             Mask                 Gateway   Interface