cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1097
Views
4
Helpful
3
Replies

Block O E2 routes

rmv72
Level 1
Level 1

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?

1 Accepted Solution

Accepted Solutions

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

View solution in original post

3 Replies 3

shibindong
Level 1
Level 1

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.

unfortunately i need to block a lot of subnets

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