cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4863
Views
20
Helpful
19
Replies

bgp table (i what is it mean )

networkinblood
Level 1
Level 1

HI team ,

 

In bgp table one i (origin code , prefix are generated by network command) and what is mean of other i(internal). ????

 

According to cisco it is internal but I tried to find out in varies documents but still I m very confused .

 My query might me silly , but your reply will help other guys too.

thnks in advance

2 Accepted Solutions

Accepted Solutions

Martin L
VIP
VIP

 

First "i" stands for internal and is just a network type while "i" at the end of AS Path numbers is Origin code. Think of this "first i" as from internal BGP but not from external BGP (see step 7 from link below and step 5 Origin codes). Although listed first (after valid and best), this step 7 "i"  is compared last -after step 5 Origin "i" .

Before comparing step 7 We must talk about Cisco Weight (step 1), then Step 3 "Prefer the path that was locally originated" and step 5 which is Origin code where "i" means IGP, e is EGP and ? stands for incomplete.  Note that EGP is no longer supported by anyone (IOS and the World). 

Confusion may come from Cisco implementation where Weight is number 1 while others do not have it, nor offer it.  With Weight attribute in use on Cisco gear, step 3 often is omitted by the best patch selection algorithm. Whether you use network command or redistribution command to advertise particular network (prefix) on the same local router, they both have max value weight of 32768 and are chosen by local router in the step 1 but not 3 (skipped).  The process stops there and step 3 is often omitted. Non-cisco gear would have compared step 3, then 5, then 7.   

So, there is a bit trickery when comparing steps especially on a mix of Cisco and non-Cisco gear. 

 

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html#anc5

 

Regards, ML
**Please Rate All Helpful Responses **

View solution in original post

 

That sounds correct but I check with my notes. Two points, 1, Loc-RIB are routes to be used by local router.  This means -which is important- that Best path selection algorithm happens (or is located) between RIB-IN and Local-RIB and 2, Loc-RIB contains only the preferred routes that have been selected as the best "route" paths.  In other words, the Local-RIB  table is the result of the BGP Best Path algorithm after local policies have been applied.  Loc-RIB-Out has all Best routes taken from Local-RIB but after OutPut Policies has been applied.

So, representation looks like RIB-IN > Policy IN > Best Path Derision Algorithm process here > Local RIB > Policy OUT > RIB OUT.  Sometimes BGP routes are sort of "missing" from neighboring peer and who is first matters in dual-home dual-ISP BGP topology.

 

Regards, ML
**Please Rate All Helpful Responses **

 

View solution in original post

19 Replies 19

balaji.bandi
Hall of Fame
Hall of Fame

Since we did not know your output, in technical here it is :

 

BGP Origin Attribute informs the Autonomous Systems (AS) about the originator of that route.

 

There are three different Origin types. These are :


• i (IGP)
• e (EGP)
• ? (Incomplete)

 

i (IGP) routes are the routes which are originated from a routing protocol, like RIP, OSPF, EIGRP etc. Generally this is done via network command under the BGP process.

 

is this what you looking ? or if this is not correct explain more with your show ip bgp output

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Sir u hv not got my question in bgp table there is 2 i present one i belong
to origin code that every one know , I am asking about second i ( internal
)which present in left side of bgp table

Sure as i mentioned i may be not understand the one you looking " as i said post show ip bgp output, what you looking for us to get idea ?

 

before i get in to explain another one.

 

below example: are you behind the i which i marked as red ?

 

PE1#sh ip bgp vpnv4 vrf A neighbor 10.0.0.1 advertised-routes
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf A)
*>i 7.7.7.7/32 10.0.0.33 0 100 0 700 ?

 

A route learned from an IBGP neighbor would have an "I" in the third column.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Yes sir exactly the red i

I have updated the post which was missed when I am posting.

 

A route learned from an IBGP neighbor would have an "I" in the third column.

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Thnks for the revert and support , but sir I have tested many time in lab
in which your mentioned comment about on third column i is not always true
..very soon I will post the out put .
Once again thanks for the support.

Martin L
VIP
VIP

 

First "i" stands for internal and is just a network type while "i" at the end of AS Path numbers is Origin code. Think of this "first i" as from internal BGP but not from external BGP (see step 7 from link below and step 5 Origin codes). Although listed first (after valid and best), this step 7 "i"  is compared last -after step 5 Origin "i" .

