Expand all | Collapse all

BGP Discard on default route

Jump to Best Answer
  • 1.  BGP Discard on default route

    Posted 02-07-2018 08:07

    Hi all,


    I'm sure you know the set up by now but just in case here is a quick refresh of the basic topology:


    laptop --> Cust router --> CPE --> LNS --> Core --> BGP peer --> Laptop


    I have the radius assigning an address now to the CPE from a range we are stipulating for the customer. In this test case it is The cust router facing the customer laptop is assigned and the laptop The CPE is allocated 

    I have configured static NAT on the cust router and I can ping from the customer laptop. Okay so far.

    Now, on the LNS I can see the route for the network as private access (as it should be as it is inside the L2TP tunnel) so I can ping that address from the LNS.

    On the core, I have eBGP running to the BGP peer (simulating an upstream ISP) and on the BGP Peer I have configured several loopback interfaces to simulate upstream internet addresses to test ping to.

    On the core, I also have iBGP running from loopback to the other core (setup topology replicated to this one). When I look at the routing table on the core I see the following:



    Clive@THW-CORE-01# run show route

    inet.0: 37 destinations, 41 routes (36 active, 0 holddown, 1 hidden)
    + = Active Route, - = Last Active, * = Both *[Static/5] 2w1d 05:29:59


    The route network will be in the default route as it is a subscriber. Can anyone please tell me why this would show up as Discard please? This is stopping any testing that we can achieve....



  • 2.  RE: BGP Discard on default route
    Best Answer

    Posted 02-07-2018 08:54
    I didn’t read the whole query but This is a static route not a BGP.

    Have you configured any static route on your box with the next-hop as a discard?

  • 3.  RE: BGP Discard on default route

    Posted 02-07-2018 09:06

    Hi Kingsman,


    Thank you for the response. 

    I have indeed and I had been reliably informed that the following discard command was required... I have no idea why as I am not an expert with BGP by any means...


    set routing-options static route next-hop
    set routing-options static route discard
    set routing-options static route no-install


    So, should I just remove the discard route and test again?


    Actually, I have just tried that and I get the following:


    Clive@THW-CORE-01# commit check
    [edit routing-options static]
    next hop(s) not configured for
    error: configuration check-out failed


  • 4.  RE: BGP Discard on default route

    Posted 02-07-2018 09:41
    May I know what are you trying to achieve here?

    You are getting the error because you have not configured next-hop with your static route and why are you using no-install?

    Can you explain you complete requirement?

  • 5.  RE: BGP Discard on default route

    Posted 02-07-2018 20:17


    If you want to remove the static default route, you need to delete it completely "delete routing-options static route". Looks like you deleted using "delete routing-options static route discard" which will remove only "discard" keyword and that's why you get that commit error.


    Also as stated earlier, if you are expected the subnet in the Core router to be resolved via this default route, then you need to configure a valid next-hop for it. I am not sure about your design, but if you want to reach the BGP, you can point this default route to the BGP peer on Core. Something like this:

    set routing-options static route next-hop <ip address of the interface pointing towards BGP peer>



  • 6.  RE: BGP Discard on default route

    Posted 02-08-2018 00:26



    Thank you for the solution. This is indeed what I did before seeing this response and we now have everything working.


    I had been reliably informed by a "Juniper Expert" (None of you guys) 🙂 ... That this "Discard" command was a requirement. If it is somewhere down the road then I will use it if required.....


    Thank you again