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

route-maps for redistribution

Amafsha1
Level 2
Level 2

Hello folks,

 

 

I'm wondering when do i have a route-map used at redistribution and when do I use a route-map against the neighbor.

 

for example, i have the following BGP peering with redistribution attached.

 

 

Router1#

 

router bgp 65425

  address-family ipv4 unicast

  neighbor 172.30.30.30 remote-as 64436

 

router eigrp 100

redistribute static route-map static-to-eigrp

redistrbute bgp 65425 route-map static-to-eigrp

default-information originate

 

 

route-map static-to-eigrp permit 100 (permits all routes)

 

so all static routes get redist into eigrp and all bgp 65425 learned routes can be freely redist into eigrp as you can see in the configs above.

 

Now my question is lets say we want to add a new neighbor from a different AS as I have updated the configs below to reflect that.

 

 

Router1#

 

Updated configs:


!
router bgp 65425
  address-family ipv4 unicast
  neighbor 172.30.30.30 remote-as 64436
  neighbor 10.10.10.90 remote-as 65900
  neighbor 10.10.10.90 route-map block-default-route in
  redistribute eigrp 1 route-map eigrp-redist-bgp
  neighbor 10.10.10.90 route-map eigrp-to-bgp out
!
!
!
route-map block-default-route deny 20
match ip address blk-dflt
route-map block-default-route permit 100
!
route-map eigrp-redist-bgp permit 100 

!

ip prefix-list blk-dflt seq 5 permit 0.0.0.0/0
!
route-map eigrp-to-bgp permit 100

!

router eigrp 100

redistribute static route-map static-to-eigrp

redistrbute bgp 65425 route-map static-to-eigrp

default-information originate

!

route-map static-to-eigrp permit 100 (permits all routes)

!

 

 

 

 

so now I don't really know what is the point of putting a neighbor outbound route-map on that bgp process as opposed to the redistriubtion as I highlighted in the configs.   If I want to control what I advertise to the neighbor, isn't that redistribution good enough because I can just block what route I dont want redistributed.  So I want to understand what is the benefit to having both the redistribution command and the outbound neighbor route-map.  Is keeping both a good idea.  I essentially want the neighbor to learn all my routes via redistribution 

 

 

 

 

 

2 Accepted Solutions

Accepted Solutions

Francesco Molino
VIP Alumni
VIP Alumni
Hi

I won't discuss the naming convention of route-maps which are very important when troubleshooting.

Let's assume you've 2 prefixes in your eigrp: 1.1.1.0/24 and 2.2.2.0/24
Also you have 2 static routes for 2 prefixes: 3.3.3.0/24 and 4.4.4.0/24.

You want to redistribute all these subnets into your bgp for all peers. So your route-map sequence permit all will be ok. Now you add a bgp peering with a partner or site but you want to advertise only the prefix 1.1.1.0/24. In that case you'll do a route-map attached to the neighbor to filter what prefixes you'll send him and keep advertising all prefixes to all other bgp.

So, it's not the same. The redistribution controls what you inject into your bgp coming from other routing protocols while the other is to filter for specific neighbors.
Does that make sense?

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

View solution in original post

can you share the sh run | sec route-map inbound-advertise

I just want to confirm what i saw in the output. I believe you've done match ip address instead of match ip add prefix

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

View solution in original post

3 Replies 3

Francesco Molino
VIP Alumni
VIP Alumni
Hi

I won't discuss the naming convention of route-maps which are very important when troubleshooting.

Let's assume you've 2 prefixes in your eigrp: 1.1.1.0/24 and 2.2.2.0/24
Also you have 2 static routes for 2 prefixes: 3.3.3.0/24 and 4.4.4.0/24.

You want to redistribute all these subnets into your bgp for all peers. So your route-map sequence permit all will be ok. Now you add a bgp peering with a partner or site but you want to advertise only the prefix 1.1.1.0/24. In that case you'll do a route-map attached to the neighbor to filter what prefixes you'll send him and keep advertising all prefixes to all other bgp.

So, it's not the same. The redistribution controls what you inject into your bgp coming from other routing protocols while the other is to filter for specific neighbors.
Does that make sense?

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

 

Hey Francesco,

 

Would you by any chance be able to tell me why when the neighbor on the other side advertises a random route like 192.168.1.1 it gets dropped by my route-map?

The debug says the route-map inbound-advertise is dropping the packets.  

 

 

 

router bgp 65426
neighbor 172.28.20.10 remote-as 65422

address-family ipv4 unicast
route-map inbound-advertise in

 

 

 

route-map inbound-advertise, deny, sequence 10
Match clauses:
ip address (access-lists): inboundadv
Set clauses:
route-map inbound-advertise, permit, sequence 200
Match clauses:
Set clauses:

 

ip prefix-list inboundadv seq 5 permit 0.0.0.0/0

can you share the sh run | sec route-map inbound-advertise

I just want to confirm what i saw in the output. I believe you've done match ip address instead of match ip add prefix

Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question
Review Cisco Networking products for a $25 gift card