router : ospf : config distribute-list
 
config distribute-list
Use this subcommand to filter the networks for routing updates using an access list. Routes not matched by any of the distribution lists will not be advertised.
You must configure the access list that you want the distribution list to use before you configure the distribution list. To configure an access list, see router access-list, access-list6.
The access-list and protocol fields are required.
Variable
Description
Default
edit <distribute-list_id>
Enter an ID number for the distribution list. The number must be an integer.
No default.
access-list <name_str>
Enter the name of the access list to use for this distribution list.
Null
protocol {connected | rip | static}
Advertise only the routes discovered by the specified protocol and that are permitted by the named access list.
connected
Example
This example shows how to configure distribution list 2 to use an access list named acc_list1 for all static routes.
config router ospf
config distribute-list
edit 2
set access-list acc_list1
set protocol static
end
end