Community discussions

MikroTik App
 
paulct
Member
Member
Topic Author
Posts: 336
Joined: Fri Jul 12, 2013 5:38 pm

Null route for unused IP's

Tue Jul 05, 2016 12:53 pm

Hi

We advertise a /22 to our bgp upstream. however if a person tries to access any unused /32 IP on our network it causes a network loop between our edge and our upstream router until the TTL is reached.

Is there a way I can blackhole any unused IP's? Can it be dynamic - as all unused IP's are not contiguous.
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Null route for unused IP's

Tue Jul 05, 2016 1:17 pm

Add /22 blackhole route in your routing table.
 
paulct
Member
Member
Topic Author
Posts: 336
Joined: Fri Jul 12, 2013 5:38 pm

Re: Null route for unused IP's

Tue Jul 05, 2016 1:43 pm

Add /22 blackhole route in your routing table.
ok, so just
/ip route add dst-address=x.x.x.x/22 type=blackhole
This will not block legitimate routes as there will be more specific routes in the routing table anyway correct?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7053
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Null route for unused IP's

Tue Jul 05, 2016 2:01 pm

Yes, more specific routes will route the traffic to needed destination.
 
simbora
just joined
Posts: 7
Joined: Fri Jul 15, 2011 6:47 am

Re: Null route for unused IP's

Thu Oct 18, 2018 4:39 am

i have advertise to upstream

11.12.13.0/22
11.12.13.0/24
11.12.14.0/24
11.12.15.0/24
11.12.16.0/24

So i need to add null route for all subnet?

/ip route add dst-address=11.12.13.0/22 type=blackhole
/ip route add dst-address=11.12.13.0/24 type=blackhole
/ip route add dst-address=11.12.14.0/24 type=blackhole
/ip route add dst-address=11.12.15.0/24 type=blackhole
/ip route add dst-address=11.12.16.0/24 type=blackhole

Pls advise with thanks.
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 767
Joined: Mon May 27, 2013 2:05 am

Re: Null route for unused IP's

Thu Oct 18, 2018 8:23 am

Just the /22 should be adequate, if you are using routing bgp network option instead of redistributing active routes. (I personally prefer to not use the network tab in bgp, and have blackhole route with distance 250 to supply an active route to redistribute).

Who is online

Users browsing this forum: dioeyandika and 23 guests