The purpose of a 0.0.0.0 0.0.0.0 null0 static route outside of it being bit bucket

OfWolfAndManOfWolfAndMan Posts: 923Member ■■□□□□□□□□
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

  • ande0255ande0255 Posts: 1,178Banned
    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 icon_thumright.gif
    Back in my day we used to route packets on 56k lines, through the snow, uphill both ways.

    https://loopedback.com
  • theodoxatheodoxa Posts: 1,340Member
    ande0255 wrote: »
    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 icon_thumright.gif

    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 [ ]
  • ande0255ande0255 Posts: 1,178Banned
    Ahh 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 :)
    Back in my day we used to route packets on 56k lines, through the snow, uphill both ways.

    https://loopedback.com
  • creamy_stewcreamy_stew Posts: 406Member
    Was it iBGP? In that case, you'll need "bgp redistribute internal"
    Itchy... Tasty!
    [X] DCICN
    [X] IINS

    [ ] CCDA
    [ ] DCICT
  • OfWolfAndManOfWolfAndMan Posts: 923Member ■■□□□□□□□□
    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 []
  • fredrikjjfredrikjj Posts: 879Member
    Have 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.
  • OfWolfAndManOfWolfAndMan Posts: 923Member ■■□□□□□□□□
    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 []
Sign In or Register to comment.