Before comparing step 7 We must talk about Cisco Weight (step 1), then Step 3 "Prefer the path that was locally originated" and step 5 which is Origin code where "i" means IGP, e is EGP and ? stands for incomplete.  Note that EGP is no longer supported by anyone (IOS and the World). 

Confusion may come from Cisco implementation where Weight is number 1 while others do not have it, nor offer it.  With Weight attribute in use on Cisco gear, step 3 often is omitted by the best patch selection algorithm. Whether you use network command or redistribution command to advertise particular network (prefix) on the same local router, they both have max value weight of 32768 and are chosen by local router in the step 1 but not 3 (skipped).  The process stops there and step 3 is often omitted. Non-cisco gear would have compared step 3, then 5, then 7.   

So, there is a bit trickery when comparing steps especially on a mix of Cisco and non-Cisco gear. 

 

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html#anc5

 

Regards, ML
**Please Rate All Helpful Responses **

Hi Sir ,

 

Thanks for your valuable feedback , now I am much more comfortable with BGP table ...but I have some more queries regarding BGP table ..

 As far as my knowledge BGP having 3 tables  LOCAL RIB BGP TABLE (form table after applying all policies to adj BGP RIB IN  ), ADJ -BGP RIB IN TABLE (without policies) , ADJ-BGP RIB OUT TABLE (after applying all policies to local rib bgp table) .....correct if I m miss leading some where in statement.

 

Hi tean any one can discuss???

 

That sounds correct but I check with my notes. Two points, 1, Loc-RIB are routes to be used by local router.  This means -which is important- that Best path selection algorithm happens (or is located) between RIB-IN and Local-RIB and 2, Loc-RIB contains only the preferred routes that have been selected as the best "route" paths.  In other words, the Local-RIB  table is the result of the BGP Best Path algorithm after local policies have been applied.  Loc-RIB-Out has all Best routes taken from Local-RIB but after OutPut Policies has been applied.

So, representation looks like RIB-IN > Policy IN > Best Path Derision Algorithm process here > Local RIB > Policy OUT > RIB OUT.  Sometimes BGP routes are sort of "missing" from neighboring peer and who is first matters in dual-home dual-ISP BGP topology.

 

Regards, ML
**Please Rate All Helpful Responses **

 

Thanks for your revert but I wanna discuss much more on local rib table
......


As u said local rib table contain best route which is elected after best
path selection algorithm of bgp on adj in rib table but I have seen many
cases where sh ip bgp table ( local rib table ) contain more than one path
for particular prefix and if I check sh ip bgp route than I see only one
path for each prefix ( if bgp multipath is not configured) .


I m still not sure whether local rib table of bgp contain only best path or
all available path for particular .


My query might be silly but sir I wanna discuss much more on this it will
helps other guy too.


Thanks in advance for reply

you are correct; many will be shown in bgp table but only 1 best is selected and placed in the routing table by default.  so,  local rib table will contain all valid and available paths but only best is marked as the best (valid means next-hop IP is reachable).  

 

Regards, ML
**Please Rate All Helpful Responses **

Note and Update: Regarding Local RIB and show ip bgp table output display, there was an argument due to change (at least I think there was) in IOS code some time ago. Old definition from older book says "Loc-RIB contains only the preferred routes that have been selected as the best path to each available destination."  Note that word "best" might not be the best word-choice or was exactly true before the change at the time of book printing.

Newer BGP version of books omit word "best" and say "Loc-RIB— Contains the routes that the BGP speaker has selected by applying its local routing policies to the routes contained in Adj-RIBs-In." Doyle in his Routing TCP/IP vol II 2nd edition says that show ip bgp displays content of Local-RIB before any outgoing policies are applied.  (text near chapt. 4 Example 4.11.)

So, I think now show ip bgp shows Local RIB. Whether this is due to change in IOS code or not I am not sure;  I would recommend Doyle's Routing TCP/IP vol II 2nd edition book for BGP or his both vol I and II books for CCIE learning.

I purchased TCP-IP sometime ago and recently, a year ago or so, got updated Vol II 2nd publishing.  The author explains this process in details later in chapter 4 (reading now).

 

Regards, ML
**Please Rate All Helpful Responses **

Thanks for your discussion about local bgp rib table but I m still in
confusion where bgp best path selection algorithm get applied ...I mean
before formation of local bgp rib table or after local bgp rib table.....

Pls other community also give their valuable feedback whether it's depend
on cisco ios version or there some mandatory rules ..