cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1306
Views
5
Helpful
5
Replies

BGP inbound prefix add tag

Support ACME
Level 1
Level 1

Dear ALL,

 

We are setup the network to using AWS service, we have two peering to AWS, one is public peering to receive the internet prefix, one is private peering to receive the private prefix, now the two peering to AWS is fine.

We want to use tag to separate internet prefix and internal prefix and announce into OSPF, i have set the BGP community for public peering and private peering, but i can't use match community  to add the tag.

anyone can help?

 

AWS(BGP)-> internet facing FW(BGP)->internal FW(BGP+OSPF)->internal switch(OSPF)

 Support

5 Replies 5

 

Hi

   With route-map you can use "set tag X"  and then you can redistribute into OSPF with that route-map.

 

 

 

this not work, 

 

below is my configuration

 

router bgp 65532
bgp router-id 10.255.255.10
bgp log-neighbor-changes
neighbor 10.194.0.253 remote-as 65531
!
address-family ipv4
redistribute connected
redistribute ospf 1 metric 2 match internal external 1 external 2 nssa-external 1 nssa-external 2
neighbor 10.194.0.253 activate
neighbor 10.194.0.253 default-originate route-map OSPF-to-BGP
neighbor 10.194.0.253 weight 50000
neighbor 10.194.0.253 route-map 10-IN in
neighbor 10.194.0.253 route-map 10-OUT out
no auto-summary
no synchronization
exit-address-family
!
!
ip community-list 2 permit 2000
!
!
!
route-map 10-IN permit 10
match community 2
set tag 2000

 

I get this error when set the route-map

% "10.194.0.253-IN" used as BGP inbound route-map, set tag not supported

see my below comment 

Harold Ritter
Spotlight
Spotlight

Hi @Support ACME ,

 

You can accomplish that using a table-map.

 

router bgp 999

table-map setTag

!

route-map setTag permit 10
match community 1
set tag 998
route-map setTag permit 20
match community 2
set tag 999

!

ip community-list 1 permit 2:1
ip community-list 2 permit 2:2

,

You can use a prefix-list or an access-list as a match instead of the community-list if you want.

 

Regards

 

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

I do lab and finally I success to add TAG to eBGP prefix when it redistribute from eBGP into OSPF after match the community,
BUT 

the trick is not apply match community directly under the route-map BUT we will match ext community-list 

match the community we receive from eBGP and set TAG as we want.
so instead of use community use extcommunity-list