The purpose of a 0.0.0.0 0.0.0.0 null0 static route outside of it being bit bucket
OfWolfAndMan
Member Posts: 923 ■■■■□□□□□□
in CCNP
I was doing a lab where I had bgp redistributed into ospf and without the command above, I couldn't ping to interfaces coming off of the F0/0 interfaces from a router not directly connected to the OSPF router (It was a bgp router). Even if I injected network 0.0.0.0 into bgp and had default-information originate in OSPF, it still wouldn't go through unless I had this route. I also looked around and it seems its also used when redistributing rip and eigrp in certain scenarios. If I already have a BGP-injected default route, why do I need the null0 route?
:study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []
Comments
-
ande0255 Banned Posts: 1,178Are you referring to what purpose it served in your scenario, or in general in routing? All of the customers at my job have a default route between their edge device and the ISP, I honestly don't ever see specific static routes, only backup default routes with different weights to use for fail over purposes.
When the traffic leaving your network has to flow somewhere at all cost, default route it is -
theodoxa Member Posts: 1,340 ■■■■□□□□□□Are you referring to what purpose it served in your scenario, or in general in routing? All of the customers at my job have a default route between their edge device and the ISP, I honestly don't ever see specific static routes, only backup default routes with different weights to use for fail over purposes.
When the traffic leaving your network has to flow somewhere at all cost, default route it is
I think he was asking why a static default route to Null0 (Nowhere) was required [on top of the regular default route(s) to actual next-hops] in his scenario.R&S: CCENT → CCNA → CCNP → CCIE [ ]
Security: CCNA [ ]
Virtualization: VCA-DCV [ ] -
ande0255 Banned Posts: 1,178Ahh right you are, I didn't realize null0 was part of the statement, even with the the bit bucket comment - I need to get back into my Cisco studies
-
creamy_stew Member Posts: 406 ■■■□□□□□□□Was it iBGP? In that case, you'll need "bgp redistribute internal"
-
OfWolfAndMan Member Posts: 923 ■■■■□□□□□□Nope. All eBGP. The only thing BGP doesn't redistribute from OSPF is E2 routes. Internal is irrelevant.:study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []
-
fredrikjj Member Posts: 879Have you evaluated what I wrote in your thread about the route to null0 being necessary to advertise the default route in BGP with the network command? The route to null0 is normally a loop prevention mechanism for when you receive unknown traffic destined to a summary that you advertise. In BGP however it can also be used to put a route in the routing table in order to advertise that route with the network command.
So what you are seeing is most likely that when you put that default to null0 in the routing table, BGP advertises the default, and you get full reachability in the network. It's unlikely that this has anything to do with the null0 route itself. Feel free to prove me wrong though, but in that case you need to provide a more detailed description of the problem, including output from show ip route before and after you've installed the null0 route. -
OfWolfAndMan Member Posts: 923 ■■■■□□□□□□Okay fredrik that's good to know, but I must've not caught that. I'll be sure to use that for a default whenever redistributing OSPF from now on. thanks!:study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []