Skip navigation
Cisco Learning Home > CCNP R&S Study Group > Discussions
6089 Views 14 Replies Latest reply: Feb 26, 2012 4:49 PM by Joel Shrestha RSS

Currently Being Moderated

BGP Weight Default

Feb 25, 2012 11:35 AM

Wireless Mouse 484 posts since
Jan 26, 2010

Hello,

 

The weight attribute is a Cisco proprietary technology and considered as first attribute in BGP. The default value of weight is 0 and the range is from 0 to 65535. If we change the weight value of one router that change will not propagate to other router and the route with maximum weight value will be considered as the best route.

 

ok fair enough, I have routers CME and R5 and I will show you the Show ver  and show ip bgp for both of them

 

 

CME#show ver

Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9-M), Version 12.4(22)T, RELEASE SOFTWARE (fc1)

 


CME#show ip bgp
BGP table version is 8, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
r> 10.1.45.0/24     10.1.45.2                0             0 6500 ?
*> 50.1.1.0/24      10.1.45.2                0             0 6500 i
*> 200.1.1.0        10.1.45.2                0             0 6500 ?
*> 200.1.2.0        10.1.45.2                0             0 6500 ?
*> 200.1.3.0        10.1.45.2                0             0 6500 ?
*> 200.1.4.0        10.1.45.2                0             0 6500 ?

 

R5#show ver

Cisco IOS Software, C2600 Software (C2600-ADVENTERPRISEK9-M), Version 12.4(15)T4, RELEASE SOFTWARE (fc2)


R5#show ip bgp
BGP table version is 9, local router ID is 200.1.6.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.45.0/24     0.0.0.0                  0         32768 ?
*> 50.1.1.0/24      0.0.0.0                  0         32768 i
*> 200.1.1.0        0.0.0.0                  0         32768 ?
*> 200.1.2.0        0.0.0.0                  0         32768 ?
*> 200.1.3.0        0.0.0.0                  0         32768 ?
*> 200.1.4.0        0.0.0.0                  0         32768 ?

 

 

Both routers have the same IOS and I have never configured Weight on either of these two routers...Was not the defaults 0? I read in somewhere that deafult is 32,768 like in one of my router show. I am confused!

 

