In which case is
ip route 10.1.0.0 255.255.255.0 null0 used?
Thanks in advance.
Null 0 is a virtual interface that’s used to guarantee routes make it into the RIB; remember, routes must have a next-hop in order to make it into the RIB. When a packet arrives at a device that has a route to
Null 0 and nowhere else, it will discard it similar to how an ACL would. Think of this as the virtual interface where packets go to die efficiently.
Most routing protocols, such as EIGRP, automatically generate a Null 0 route when summarizing addresses.
It drops all the traffic that doesn't have a more specific route. It is used to prevent routing loops and to put routes in the routing table permanently so they can be announced with BGP.
null 0 interface can be seen as the same bitbucket as a
/dev/null device in UNIX/Linux. Everything that ends up there will just be dropped.
The Null0 "interface" is a virtual bit-bucket. Meaning it's a trash can to route things to. There's automatically a Null0 route (called a Discard Route) created when you do a summary-address or area-range or things like that with routing protocols.
The idea behind this is that you are creating a summary address manually to tell other routers about. If you are therefore expecting to receive packets for anything within that summary range, what will your router do about it? if it has more specific routes, packets will get routed perfectly fine.
Anything not matching more specific routes would get sent to the discard route and therefore destroyed in a flash of Null0 mayhem. Without the discard route, your router would be either trying to look things up or possibly sending to a default route (0.0.0.0/0) it has in its table. This in turn, may cause a routing loop where the router with the 0/0 route contains the summary you manually advertised and so packets bounce needlessly until the TTL expires!
It's a protection mechanism.
You may also use Null0 as a destination in static routes if you would like particular packets to die a horrible death as well! also u can see the site below exactly from Mr.Rafael A Couto Cabral
Worood Naif :)