redistribute RIP routes

m4rtinm4rtin Senior MemberMember Posts: 170
I have a following simple topology:
R1 <-> R2 <-> R3 <-> R4

"R1" speaks RIPv2 with "R2" and "R3" speaks RIPv2 with "R4". "R2" and "R3" speak BGP with each other. I would like to distribute only those routes to "R4", which "R2" learned from "R1" via RIP. I made a "route-map" to "R2" router which matches all the prefixes which have a source-protocol RIP and sets BGP community to 1234:
route-map received-from-RIP permit 10
 match source-protocol rip
 set community 1234

I use this "received-from-RIP" route-map when I redistribute RIP routes to BGP in "R2" router("redistribute rip route-map received-from-RIP"). Now "R3" receives those routes with BGP tag 1234 and redistributes those routes to RIP using "BGP-community-1234-to-RIP" route-map, which matches BGP prefixes with community 1234:
ip community-list expanded community-1234 permit 1234
route-map BGP-community-1234-to-RIP permit 10
 match community community-1234 exact-match

This should work, but are there more elegant ways to achieve this?


Sign In or Register to comment.