cancel
Showing results for 
Search instead for 
Did you mean: 

OSPF redistribute static (blackhole) routes

OSPF redistribute static (blackhole) routes

eyeV
New Contributor III
Hi everybody.
I have Summit x480 with connected subnet 172.30.0.0/16. But I'd like to advertise to OSPF process another subnets like 172.30.20.0/24, 172.30.21.0/24 and so forth.

I try to create routes via Null0 and export these to OSPF, but I find only "blackhole" routes.

Can I export blackhole routes to OSPF? Can anybody suggest me another way to advertise /24 subnets.
6 REPLIES 6

eyeV
New Contributor III
It seems a bit strange. Thank you for answer.

PARTHIBAN_CHINN
Contributor
Take the setup below:[attached]





Simple setup with all in 0.0.0.0



SW1:

###



#

# Module vlan configuration.

#

create vlan black-hole

configure vlan black-hole ipaddress 15.1.1.1 255.255.255.0

enable ipf black-hole

enable loopback-mode vlan black-hole



create vlan sw1-sw2

configure vlan sw1-sw2 ipaddress 30.30.30.2 255.255.255.252

enable ipf sw1-sw2

configure vlan sw1-sw2 tag 500

configure vlan sw1-sw2 add ports 14 tagged



#

# Module ospf configuration.

#

enable ospf

configure ospf add vlan sw1-sw2 area 0.0.0.0





SW2:

####



#

# Module vlan configuration.

#

create vlan sw2-sw1 tag 500

configure vlan sw2-sw1 ipaddress 30.30.30.1 255.255.255.252

enable ipf sw2-sw1

configure vlan sw2-sw1 add ports 14 tagged



create vlan sw2-sw3 tag 20

configure vlan sw2-sw3 ipaddress 20.20.20.1 255.255.255.252

enable ipf sw2-sw3

configure vlan sw2-sw3 add ports 15 tagged



#

# Module ospf configuration.

#

enable ospf

configure ospf add vlan sw2-sw1 area 0.0.0.0

configure ospf add vlan sw2-sw3 area 0.0.0.0





SW3:

####



#

# Module vlan configuration.

#



create vlan sw3-sw2 tag 20

configure vlan sw3-sw2 ipaddress 20.20.20.2 255.255.255.252

enable ipf sw3-sw2

configure vlan sw3-sw2 add ports 15 tagged



#

# Module ospf configuration.

#

enable ospf

configure ospf add vlan sw3-sw2 area 0.0.0.0



Now to create the so called black-hole routes, on switch1:



SW1:

###

create fdbentry 00:00:06:00:00:01 vlan "black-hole" blackhole

configure iparp add 15.1.1.2 vr VR-Default 00:00:06:00:00:01



configure iproute add 170.1.0.0/24 15.1.1.2

configure iproute add 170.2.0.0/24 15.1.1.2

configure iproute add 170.3.0.0/24 15.1.1.2

configure iproute add 170.4.0.0/24 15.1.1.2

configure iproute add 170.5.0.0/24 15.1.1.2

configure iproute add 170.6.0.0/24 15.1.1.2

configure iproute add 170.7.0.0/24 15.1.1.2

configure iproute add 170.8.0.0/24 15.1.1.2

configure iproute add 170.9.0.0/24 15.1.1.2

configure iproute add 170.10.0.0/24 15.1.1.2



enable ospf export static cost 10 type ase-type-2



SW3:

####

npi_670-2.14 # sh ipr

Ori Destination Gateway Mtr Flags VLAN Duration

#o2 170.1.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s

#o2 170.2.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s

#o2 170.3.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s

#o2 170.4.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s

#o2 170.5.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s

#o2 170.6.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s

#o2 170.7.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s

#o2 170.8.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s

#o2 170.9.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s

#o2 170.10.0.0/24 20.20.20.1 10 UG-D---um--f- ospf-test 0d:0h:0m:22s



Now obviously these will not be installed as blackhole routes but it is providing a way to send traffic destined to those subnets nowhere.

eyeV
New Contributor III
Sure, I try to explain. I hope you will understand me, because my English isn't good actually.

We have one VLAN trough all our network. It's vlan Default with 172.30.0.0/16 subnet. We've decided to split this VLAN and add some L3 routing between part of it. We don't want to change IP addressing scheme in these part, because there are a lot of devices in it.

It's a bit difficult to explain this. Now I think we should change our IP addressing scheme.

Sorry for my English.

Sumit_Tokle
Contributor
May I know why you wants to do this?
GTM-P2G8KFN