8 Replies Latest reply: Jun 17, 2019 8:16 AM by Sergey RSS

    Entering Static Routes - Yes, I’m An Idiot !

    CiscoLadder

      I’ll try to be as succinct as possible. Say there’s (3) routers.

       

      ——-R1——-R2——-R3——-

        W          X           Y          Z

       

      Why do we need to put a static route in R1 pointing to network Y, if on R2  networks X and Y are directly connected ? Isn’t that the whole point of a router ?

       

      OR

       

      Are we simply saying that, a router is just a device that has a connection on each side and we still need to tell it EVERYTHING we want it to do (in terms of Static Routes) ?

       

      BUT !

       

      If we enter (map) a static route on R1 to R3(Z) via R2, then R2 uses its Directly Connected interfaces to provide the path, so why doesn’t R3 act the same ?

       

      I REALLY APOLOGIZE THAT I’M A COMPLETE IDIOT.

       

      Best Regards,

      Dave

      ciscoladder@gmail.com

        • 1. Re: Entering Static Routes - Yes, I’m An Idiot !
          Ing_Percy

          Hi!

          CiscoLadder escribió:

           

          I’ll try to be as succinct as possible. Say there’s (3) routers.

           

          ——-R1——-R2——-R3——-

            W          X           Y          Z

           

          Why do we need to put a static route in R1 pointing to network Y, if on R2  networks X and Y are directly connected ? Isn’t that the whole point of a router ?

          R1's routing table

          -subnet W directly connected

          -subnet X directly connected

           

          If from R1 you want to access to R2's subnet, this case, "Y", then as R1 doesn't have the subnet Y, the packet is dropped

           

          NOTE: it is Cisco Learning Network, there is not silly question, all people in this community learn together

           

          Regards!

          • 2. Re: Entering Static Routes - Yes, I’m An Idiot !
            ciscodaze1

            Just adding to Percys reply...

             

            Think about it. If R1 is not talking to R2 about routes it has (routing protocol) how could it put a path to "Y" in its routing table?  R1 is deaf dumb and blind at this point, so you have to educate it with a static route, or default static route.  And vice versa for R2 and R3.

             

            Without a routing protocol or static routes configured, a router will only have connected routes appearing in its routing table.

             

            This is a common question, most students I have worked with stumble over that issue at first...not a silly question.  We just forget that a router cant do its magic until we configure a routing protocol and advertise our networks. (Or configure statics).

             

            And don't demean yourself with statements like I REALLY APOLOGIZE THAT I’M A COMPLETE IDIOT.


            One of my favorite sayings is "everything is hard, until you know how to do it".  We are all learning, and it never ends.


            Something I learned in the Netacad helped me a lot when I first started out:


            Alex Zinin's 3 fundamental rules of routing:

             

            1. Every router makes its decision alone, based on the information it has in its own routing table.


            2. The fact that one router has certain information in its routing table does not mean that other routers have the same information.


            3. Routing information about a path from one network to another does not provide routing information about the reverse, or return, path.


            • 3. Re: Entering Static Routes - Yes, I’m An Idiot !
              Skrebtsoff

              Hi!

              I remember how i was asking about that too ...


              Router has a few methods to fill its routing table:

              1.Connected networks

              2.Static routes

              3.Dynamic protocols

               

               

              And in the case of using of (2) static route you need to tell to the router about network directly,because  it's not (1)directly connected network and not received from (3)dynamic protocol's updates.Then ,you need clearly write network manually in its routing table.

              • 4. Re: Entering Static Routes - Yes, I’m An Idiot !
                arteq

                you are not an idiot... something to think about: consider a static and/or default route as a essentially a routing protocol

                • 5. Re: Entering Static Routes - Yes, I’m An Idiot !
                  Juergen Ilse CCNA R&S

                  CiscoLadder schrieb:

                   

                  I’ll try to be as succinct as possible. Say there’s (3) routers.

                   

                  ——-R1——-R2——-R3——-

                    W          X           Y          Z

                   

                  Why do we need to put a static route in R1 pointing to network Y, if on R2  networks X and Y are directly connected ? Isn’t that the whole point of a router ?

                  What is the goal you trying to achieve? all of the routers already have a "connected" route to any directly connected network (if the according interface is up). So R1 has already routes for networks W and X, R2 has already routes for networks X and Y and R3 has already routes for networks Y and Z. When R1 tries to ping for example the interface of R3 in network Z, R1 needs a route to network Z (because otherwise it will drop the packet as it has no routing information for the desrination) and also R2 needs a route to network Z (otherwise R2 will drop the packet due to missing routing information for the destination). But to let the ping be successful, R3 must be able to send the answer back to R1, so R3 needs a route for the source ip address of the ping request (the ip address of R1, tat was used as source ip for the ping). So R3 also needs a route to either network X or network W (depending of which ip address of R1 was used as source of the ping). If the source of the ping was the interface ip of R1 in network W, R2 will also need a route to network W, otherwise it will drop the ping reply (which is destined to the interface  ip of R1 in network W if the ping request was send with that ip address).

                  So for the ping to be successful, all routers "on the way" need routing information for the source ip of the ping (because otherwise the ping request will not reach its target) and for the destination of the ping (because otherwise, the ping answer will not reach the source ip of the ping request).

                  So if you only need comunication between networks W and Z, R2 needs routing information for networks W and Z (it has only routing information for networks X and Y, if only connected routes are there), amd R1 needs routing information for network Z (but not necessarily for network Y) and R3 needs routing information for network W (but not necessarily for network X). So if you add static routes for networks W and Z to R2, a static route for network Z pointing to R2 on R1 and a static route to network W pointing to R2 on R3, R1 would be possible to ping the interface ipof R3 in network Z, if the source address of the ping is the interface ip of R1 in network W. If R1 uses the interface ip in network X as source (which will be the default in this topology, as it is the interface pointing towards its gateway to network Z), the ping will not succeed, because the ping reply will not reach its destination because of missing routing information: R3 will drop the packet, because it has no route to network X).

                  Per default routing is only based on the destination ip address, but for successful communication, it is also necessary, that the "answer packets" reach their destination (the other communication endpoint).

                  • 6. Re: Entering Static Routes - Yes, I’m An Idiot !
                    Steven Davidson

                    Traditional routing involves receiving a packet on an interface, looking at the destination IP address of that packet, matching it to an entry in the routing table (RIB) to identify an exit interface, and routing it out the exit interface.  If R1 receives a packet on interface connected to source network W, destined for network Y, it will not find a match in the RIB unless it learns of a route from R2 or you manually program a route (static) into R1.  This is because without any intervention on your part the only routes R1 will have in its RIB are its own connected networks.

                    • 7. Re: Entering Static Routes - Yes, I’m An Idiot !
                      Aref - CCIE #62163 (Security) / CCNPx2 (R&S - Security) / Network+ / Security+

                      If a router is not aware about a remote subnet it won't be able to route traffic to it, it does not know to who it should send that traffic. This is why you would need to add static routes on some devices to route traffic to remote subnets. You would never add a static route on a device for its connected subnet, because in that case the device is aware about how to route traffic to that subnet. One of the advantages of using dynamic rotuing protocols is to prevent these manual additions and relying on what is being advertise across a domain from all the participating devices. In those cases R2 would advertise its connected subnet Y to R1 and accordingly R1 would know that it must route the traffic destined to subnet Y through R2 facing interface.

                      • 8. Re: Entering Static Routes - Yes, I’m An Idiot !
                        Sergey

                        Dave,

                         

                        R1 doesn't "know" what is directly attached to R2. It only knows about networks directly attached to itself. That's why you need to let it know where to find any other networks. So, R1 knows about networks W and X, but doesn't know about network Y. The fact that its neighbouring router has that network directly attached to it doesn't help in any way. Someone has to tell R1 where to look for that network. It can be you, by entering a  static route or it can be R2 if you run dynamic routing protocol between R1 and R2.

                         

                        Now regarding "If we enter (map) a static route on R1 to R3(Z) via R2, then R2 uses its Directly Connected interfaces to provide the path, so why doesn’t R3 act the same ?":


                        If we configure a static route on R1 for network Z (remember, R1 has no idea about R3), via R2's IP address, then what will happen is R1 will send all the packets destined for network Z to R2. Then R2 will make its own decision about where to send these packets depending on its own local routing table. And if that table doesn't have some route to network Z, then the packets are either forwarded to the default route if it is present or just dropped. R2 doesn't automatically know about network Z. Just as R1 doesn't automatically know about network Y. Every router need to have a route to every network it wants to send data to.