07-01-2008 04:53 AM - edited 03-03-2019 10:33 PM
HI,
I'm studing for BGP exam but I have some doubts on how the redistribution process works, so I would like to discuss about it. Netpro.txt contains the explanation of the issue, and confs.rar the configurations of the small lab I created.
Thanks in advance.
Marco.
07-01-2008 05:18 AM
Why are you giving TAG 1000? - Can you remove and check?
Thanks,
Dharmesh Purohit
07-02-2008 04:13 AM
Hi Purohit,
router tagging does not influence the routing decisions in this case. I left the tagging since I was doing other "experiments" ;-)
Thanks
Marco
07-02-2008 04:27 AM
The reason for the behavior you are seeing is due to the fact that BGP does not use Administrative distance while choosing the best path.
BGP receives 2 paths one from the neighbor and one via redistribution before it applies the best path algorithm.
As algorithm, a route originated from the router would be preferred which in your case is due to the redistribution.
The Protocol is behaving at it should and is not any IOS bug
HTH
Narayan
07-02-2008 03:36 PM
---
BGP receives 2 paths one from the neighbor and one via redistribution before it applies the best path algorithm.
As algorithm, a route originated from the router would be preferred which in your case is due to the redistribution.
---
Hi Narayan,
thank you for your answer
OK, but the IOS has two routes that are in competition for the a "place" in the routing table (after BGP calculates the best path):
1st - the static route (with lower admin distance)
2nd - the BGP redistributed route
If you take a look to the "show ip bgp" command on R4, the algorithm clearly chooses as best path(>)the redistributed route:
* i10.1.2.0/24 10.3.4.1 0 100 0 ?
*> 0.0.0.0 0 32768 ?
Now, all the documentation I've read until now, says that the router with ">" is installed in the forwarding table, but problably, in this case where the IOS have to choose which route to install between a static and a redistributed one, there is an exception and th admin. distance is not taken in account.
If you are sure about that, I trust you , since I didn't find any documentation about that.
Thanks
Marco
07-02-2008 04:24 PM
Marco
When BGP injects a local route into the BGP table, it gives it a weight of 32768, by default. In your case, it is the statuc learned route that is getting injected into BGP with a weight of 32768. The same route is also being learned via EBGP. EBGP routes, by default, will be given a weight of 0 and a local preference of 100. Now, the BGP table will have two routes for the same prefix - which you will see if you enter in 'sh ip bgp
Since the route learned via static is faster (as it is configured first) and then when you redistribute it into BGP, the best apth algorithm chooses the locally redistributed route. If you had configured the static route at R4 after the BGP configuration, you would have seen the route as being learnt via BGP.
If you want to always prefer the route via BGP, then you would need some kinda route-map
At R4
router bgp 34
redistribute static route-map static2BGP
route-map static2BGP permit 10
match ip address 10
set weight 0
set local-preference 50
access-list 10 permit 10.1.2.0 0.0.0.255
HTH
Narayan
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: