static route to null0

Unanswered Question
May 26th, 2009
User Badges:

Guys can someone please explain in a very plain language why we use static route to null0 and can you please give an easy example as well.....do we only use this in BGp or it can be used in other routing protocol

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Giuseppe Larosa Tue, 05/26/2009 - 05:07
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Khan,

a static to null0 is an efficient way to discard traffic, it is actually more efficient then using an ACL inbound or outbound an interface.


EIGRP creates automatically a static route to null0 for each manually configured EIGRP summary IP prefix.


In BGP this was the old way to create aggregates or to create very stable aggregates hiding all possible instabilities in the IGP topology.


OSPF has the discard route concept that is similar.


combinations of static routes to null0 with BGP are used in security for example for Remote Black Hole Triggering:


by changing the BGP next hop of routes traffic destined to prefixes under denial of service can be redirected to some device that simply drops it instead of hitting the intended target devices


Hope to help

Giuseppe



rtjensen4 Tue, 05/26/2009 - 06:12
User Badges:
  • Bronze, 100 points or more

It's also a way to introduce classless networks into a classful routing protocol (i.e. RIP v1)


For example, if you have these networks on your router:

192.168.1.0/30

192.168.1.4/30

192.168.1.8/30

...

192.168.1.252/30


If you distribute a static route like this into RIP:

ip route 192.168.1.0 255.255.255.0 null0


router rip

redistribute static


The traffic for those classless networks will be sent to this router and then, since there is a more specific route in the routing table, traffic will be routed as expected.

pompeychimes Tue, 05/26/2009 - 13:34
User Badges:
  • Bronze, 100 points or more

If you want to NAT a host/network that dosen't have an interface on your router you can use the route to null to assist in NATing...


!

ip route 10.10.10.10 255.255.255.255 null0

!

ip nat inside source static 20.20.20.20 10.10.10.10

!

Actions

This Discussion