03-28-2020 09:21 AM - edited 03-28-2020 10:20 AM
I am trying to solve a Lab about configuring BGP, but I've stopped in this command.
ip route 172.16.0.0 255.255.0.0 null0
what is the purpose of this command, also what does null0 means?
I think the command workes as ACL, but I need deep information about it, please.
03-28-2020 10:42 AM
there is good discussion for your understanding :
https://community.cisco.com/t5/routing/what-is-the-use-of-null-route/td-p/514495
03-28-2020 10:51 AM
hello,
Null0 is a virtual interface that drop any packets
the route with null0 as exit interface is placed in routing table but the trafic that matches is droped
03-28-2020 12:27 PM
@balaji.bandi has posted a link to a very good discussion (and I am pleased to see that I was a participant in it). @ataleb6 has pointed out several accurate aspects of what null 0 is and part of what it does. I think the original poster would benefit from an explanation of why that route is configured to use null 0. The first part of the explanation is a reminder that just having a network statement in BGP does not necessarily mean that the network will be advertised. When there is a network statement BGP will check the IP routing table looking for a match to the network statement (and if the network statement specifies a mask then the entry in the routing table must match both the address and the mask of the network statement. If that class B network is learned by a dynamic routing protocol then it might be in the routing table or it might not be in the routing table. And so BGP sometimes will advertise the network and sometimes might not advertise the network. To be sure that the route will ALWAYS be in the routing table people will sometimes configure a static route to null 0 as a way to be sure that there will always be a match in the routing table.
03-29-2020 06:12 AM
03-29-2020 10:00 AM
@ataleb6 You are welcome. Your explanation made some good points and I wanted to add to it. I am glad to see you as a new participant in the community and hope to see you continue to be active.
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