08-24-2013 03:19 AM - edited 03-04-2019 08:51 PM
Hi,
I create a LAB and try to apply set tag and match tag for loop prevention.
I used R1 ,R2,R3 BGP and R2-R4 ,R3-R5 OSPF now I want to set tag on R2 side for OSPF so that I can match it and deny it on R3 side!!!!
I have attached my lab with this post.
I am pasting R2 and R3 config here :
R2::::
router ospf 1
log-adjacency-changes
redistribute bgp 200 subnets
network 192.168.1.0 0.0.0.255 area 1
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 200.200.200.0
redistribute ospf 1 match internal external 1 external 2 route-map TAG
neighbor 200.200.200.1 remote-as 100
no auto-summary
!
no ip http server
no ip http secure-server
!
!
!
!
route-map TAG permit 10
set tag 50
!
!
!
R3:::::::::
router ospf 1
log-adjacency-changes
redistribute bgp 300 subnets route-map TAG
network 192.168.2.0 0.0.0.255 area 1
distribute-list route-map TAG in
!
router bgp 300
no synchronization
bgp log-neighbor-changes
network 200.200.201.0
redistribute ospf 1 match internal external 1 external 2
neighbor 200.200.201.1 remote-as 100
no auto-summary
!
no ip http server
no ip http secure-server
!
!
!
!
route-map TAG deny 10
match tag 50
!
route-map TAG permit 20
!
so my problem is why R2's OSPF not stoping at R3 where I used match tag???
Thanks
Solved! Go to Solution.
08-24-2013 09:15 AM
Anand,
The distribution-list technique can be really hard to maintain in a real life network as the list needs to be modified every time a new prefix is added somewhere in the network. The route-map (set tag/match tag) technique is really easy to maintain.
Regards
08-24-2013 04:31 AM
Hi Anand,
you cannot use a route-map with set tag when redistributing an IGP into BGP, see "Table 2" in
Route-Maps for IP Routing Protocol Redistribution Configuration
When doing so, may IOS display a message like:
% "TAG" used as redistribute ospf into bgp route-map, set tag not supported
Hope that helps
Rolf
08-24-2013 09:09 AM
Thanks I also saw this so I also used distribution-list to match route-map
08-24-2013 09:15 AM
Anand,
The distribution-list technique can be really hard to maintain in a real life network as the list needs to be modified every time a new prefix is added somewhere in the network. The route-map (set tag/match tag) technique is really easy to maintain.
Regards
08-24-2013 12:17 PM
I tried like this ....
R2:::::
router eigrp 1
redistribute ospf 1 metric 30000 1 255 255 1500 route-map TAG
network 200.200.200.0
auto-summary
!
router ospf 1
log-adjacency-changes
redistribute eigrp 1 subnets
network 192.168.1.0 0.0.0.255 area 1
!
route-map TAG permit 10
set tag 50
R3:::::
router eigrp 1
redistribute ospf 1 metric 30000 1 255 255 1500
network 200.200.201.0
auto-summary
!
router ospf 1
log-adjacency-changes
redistribute eigrp 1 subnets route-map TAG
network 192.168.2.0 0.0.0.255 area 1
!
no ip http server
no ip http secure-server
!
!
!
!
route-map TAG deny 10
match tag 50
!
route-map TAG permit 20
sometimes there is an option after redistribute command TAG but sometimes dont so I think we should use route-map This is working now my R2 OSPF routes not showing in R5
Thanks 4 help happy now
Is there any way to check TAG is working or not other than check in route table ???
Thanks,
08-24-2013 08:30 AM
Hi Anand,
As Rolf mentioned, you can't set tag in BGP. The equivalent of tag in BGP would be community. Generally though, when you do mutual redistribution between BGP and an OSPF at multiple point in the network and you to make sure that there will not be loops, you should rather tag the routes when redistributing from BGOP to OSPF and deny these routes when redistributing back from OSPF to BGP.
Regards
08-24-2013 09:05 AM
Thanks again ,but I couldnt do it properly on EIGRP to OSPF as well
Any material ???so I can learn my self ,I checked some sites but tuff examples
Thanks
08-24-2013 09:11 AM
Hi Anand,
The same would apply for EIGRP to OSPF redistribution. You would set a specific tag when redistributing from EIGRP to OSPF and then deny routes that match that same specific tag when redistributing from OSPF to EIGRP.
Regards
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: