6 Replies Latest reply: Nov 8, 2019 1:09 PM by Martin RSS

    IP Cef question

    Learner

      Hello all,

       

      CCNP Route OCG has the following topology and the output of "show IP cef" on page 480 and page 482. The cef table has an entry "10.1.1.3/32".

       

      I copied the topology to GNS3. It also has 10.1.1.3/32 entry. But 10.1.1.3/32 isn't configured anywhere. Why is it on the table?

       

      And what's the order of routing when using the CEF table? The book says: the router does the equivalent of comparing the destination IP address of the packet with the IP routing table, matching the longest-prefix route that matches the destination IP address." (page 483)

       

      Let's say R1 gets a packet with destination IP of 10.1.1.2, which is on R2's S1/0 interface. We look at the CEF table, we know the entry R1 needs to find is 10.1.1.0/30. So does R1 look from the top of the CEF table, 0.0.0.0/0 first, then 0.0.0.0/8 second, and eventually come to 10.1.1.0/30? And since 10.1.1.0/30 has next hop "recieve" and interface "serial 1/0", it'll forward the packet out of serial 1/0?

       

      If R1 gets another packet with destination IP of 10.1.1.3. We know there is no IP 10.1.1.3 configured anywhere. But it'll match 10.1.1.3/32 on the CEF table. And since this entry has next hop "receive" and Interface "Serial 1/0", would the packet be forward out of Serial 1/0 anyway?

       

      cef1.jpg

       

      cef2.jpg

        • 1. Re: IP Cef question
          Steven Davidson

          10.1.1.3/32 is the broadcast address for 10.1.1.0/30.  That's why it says "receive" on the entry in the table.  The router would receive (consume) a packet destined for this address.  According to the table the same would be true for the network address 10.1.1.0.  If you pinged 10.1.1.0 from R2 then R1 should respond.

          • 2. Re: IP Cef question
            Learner

            Steven Davidson wrote:

             

            10.1.1.3/32 is the broadcast address for 10.1.1.0/30.  That's why it says "receive" on the entry in the table.  The router would receive (consume) a packet destined for this address.  According to the table the same would be true for the network address 10.1.1.0.  If you pinged 10.1.1.0 from R2 then R1 should respond.

             

            You are right. I didn't realize it's the broadcoast address.

             

            Does the matching process go one by one from the top of CEF table to its bottom? Or does it just jump to 10.1.1.0/30 for a destination of 10.1.1.2?

             

            I pinged 10.1.1.0 from R2, R1 does respond. But why? 10.1.1.0 isn't the broadcoast address.

            • 3. Re: IP Cef question
              Steven Davidson

              Why it responds to the network address is probably a matter of something buried in an RFC.  Perhaps it is a compliance thing. You'd have to dig into an RFC on IP to see if it MUST respond vs it MAY respond.  IDK.   The CEF table lookup isn't top down.  The way the tree is structured allows for a more efficient lookup.  Honestly I cannot get into the technical details of it without referring to a book myself.  The details of how the table is arranged and how the look ups are performed gets into the weeds but from a practical point of view it's not practical information.

              • 4. Re: IP Cef question
                Learner

                Hello all,

                 

                What does 'receive' under 'Next Hop' mean? The router will receive the traffic? Does Cisco have an official explanation for that?

                • 5. Re: IP Cef question
                  Steven Davidson

                  Receive means that the packet will be punted up to the route processor for local consumption

                  • 6. Re: IP Cef question
                    Martin

                    David P - one of us -  wrote good blog on ip cef;  see Spanish Or English versions

                     

                    Descubriendo CEF

                    Demystifying CEF