Description

 Is there any way we can generate the 0/0 in a routing-instance without the NH point to "Reject"

Solution

 

  • Aggregate routes allow you to combine groups of routes with common addresses into a single entry. By combining routes into a single entry, you can decrease the number of route advertisements sent by your device, thus decreasing the size of the routing tables maintained by neighboring devices. A second advantage of advertising a single route prefix that represents all other internal route prefixes is that internal routing instabilities can be hidden from external peers 
  • Generated routes are similar in nature and configuration to aggregate routes. Like aggregate routes, generated routes become active in the routing table when at least one contributing route (more specific route) for the generated route is also active in the routing table.

 

Is there any way we can generate the 0/0 in a routing-instance without the NH point to "Reject"

        Yes, it is possible. To inherint NH from contributing route you need to use [generate] statement not aggregate statement. which can be either reject (default) or discard. If last contributing route gone generate route become hidden with NH reject

 

E.g 

root@R2> show route table RI1 100/8

RI1.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

 

100.0.0.0/8       *[Aggregate/130] 00:00:06 <== Aggregate

                   > to 10.1.1.1 via ge-0/0/0.0

100.1.1.0/24      *[BGP/170] 00:00:06, localpref 100 <== Contributor

                     AS path: 1111 I, validation-state: unverified

                   > to 10.1.1.1 via ge-0/0/0.0

 

set routing-instances RI1 routing-options generate route 100.0.0.0/8

root@R2> show route table RI1 protocol aggregate extensive

RI1.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

100.0.0.0/8 (1 entry, 1 announced)

TSI:

KRT in-kernel 100.0.0.0/8 -> {10.1.1.1}

       *Aggregate Preference: 130

               Next hop type: Router, Next hop index: 625

...

               Next hop: 10.1.1.1 via ge-0/0/0.0, selected

...

               Contributing Routes (1):

                   100.1.1.0/24 proto BGP <==============Contributing route

 

root@R2> show route table RI1 100.1.1.0/24 extensive

RI1.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

100.1.1.0/24 (1 entry, 1 announced)

TSI:

KRT in-kernel 100.1.1.0/24 -> {10.1.1.1}

Active generator for 100.0.0.0/8

       *BGP   Preference: 170/-101

               Next hop type: Router, Next hop index: 625 <== =========Note, generate route inherit contributor's NH

               Address: 0x2c6aa5e57c7c

               Next-hop reference count: 4, Next-hop session id: 330

               Kernel Table Id: 0

               Source: 10.1.1.1

               Next hop: 10.1.1.1 via ge-0/0/0.0, selected

 

====================If contributing route is not longer present in the table ============================

 

root@R2> show route table RI1 100/8 hidden

RI1.inet.0: 5 destinations, 5 routes (4 active, 0 holddown, 1 hidden)

+ = Active Route, - = Last Active, * = Both

100.0.0.0/8        [Aggregate] 00:00:03

                      Reject

 

============================Same using `aggregate` statement=================================

 

delete routing-instances RI1 routing-options generate route 100.0.0.0/8

set routing-instances RI1 routing-options aggregate route 100.0.0.0/8

 

root@R2> show route table RI1 100/8

RI1.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)

+ = Active Route, - = Last Active, * = Both

100.0.0.0/8       *[Aggregate/130] 00:00:02

                      Reject

100.1.1.0/24      *[BGP/170] 00:00:02, localpref 100

                     AS path: 1111 I, validation-state: unverified

                   > to 10.1.1.1 via ge-0/0/0.0

 

 

================================= without contributing route ====================================

root@R2> show route table RI1 100/8 hidden

RI1.inet.0: 5 destinations, 5 routes (4 active, 0 holddown, 1 hidden)

+ = Active Route, - = Last Active, * = Both

100.0.0.0/8        [Aggregate] 00:00:01

                      Reject

 

Is there anyway we can reset the NH when leaking it from the Routing-Instance to Main ?

      No, changing NH when leaking route between RIBs (routing-instances) is not possible.

 

Modification History

2024-12-31 : Article Created