OSPF redistribute static (blackhole) routes

  • 0
  • 1
  • Question
  • Updated 4 years ago
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.
Photo of eyeV

eyeV

  • 2,484 Points 2k badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Sumit Tokle

Sumit Tokle, Alum

  • 5,738 Points 5k badge 2x thumb
Create the loopback interface.
Assign the IP address to the loopback interface.
Advertise the loopback vlan into OSPF.
Photo of eyeV

eyeV

  • 2,484 Points 2k badge 2x thumb
Thank you, but...

I have Vlan Default with IP address 172.30.0.254/16 and I can't assign IP address 172.30.20.1/24 to my loopback VLAN. It's overlaps.

I only want to advertise /24 subnets.
Photo of Sumit Tokle

Sumit Tokle, Alum

  • 5,738 Points 5k badge 2x thumb
May I know why you wants to do this?
Photo of eyeV

eyeV

  • 2,484 Points 2k badge 2x thumb
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.

Photo of PARTHIBAN CHINNAYA

PARTHIBAN CHINNAYA, Alum

  • 4,382 Points 4k badge 2x thumb
 

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. 

Photo of eyeV

eyeV

  • 2,484 Points 2k badge 2x thumb
It seems a bit strange. Thank you for answer.