7

In which case is

ip route 10.1.0.0 255.255.255.0 null0 used?

Thanks in advance.


This question is a repost of the same question in The Cisco Learning Network; however, the answers are unique to Stack Exchange.

10

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.

  • 2
    Null 0 can also be a good alternative to an Access Control List(s) with the benefit of lower CPU overhead (depending on the complexity of requirements). – one.time Apr 21 '14 at 1:02
9

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.

  • is that null0 networks are like loopback network? – Trojan Apr 19 '14 at 12:20
  • 6
    Not quite. I can make a loopback interface on a router (Loopback0, for instance) and make it reachable from a remote network. Loopbacks are just virtual network interfaces. Null0 is more like the vast emptiness of space; data sent to Null0 is discarded and never thought of again. – Avery Abbott Apr 19 '14 at 13:57
5

The 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.

1

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

http://blogbt.net/index.php/2014/03/routing-to-null0-interface/

Worood Naif :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.