Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: Filtering Redistributed OSPF Routes

Filtering Redistributed OSPF Routes 9 years 1 week ago #24090

  • RA1313IT
  • RA1313IT's Avatar
  • Offline
  • New Member
  • Posts: 19
  • Karma: 0
Hello,

I manage several Cisco routers and am running OSPF on them. Because the routing table is so large, I am using the redistribute command to automatically redistribute these routes into OSPF.

I would like to find a way to prevent a particular route from being advertised via OSPF. I see there is a distribute-list command. Can I use this to create an access list to prevent this route from being advertised?

For example if I wanted to prevent the 192.168.1.0/24 network from being advertised, I'd...

ip access-list 1
deny 192.168.1.0 0.0.0.255
permit any

router ospf 1
redistribute connected subnets
redistribute static subnets
distribute-list 1 out

Am I on the right track or is this not possible?

Thanks
The administrator has disabled public write access.

Re: Filtering Redistributed OSPF Routes 9 years 1 week ago #24103

  • Elohim
  • Elohim's Avatar
  • Offline
  • Senior Member
  • Posts: 220
  • Karma: 0
You're on track.
The administrator has disabled public write access.

Re: Filtering Redistributed OSPF Routes 9 years 2 days ago #24144

  • havohej
  • havohej's Avatar
  • Offline
  • Distinguished Member
  • Posts: 152
  • Karma: 0
men, you can do it also with a route map followed by the redistribute command.
Withing the route-map you must match a prefix-list or access-list of the route you want to deny and in the route-map you must define the action of filtering (deny) or permitting (permit) the routes you match.

Hope you dont confuse.

for your example:

lets suppose R3 is learning 192.168.1.0/24 network from an eigrp neighbor. R3 is also redistributing eigrp into ospf.

router ospf 1
log-adjacency-changes
redistribute eigrp 10 subnets route-map REDIST-EXCEPT-NET-10
network 192.168.30.2 0.0.0.0 area 0
!
!
!
ip http server
no ip http secure-server
!
!
ip prefix-list NET-10 seq 5 permit 192.168.1.0/24
!
route-map REDIST-EXCEPT-NET-10 deny 5
match ip address prefix-list NET-10
!
route-map REDIST-EXCEPT-NET-10 permit 20


lets look at R4 route table after the redistribution doing the filtering (ospf neighbor of R3)

r3#show ip route ospf
139.1.0.0/24 is subnetted, 1 subnets
O E2 139.1.58.0 [110/20] via 192.168.30.2, 00:01:48, FastEthernet0/1
O E2 192.168.2.0/24 [110/20] via 192.168.30.2, 00:01:48, FastEthernet0/1
O E2 192.168.3.0/24 [110/20] via 192.168.30.2, 00:01:48, FastEthernet0/1


learns all except 192.168.1.0/24

cheers!
The administrator has disabled public write access.
Time to create page: 0.077 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup