06-27-2008 01:33 AM - edited 03-03-2019 10:31 PM
i have 3 routers in ospf area 0.
SW1-
interface Vlan1
ip address 9.9.9.1 255.255.255.248
ip ospf network non-broadcast
ip ospf dead-interval minimal hello-multiplier 10
!
router ospf 1
log-adjacency-changes
network 9.9.9.0 0.0.0.7 area 0
neighbor 9.9.9.2
neighbor 9.9.9.3
R2-
interface GigabitEthernet0/0
description ### Int to AS65337 ###
ip address 9.9.9.3 255.255.255.248
ip ospf network non-broadcast
ip ospf dead-interval minimal hello-multiplier 10
ip ospf priority 0
duplex auto
speed auto
media-type rj45
!
router ospf 1
log-adjacency-changes
redistribute bgp 65334 subnets route-map Redistrib
network 9.9.9.0 0.0.0.7 area 0
R3-
!
interface GigabitEthernet0/0
description ### Int to AS65337 ###
ip address 9.9.9.2 255.255.255.248
ip ospf network non-broadcast
ip ospf dead-interval minimal hello-multiplier 10
ip ospf priority 0
duplex auto
speed auto
media-type rj45
!
!
router ospf 1
log-adjacency-changes
network 9.9.9.0 0.0.0.7 area 0
!
R2 redistribute routes from BGP into OSPF and SW1 and R3 got that routes as O E2.
I don't want to have that routes at R3. How it's possible to block O E2 routes at R3?
Solved! Go to Solution.
06-27-2008 02:52 AM
Hi,
In ASBR, redistribute all those BGP routes with some tag set. Say for example set tage 90 for all those routes as below,
R2(ASBR) config:
----------------
router ospf 1
redistribute bgp 65334 subnets route-map Redistrib tag 90
Now in R3, use distribute-list with route-map to deny all those routes with tag 90 as below,
R3 config:
---------
route-map DENY_BGP_ROUTE deny 10
match tag 90
route-map DENY_BGP_ROUTE permit 500
router ospf 1
distribute-list route-map DENY_BGP_ROUTE in
HTH,
Nagendra
06-27-2008 01:45 AM
can you try this:
assume x.x.x.x is the network you want to block:
access-list 1 deny x.x.x.x x.x.x.x
access-list 1 pemit any
router ospf 1
distribute-list 1 in
The bad thing is: if you have a lot of subnets to block, you need type everyone in the ACL, and distribute-list only block the subnet into routing table and has nothing to do with OSPF topology table, so even you block the route in R3, it still can adverstise it to other OSPF peer.
06-27-2008 01:55 AM
unfortunately i need to block a lot of subnets
06-27-2008 02:52 AM
Hi,
In ASBR, redistribute all those BGP routes with some tag set. Say for example set tage 90 for all those routes as below,
R2(ASBR) config:
----------------
router ospf 1
redistribute bgp 65334 subnets route-map Redistrib tag 90
Now in R3, use distribute-list with route-map to deny all those routes with tag 90 as below,
R3 config:
---------
route-map DENY_BGP_ROUTE deny 10
match tag 90
route-map DENY_BGP_ROUTE permit 500
router ospf 1
distribute-list route-map DENY_BGP_ROUTE in
HTH,
Nagendra
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide