05-26-2009 04:56 AM - edited 03-04-2019 04:53 AM
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
05-26-2009 05:07 AM
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
05-26-2009 06:12 AM
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.
05-26-2009 01:34 PM
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
!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide