RIP Metrics for directly connected networks

I notice that when a RIP speaking router advertises is directly connected networks it advetises them with a hop count of 1 and yet a "show ip route" on a directly connected neighbor doesn't increment that hop count to 2.

From the RFC:
Any host that uses RIP is assumed to have interfaces to one or more networks.  These are referred to as its "directly-connected networks".  The protocol relies on access to certain information about each of these networks.  The most important is its metric or "cost".  The metric of a network is an integer between 1 and 15 inclusive.

If I read that correctly zero is not a valid value, which explains why it advertises directly connected networks with a hop count of one. So my question, is there some type of logic in a Cisco router that says if I receive a RIP advertisment with a cost of one don't increment it. Do all RIP devices act in this same manner?

 

Comments

  • zero cost is only valid if the network is directly attached in which case a route advert is unneccessary.

    Be the router.... if a packets comes in on fa0/0 then exits on fa0/1 that is a hop count. 

    -------fa0/0-Router-fa0/1-------------

    Therefore if I advertise fa0/1 out via fa0/0 then I let every one downstream know that the cost is 1.

    If you are sending out a RIP advert then the returning packets destined for that Destination network must pass a least one hop (that is the router with the directly attached network doing the original advert) 

     

  • For reference I am doing the Vol 1 version 4.1 RIP labs and will use the one entitled "RIP Send-Recieve Version" as an example. R2 and R3 are directly connected as shown.

    10.2.0.0/16--------(R2)s1/1------------------s1/3(R3)--------

    R2#
    *Jun 27 10:33:30.515: RIP: sending v2 update to 224.0.0.9 via Serial1/1 (23.0.0.2)
    *Jun 27 10:33:30.519: RIP: build update entries
    *Jun 27 10:33:30.519:   10.2.0.0/16 via 0.0.0.0, metric 1, tag 0

    R3#
    *Jun 27 10:33:30.931: RIP: received v2 update from 23.0.0.2 on Serial1/3
    *Jun 27 10:33:30.931:      10.2.0.0/16 via 0.0.0.0 in 1 hops

    R3#sh ip route rip
         10.0.0.0/16 is subnetted, 2 subnets
    R       10.2.0.0 [120/1] via 23.0.0.2, 00:00:14, Serial1/3

    As you can see from the debug R2 advertises the 10.2.0.0/16 network with a metric of 1 which R3 recieves. Then looking at R3's routing table the cost to 10.2.0.0 is 1. My question is, why doesn't R3 add 1 to the recieved metric making its cost to 10.2.0.0 2?

  • Now I see the error in my ways. I was under the impression that the receiving router updated the metric upon receiving a routing update. I now realize that the sending router updates the metric prior to sending the routing update.

  •  

    Hi dmarsh

     

    The next router does not modify incomings update, only outgoing updated. In case of RIP the router hold the update, and when send to another neighbor its increments its metric to 1 by default (offset-list :-)).

     

    HTH

     

     











  • <!--
    /* Font Definitions */
    @font-face
    {font-family:"Cambria Math";
    panose-1:2 4 5 3 5 4 6 3 2 4;
    mso-font-charset:0;
    mso-generic-font-family:roman;
    mso-font-pitch:variable;
    mso-font-signature:-1610611985 1107304683 0 0 159 0;}
    @font-face
    {font-family:Calibri;
    panose-1:2 15 5 2 2 2 4 3 2 4;
    mso-font-charset:0;
    mso-generic-font-family:swiss;
    mso-font-pitch:variable;
    mso-font-signature:-1610611985 1073750139 0 0 159 0;}
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-unhide:no;
    mso-style-qformat:yes;
    mso-style-parent:"";
    margin-top:0in;
    margin-right:0in;
    margin-bottom:10.0pt;
    margin-left:0in;
    line-height:115%;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:Calibri;
    mso-fareast-theme-font:minor-latin;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    p
    {mso-style-priority:99;
    mso-margin-top-alt:auto;
    margin-right:0in;
    mso-margin-bottom-alt:auto;
    margin-left:0in;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman","serif";
    mso-fareast-font-family:"Times New Roman";}
    .MsoChpDefault
    {mso-style-type:export-only;
    mso-default-props:yes;
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:Calibri;
    mso-fareast-theme-font:minor-latin;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    .MsoPapDefault
    {mso-style-type:export-only;
    margin-bottom:10.0pt;
    line-height:115%;}
    @page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.0in 1.0in 1.0in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:0;}
    div.Section1
    {page:Section1;}
    -->


    dmarch...it depends on the Routing Protocol how the inbound update is
    treated …so the "error of your ways" only applies to RIP your spot on with the
    other IGPs on the R&S exam.

    RIP does not update the cost, but.....

    EIGRP does add the cost to get to the neighbor (AD versus FD - FD shows up
    in the Routing Table)

    OSPF also (most of the time - E1s are a special case that kind of does both)
    adds the cost to get to the neighbor to the received metric.  That is
    probably not the best way to express but it works for this thread. 

    Then again OSPF is Link State and Dijkstra, so it really is not a direct comparison
    in terms of treating an update or adding costs…however the metric that shows up
    in the routing table is the sum of the costs of all the links in the path
    including the cost of the local interface. 

    For example you might have a directly attached neighbor via FastEthernet (cost
    of 1) or via serial (cost of 64), but you will not see any of the neighbors networks
    in the routing table with a cost of 1 or 64. 
    It will be the cost of the neighbors interface plus the local cost. 

    So if the neighbor’s interface  is FastEthernet
    you will see 2 or 65 (depending on your local interface FastEthernet or serial),
    or if the neighbor’s interface it is serial, you will see 65 or 128 (local FastEthernet
    or serial). 

    Its important to have this down because any given R&S lab could have several points tied  go IGP metric manipulation.

     

Sign In or Register to comment.