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

Route-maps and Redistribution

Hi All,

I have a network setup wherein BGP routes are redistributed onto the OSPF process.

router ospf 1

redistribute bgp 100 metric-type 1 subnets route-map ABC

route-map ABC permit 10

match ip address 15

set metric 50

!

route-map DMZ-MPLS-route permit 20

set metric 200

access-list 15 deny   1.1.1.0 0.0.0.255

access-list 15 deny   2.2.2.0 0.0.0.255

access-list 15 deny   3.3.3.0 0.0.0.255

access-list 15 deny   4.4.4.0 0.0.0.255

permit any

Now, since the ACL15 is denying subnets,

1) Does that mean that the first route-map clause (permit 10) does not get used, and it goes to the next clause (permit 20). This would then mark all the routes getting redistibutred into OSPF with a metric of 200

OR

2) The route-map checks ACL 15, matches the "permit any" statement in the end, and sets a metric of 50 for the routes getting redistributed into OSPF?

Please clarify.

Thanks

Mikey

  • WAN Routing and Switching
9 REPLIES
Hall of Fame Super Silver

Route-maps and Redistribution

Mikey

Your question talks about sequence 10 going to sequence 20. But sequence 10 is in one route map and sequence 20 is in a different route map. So it would not go from sequence 10 to sequence 20. If you want it to go from sequence 10 to sequence 20 then both of them must be in route map ABC.

your 1) is not the way that it works.

your 2)  is the way that it works. It would not redistribute 1.1.1.0 or 2.2.2.0 or 3.3.3.0 or 4.4.4.0 and all other routes will be redistributed with metric 50.

HTH

Rick

New Member

Route-maps and Redistribution

Hi Rick,

Thanks for your reply. The Route-maps are the same "ABC" (it's a type error). Sorry about that.

Will it still work like option 2 as you mentioned?? (Even if the Route-map name is the same)

Thanks

Mikey

New Member

Route-maps and Redistribution

Hi,

Could anyone please reply to my query above.

Appreciate your help.

Thanks

Mikey

Hall of Fame Super Bronze

Route-maps and Redistribution

Mikey,

Rick already replied with the correct answer.

Option 2 will be the expected behavior.

New Member

Route-maps and Redistribution

Thanks for confirming Edison.

So, this would mean the 2nd Route-map clause (permit 20) is useless? Since only those four subnets are getting denied, and rest permitted subnets get a metric of 50, there is no way the route-map would consider looking at the 2nd clause?

Please correct me if Iam wrong.

Thanks

Mikey

Hall of Fame Super Bronze

Route-maps and Redistribution

What exactly are you trying to accomplish?

It seems you want every subnet to have Metric 50 with the exception of those subnets?

If so, the first route-map entry is doing its job.

Then you also want every subnet to have Metric 200 ?

It makes no sense there..

New Member

Route-maps and Redistribution

The use of the ACL is to prefer routes being redistributed from one Service provider over the other.

I haven't configured these route-maps. They have been in my network setup for a long time. Even I couldn't understand the actual usage of sequence "permit 20", and hence needed to clarify  in the forum here.

Thanks

MIkey

Route-maps and Redistribution

Hi,

the prefixes matching the ACL 15 will get the metric 50 by the  route-map sequence 10.

The prefixes not matching the ACL 15 (i.e., those denied by it) will get the metric  200 by the  route-map sequence 20.

I'd probably use a reverse logic to get the same efect:

route-map ABC permit 10

match ip address 15

set metric 200

!

route-map ABC permit 20

set metric 50

!

access-list 15 permit 1.1.1.0 0.0.0.255

access-list 15 permit 2.2.2.0 0.0.0.255

access-list 15 permit 3.3.3.0 0.0.0.255

access-list 15 permit 4.4.4.0 0.0.0.255

!

But it's just a question of personal style how to write Cisco configs.

HTH,

Milan

New Member

Route-maps and Redistribution

Hi Milan,

It sure does make sense now. I would definitely go with your logic if given a chance. Saves everyone all the confusion.

Appreciate your inputs.

Thanks

Mikey

412
Views
4
Helpful
9
Replies
This widget could not be displayed.