Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

TAG problem in OSPF-BGP

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

  • WAN Routing and Switching
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

TAG problem in OSPF-BGP

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

7 REPLIES

TAG problem in OSPF-BGP

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

New Member

TAG problem in OSPF-BGP

Thanks I also saw this so I also used distribution-list to match route-map

Cisco Employee

TAG problem in OSPF-BGP

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

New Member

TAG problem in OSPF-BGP

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,


Cisco Employee

TAG problem in OSPF-BGP

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

New Member

TAG problem in OSPF-BGP

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

Cisco Employee

TAG problem in OSPF-BGP

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

1936
Views
5
Helpful
7
Replies
This widget could not be displayed.