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

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

For an introduction to the new site, click here. And see here for current known issues.

New Member

OSPF and distribute list


I have a strange problem here , have hub router with 2 branches, ospf is running between the hub and the branches only

Hub advertising the LANs between the branches and sending default route also by default information originate

what I need now is to allow the default route only to be in the routing table of the branches , I use distribute list on the branch with access list


problem that all routes disappear even the default route

I tried to use prefix list , route maps with distribute list but there is no joy

the only way to keep the default route is to allow another single route at leaset is variably subnetted, 2 subnets, 2 masks

O [110/65] via, 00:08:54, Serial0/1.16

O*E2 [110/1] via, 00:08:54, Serial0/1.16


but I can't deny all the routes and permit the default only , is there any reason for that

note : all routers in area 0


Hall of Fame Super Silver

Re: OSPF and distribute list

Hello Oamen,

you can achieve the desired result by using a totally stub area on the branch routers: the distribute-list is not the correct tool with OSPF because it can just filter the route installation in the branch routing table but it does not reduce the size of OSPF database on the branch routers.

For this reason I recommend to use a totally stub area with HQ router acting as ABR between area 0 and the totally stub area.

or you should see if you can use an extended ACL or a prefix-list with the distribute-list command if the OSPF domain is made only of these three routers

If the OSPF domain were a big one the usage of the totally stub area makes the difference.

Hope to help


New Member

Re: OSPF and distribute list

Hello Giuseppe

The network is around 1 Hub and 20 branches ,

problem in stub area and why I can't use it


I have 2 choices either to put all the branches in area 1 , and hub in area 0 , this way stub is not working and routes advertised to the stub router ( as they are actually in the same area)

Or to put every branch in a different area , this way I need 20 areas to be connected to the same hub , which is not recommended by Cisco ( only 3 areas per router )

my concern here is to have one default route ( not for memory saving )but for other concerns.

Thanks if you have any other ideas ,

Note : I tried the prefix list with the same result

tried to deny the specific routes and then permit any >>> same results , can't keep the default route only in the Routing table



Hall of Fame Super Silver

Re: OSPF and distribute list

Hello Moamen,

yes if there are multiple branch routers you will receive the routes of the other branch routers regardless of the type of area used just because there is no intra-area filtering.

Using a separate area allows you to filter all the O IA routes coming from area 0 if it is a totally stub area.

This can be a benefit if there are other and many routes in area 0.

You can achieve what you want with a different protocol like EIGRP.

However, the routes of 20 branch shouldn't be a problem (at level of performance it can be a security/policy issue) so I would also consider to just move them in a totally stub area.

Hope to help