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

ospf route/path manipulation

hi there,

I'm having some issues getting our OSPF route selection to work properly.

From two separate data-centres (HK and AMS) we're redistributing BGP routes in to OSPF and tagging different subnets via route-maps.

The tags are because we have some sites we need to route via HK, and some we need to route via AMS. We want to use the tags to identify the route we don't want, and drop it in favour of the remaining one that we do.

The OSPF sites (all are area 0) pick up the routes and tags fine when just from one source.

Here's a test example:

--

R3#sh ip route 192.168.100.0

Routing entry for 192.168.100.0/24

  Known via "ospf 1", distance 110, metric 20

  Tag 200, type extern 2, forward metric 1

  Last update from 3.3.3.1 on FastEthernet0/0, 00:00:04 ago

  Routing Descriptor Blocks:

  * 3.3.3.1, from 1.1.1.1, 00:00:04 ago, via FastEthernet0/0

      Route metric is 20, traffic share count is 1

      Route tag 200

--

R3#sh ip route 192.168.100.0

Routing entry for 192.168.100.0/24

  Known via "ospf 1", distance 110, metric 20

  Tag 100, type extern 2, forward metric 1

  Last update from 2.2.2.2 on FastEthernet0/1, 00:00:00 ago

  Routing Descriptor Blocks:

  * 2.2.2.2, from 2.2.2.2, 00:00:00 ago, via FastEthernet0/1

      Route metric is 20, traffic share count is 1

      Route tag 100

--

When I put in a distribute-list I can also successfully match & drop the tagged route.

However, when both hit R3 at the same time, something strange seems to happen - we get both routes but the tags get made the same:

--

R3#sh ip route 192.168.100.0

Routing entry for 192.168.100.0/24

  Known via "ospf 1", distance 110, metric 20

  Tag 100, type extern 2, forward metric 1

  Last update from 3.3.3.1 on FastEthernet0/0, 00:00:35 ago

  Routing Descriptor Blocks:

    3.3.3.1, from 1.1.1.1, 00:00:35 ago, via FastEthernet0/0

      Route metric is 20, traffic share count is 1

      Route tag 100

  * 2.2.2.2, from 2.2.2.2, 00:08:24 ago, via FastEthernet0/1

      Route metric is 20, traffic share count is 1

      Route tag 100

--

As you see, they both say tag 100 instead of 100 & 200 when only one route is received. This stops us identifying and dropping one of them.

Any ideas? Is this normal behaviour?

thanks a lot

David

Everyone's tags (4)
3 REPLIES
Community Member

Re: ospf route/path manipulation

All these subnets in area 0 are directly connected? You should look at DR and BDR selection and ospf databases.

Sent from Cisco Technical Support iPhone App

Cisco Employee

ospf route/path manipulation

Hi David,

A routing table entry can have only a single tag in it.  It will not  support two different tags in routing table entry.

From what I have observed, this tag which is used is selected based on the highest router ID.  The tagging done by  ASBR which has highest router ID wll be used.

In your case, 2.2.2.2 is higher than 1.1.1.1. And hence tag 100.

You may can confirm this by changing the router ID.  I did not find any documents which talks about this preference.

Regards,

Sudeep

Community Member

ospf route/path manipulation

thanks for the replies guys,

Normally, the routers won't all be directly connected; the output is just from a gns3 test I setup.

Sudeep, you're right, it does follow the highest router ID.

Any ideas how I can manipulate the routes in the way I want? Basically the design specifies that some routers are to exit via one ASBR, and some to exit via a different ASBR depending on the destination subnet.

Unfortunately, the design requirements specify that it's not just one exit point (ASBR/hub) for a destination subnet (so I can't just advertise a higher metric from one hub for a certain subnet).

e,g, Site A (in OSPF area0) would need to traverse ASBR A to get to site C in BGP

Site B in (OSPF area0) would need traverse ASBR B to get to site C in BGP.

hope that makes sense!

thanks again

David

2398
Views
5
Helpful
3
Replies
CreatePlease to create content