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

Restrict OSPF routes

sqambera
Level 1
Level 1

Hello,

I am running OSPF on my routers. On Internal routers I want to stop receiving and forwarding any subnet information that are not directly connected to it. In other words I don't want any of my router with none of its interface in area 0 to have any route except the default route towards ABR/ASBR. Could somebody please let me know how to do that?

Thanks in advance,

Qamber

2 Accepted Solutions

Accepted Solutions

I think the only way to avoid ABR1 from routing traffic to R2 via R1 is to configure the ABR2 to R2 link into an different OSPF area such as area 2. Is this possible?


I don’t think configuring area 1 as a stub will fix the issue as stub areas (totally stub, totally nssa) will only suppress type3 to 5 LSAs and replace with a default type-3. Type-1 LSAs will still be flooded throughout area 1 so ABR1 will still prefer the path to R2 via R1 -> ABR2 -> R2.

 

View solution in original post

BTW, what I've suggesting I've done on production networks, to exactly avoid the situation you're trying to avoid.

I've done it both using physical links between ABRs and using "logical" links between ABRs.  The latter might be accomplished using VLANs and trunks, subinterfaces, or GRE/MPLS tunnels.  All you need is OSPF to "see" a better path between the two ABRs that doesn't transit another router.  The latter is also useful if you summarize address blocks to area zero as its traffic will not "know" where the closest ABR is for the destination network.

View solution in original post

18 Replies 18

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

If you have multiple areas besides area0, you configure them as NSSA.  NSSA will only have a default router towards area 0.

See link for diagram and more info:

http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/6208-nssa.html

HTH

Hi, Im not sure if I understand the question properly but please check this link, it could be what you want:

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/configuration/15-mt/iro-15-mt-book/iro-abr-type-3.html




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Thanks for your reply. Let me try to explain further my intent with help of scenario. Also I am attaching the diagram.

I have two ABR routers ABR1 and ABR2 directly connected to each other. Area 0 is configured between them. There are two routers R1 and R2 configured in Area1 with their LAN and WAN interfaces. But R2 router has WAN connection only with ABR2 whereas R1 has WAN connections with both ABR1 and ABR2.

In this situation when ABR1 forwards traffic destined to LAN interface of R2, it uses the path via R1 because OSPF prefers intera area routes over inter area routes. I want ABR1 to forward this traffic via ABR2.

I was thinking if probably R1 would stop sending and receiving information about R2 LAN then ABR1 will not send any traffic destined to R2 LAN via R1. Probably this is analogous to EIGRP stub feature.

I am facing this situation because R1 and R2 are my two branches configured in area 1. I have two headquarters with ABR1 and ABR2 in them. The location where there is R1 I have two ISPs that connects to both headquarters but R2 has only one ISP which can connect to only ABR2.

I hope it clarifies the question. Thanks again for your time to answer it.

Regards,

Qamber 

Hello


if probably R1 would stop sending and receiving information about R2 LAN then ABR1 will not send any traffic destined to R2 LAN via R1

If R1 and R2 are individual branch offices why would you be advertising each others subnets, do they also have a redundant connection between each other?

res
Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Because both R1 and R2 are in same OSPF area. There is no redundant connection between them.

Hello 

Appologies but this is still isn't clear to me - even if both rtrs are in the same area why would your be advertising R2 prefixes from R1 There isn't any requirement  to do this- is there?

If they both just advertise there own local subnets then the traffic towards R1 or R2 should traverse the correct way and not transit 

res

paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Both R1 and R2 are only advertising there own local subnets under OSPF configuraiton. However, since they are in the same OSPF area, when R1 sees R2 subnet it advertises it to next router which is ABR1. Now, ABR1 knows that R2 subnet is reachable without switching area (Area 1). Therefore, ABR1 forwards the traffic destines for R2 using this path: ABR1 > R1 > ABR2 > R2. Whereas, we want traffic path to be as ABR1 > ABR2 > R2 

Hello,

I do not think that you can forward the traffic to ABR2 with the current design because OSPF prefers intra-area routes over inter-area regardless of link cost.

You can place R2 in another area(for instance area 2). In this case, ABR2 will be the next router in the path.

Or you can use a route-map to forward the traffic toward ABR2; however, you will lose redundancy in this case.

Lets see others' opinions.

Best,

Masoud

Hello 

Thanks for the clarification- I think this has already been suggested

Make ASBR2 <area2---> R2

res

Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

I think the only way to avoid ABR1 from routing traffic to R2 via R1 is to configure the ABR2 to R2 link into an different OSPF area such as area 2. Is this possible?


I don’t think configuring area 1 as a stub will fix the issue as stub areas (totally stub, totally nssa) will only suppress type3 to 5 LSAs and replace with a default type-3. Type-1 LSAs will still be flooded throughout area 1 so ABR1 will still prefer the path to R2 via R1 -> ABR2 -> R2.

 

Yes even though I didn't want to but probably configuring ABR2 to R2 in a different area seems to be the only possible option.

Thanks again for your help.

Regards,

Qamber

Hello

I am not sure what you are asking here -

But if you wish to not received ospf transit prefixes into a particular area then ip ospf prefix-suppression specified on any ospf enabled interface, will negate it from being adverted in ospf, and it wont effect any adjacency either.

res
Paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thanks for your reply. Let me try to explain further my intent with help of scenario. Also I am attaching the diagram.

I have two ABR routers ABR1 and ABR2 directly connected to each other. Area 0 is configured between them. There are two routers R1 and R2 configured in Area1 with their LAN and WAN interfaces. But R2 router has WAN connection only with ABR2 whereas R1 has WAN connections with both ABR1 and ABR2.

In this situation when ABR1 forwards traffic destined to LAN interface of R2, it uses the path via R1 because OSPF prefers intera area routes over inter area routes. I want ABR1 to forward this traffic via ABR2.

I was thinking if probably R1 would stop sending and receiving information about R2 LAN then ABR1 will not send any traffic destined to R2 LAN via R1. Probably this is analogous to EIGRP stub feature.

I am facing this situation because R1 and R2 are my two branches configured in area 1. I have two headquarters with ABR1 and ABR2 in them. The location where there is R1 I have two ISPs that connects to both headquarters but R2 has only one ISP which can connect to only ABR2.

I hope it clarifies the question. Thanks again for your time to answer it.

Regards,

Qamber 

Have you considered running area 1 on a link between your two ABRs?  Depending on your device, you might be able to run both area 0 and area 1 on the existing link between your ABRs that's currently in area 0.

Review Cisco Networking for a $25 gift card