How can be the default weight be different in each router when the IOS version is the12.4 on both of the routers?

  • Currently Being Moderated
    1. Feb 25, 2012 12:58 PM (in response to Wireless Mouse)
    Re: BGP Weight Default

    Here is a link that should explain it better for you: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml#weight

     

    Your BGP output shows an AS_PATH on CME, but not on R5.  This tells me that the routes are being originated on R5 somehow(either redistribution or a network command under BGP).  This would explain the result of your output.

     

    Please let us know if you need any furhter clarification!

  • Joel Shrestha 132 posts since
    Jun 20, 2011
    Currently Being Moderated
    2. Feb 25, 2012 1:07 PM (in response to Wireless Mouse)
    Re: BGP Weight Default

    weight is zero for learned routes and 32768 for locally injected routes.

    HTH

    Joel

  • Beau Yancy 148 posts since
    Dec 10, 2010
    Currently Being Moderated
    4. Feb 25, 2012 3:58 PM (in response to Wireless Mouse)
    Re: BGP Weight Default

    I believe it depends on the IOS version whether it will display the local preference of a route that is at its default value. By you using the command "bgp default local-preference 50" you have now set it to a new DEFAULT value so in your version it looks like it still isn't displaying it. If you change some routes local preference to something other than the configured default then you will see it listed.

     

    - Beau

  • Beau Yancy 148 posts since
    Dec 10, 2010
    Currently Being Moderated
    5. Feb 25, 2012 4:07 PM (in response to Beau Yancy)
    Re: BGP Weight Default

    Also, if you want to see the local preference regardless, you can use the "show ip bgp x.x.x.x" to see the specific route in slightly more detail. This will include the local preference anyway whether it is at the default value or otherwise.

  • Beau Yancy 148 posts since
    Dec 10, 2010
    Currently Being Moderated
    7. Feb 25, 2012 5:00 PM (in response to Wireless Mouse)
    Re: BGP Weight Default

    Scratch what I said before. I confused myself!

     

    So, it seems that you only see the local preference value in the "show ip bgp" if that route was received from an iBGP peer (makes sense). Otherwise, if recieved from an eBGP peer, the value will be displayed if the local preference was set to a different than default value inbound on the local device.

     

    Capture.PNG

     

    For instance, below R3 is receiving all of its routes from an eBGP peer (R1). Notice the only route with the local preference displayed is 112.0.0.0 which I have configured a route-map inbound to the eBGP peer to change it to 250.

     

    Rack1R3#sho ip bgp

    BGP table version is 92, local router ID is 150.1.3.3

    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

                  r RIB-failure, S Stale

    Origin codes: i - IGP, e - EGP, ? - incomplete

     

       Network          Next Hop            Metric LocPrf Weight Path

    *> 28.119.16.0/24   163.1.13.1                             0 100 54 i

    *> 28.119.17.0/24   163.1.13.1                             0 100 54 i

    *> 112.0.0.0        163.1.13.1                    250      0 100 54 50 60 i

    *> 113.0.0.0        163.1.13.1                             0 100 54 50 60 i

    *> 114.0.0.0        163.1.13.1                             0 100 54 i

    *> 115.0.0.0        163.1.13.1                             0 100 54 i

    *> 116.0.0.0        163.1.13.1                             0 100 54 i

    *> 117.0.0.0        163.1.13.1                             0 100 54 i

    *> 118.0.0.0        163.1.13.1                             0 100 54 i

    *> 119.0.0.0        163.1.13.1                             0 100 54 i

     

    SW2 is an iBGP with R3. Notice that all the routes learned from this iBGP have the local preference value displayed in the output in addition to the 250 that I manually set.

     

    Rack1SW2#sho ip bgp

    BGP table version is 92, local router ID is 150.1.8.8

    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

                  r RIB-failure, S Stale

    Origin codes: i - IGP, e - EGP, ? - incomplete

     

       Network          Next Hop            Metric LocPrf Weight Path

    *>i28.119.16.0/24   163.1.13.1               0    100      0 100 54 i

    *>i28.119.17.0/24   163.1.13.1               0    100      0 100 54 i

    *>i112.0.0.0        163.1.13.1               0    250      0 100 54 50 60 i

    *>i113.0.0.0        163.1.13.1               0    100      0 100 54 50 60 i

    *>i114.0.0.0        163.1.13.1               0    100      0 100 54 i

    *>i115.0.0.0        163.1.13.1               0    100      0 100 54 i

    *>i116.0.0.0        163.1.13.1               0    100      0 100 54 i

    *>i117.0.0.0        163.1.13.1               0    100      0 100 54 i

    *>i118.0.0.0        163.1.13.1               0    100      0 100 54 i

    *>i119.0.0.0        163.1.13.1               0    100      0 100 54 i

     

    Sorry for the previous confusion. I had to lab this up myself to check why. So, there it is.

     

    -Beau

  • Martin 13,070 posts since
    Jan 16, 2009
    Currently Being Moderated
    8. Feb 25, 2012 5:02 PM (in response to Wireless Mouse)
    Re: BGP Weight Default

    that local pref drives me nutts too; sometimes shows up and sometimes doesn't; go figure;

    btw. what happened to Fabio?;

  • Joel Shrestha 132 posts since
    Jun 20, 2011
    Currently Being Moderated
    10. Feb 25, 2012 6:11 PM (in response to Wireless Mouse)
    Re: BGP Weight Default

    Local pref is significant to local AS only. So, updates received from eBGP peer do not include the LocalPref number, that's why IOS list the null value for the updates received from eBGP peer, Since the scope of the LocalPref is within an AS,  IOS does include the default LocalPref value in iBGP updates, which is 100.

     

    Joel

  • Beau Yancy 148 posts since
    Dec 10, 2010
    Currently Being Moderated
    12. Feb 25, 2012 6:45 PM (in response to Wireless Mouse)
    Re: BGP Weight Default

    Yep, have you tried configuring them as iBGP peers just to test out the "show ip bgp" output. You should then see the local preference then on whichever router is receiving those routes from the iBGP peer.

     

    It's pretty interesting behavior of that command specifically.

  • Joel Shrestha 132 posts since
    Jun 20, 2011
    Currently Being Moderated
    14. Feb 26, 2012 4:49 PM (in response to Wireless Mouse)
    Re: BGP Weight Default

    I didn't read all the posts before.....and you're right, it does show the local preference when you look for specific prefix in the BGP table......not sure why.....

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)