cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
855
Views
0
Helpful
3
Replies

bgp-rip interaction

Hi,

  I have a question on bgp-rip interaction. Your help is highly appreciated. I have following topology.

|R1|------|R4|-----|R2|

R1 and R2 are having route 192.168.50.0  learned by some other means(not from R4) which is out of this question.

EBGP session exists between R1 and R4

RIP exists between R2 and R4

R4 bgp config:

router bgp 75

no synchronization

bgp log-neighbor-changes

network 192.168.50.0

neighbor 5.5.5.5 remote-as 200 -------------> R1

neighbor 5.5.5.5 ebgp-multihop 2

neighbor 5.5.5.5 update-source Loopback0

no auto-summary

Both R1(via BGP) and R2(via RIP) are advertising 192.168.50.0 to R4. Since BGP administrative distance is 20, R1's route was chosen which is obvious.

I wanted R4 to choose R2 instead of R1 for this route. Thats why I added "network" statement in R4's bgp config, assuming that route will be treated as Local and an administrative distance 200 will be assigned to that route and in turn R2's route will be chosen. Here, the problem starts. If RIP route is already there in the routing table and BGP routes is learned later, then it is working as explained above(route pointing to R2). However, if bgp route comes first and then rip route, routing table is always pointing to R1(bgp). "show ip bgp 192.168.50.0" tells me that route is not treated as Local in the second case. Is this expected? How to get rid of this problem? Please let me know your thoughts.

Thanks,

Balajee

3 Replies 3

Peter Paluch
Cisco Employee
Cisco Employee

Hi Balajee,

Yes, this is expected. If the BGP route is learned first then the RIP-learned route does not make it into the routing table and the network command has nothing to operate upon - it obviously cannot reinject a route learned from a BGP process back into the same process.

I believe that what would help here is to define the network as a backdoor network using the command

network 192.168.50.0 backdoor

This will make the network to be continually treated as locally injected, even if it is learned via BGP and there is no RIP or other routing protocol advertising that route as well. In addition, a backdoor network will not be advertised further by BGP. You may read more about the behavior in these documents:

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml#bgpbackdoor

http://www.cisco.com/en/US/docs/ios-xml/ios/iproute_bgp/command/bgp-n1.html#GUID-667F2CDD-1436-4F73-A309-AAD9151A8B50

Best regards,

Peter

Thanks for your response peter. But, when bgp scanner re-runs(may be every hour), it wont consider the rip route?

It will not. let me explain you the behavior you are seeing

The BGP network  command will add the route to BGP table  if the route is present in BGP table

When you learn the RIP route first,

========================

1. The RP route is installed in routing table

2. because it is installed in routing table, it gets added to your BGP table too becasue of the netwrok command

3. Now you learn the same route via EBGP. Now there is 2 paths present in BGP. One local with weight 32768 and one learned via EBGP. So your local route is best route (weight of local route is 32768)

When you learn the route from EBGP first

=============================

1. The BGP table learns the prefix.

2. BGP installs this route in routing table becasue there is no other routes present

3. Now you learn RIP prefix . But this will not make into routing table becasue the BGP route is already present in the routing table with AD of 20. The RP route will not enter into BGP table becasue now it is not there in routing table

4. Now your BGP table for prefix will have only one path present in BGP table which is learned via BGP. So even if BGP scanner runs, it has only one route to compare which is already present in routing table

Now let us look at alternative to reach your requirement

=======================================

Distance command on RIP should meet your requirement

R4.

Access-list 11 permit 192.168.50.0 0.0.0.255 --->> I assume your subnet is /24.

router RIP

distance 15   0.0.0.0 11

this will install the RIP route with admin distance of 15 on R4

/Raju

Review Cisco Networking for a $25 gift card