Routing

last person joined: 2 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  BGP advertisements

    Posted 10-31-2013 03:05

    Hi everybody,

     

    I am newer in JunOS, althought I know Cisco IOS I don't understand why my BGP configuration doesn't advertise the routes. Could you help me?

     

    root@B1> show configuration routing-options                                  
    graceful-restart;
    static {
        route 1.2.104.0/26 discard;
        route 1.2.104.128/25 discard;
        route 0.0.0.0/0 discard;
    }
    aggregate {
        route 1.2.104.0/26;
        route 1.2.104.128/25;
    }
    router-id 10.16.254.1;
    autonomous-system 64;
    forwarding-table {
        export load-balacing;
    }

     

    root@B1> show configuration protocols bgp group R64              
    type external;
    family inet {
        unicast;
    }
    export [ RB ];
    peer-as 7;
    local-as 64;
    neighbor 13.20.19.5 {
        description "PEERING A RS";
        preference 160;
        local-address 13.20.19.6;
    }

     

    root@B1> show configuration policy-options policy-statement RB   
    from {
        protocol aggregate;
        route-filter 1.2.104.0/26 exact;
        route-filter 1.2.104.128/25 exact;
    }
    then accept;

     

    root@B1> show route advertising-protocol bgp 13.20.19.5 all              

    inet.0: 23 destinations, 25 routes (22 active, 0 holddown, 2 hidden)
    Restart Complete
      Prefix                  Nexthop              MED     Lclpref    AS path

     

    Thanks a lot, best regards.



  • 2.  RE: BGP advertisements

     
    Posted 10-31-2013 06:58

    hi,

     

    In your setup both aggregate are hidden (show route hidden extensive).

     

    http://www.juniper.net/techpubs/en_US/junos/topics/topic-map/policy-aggregate-route.html says:

     

    An aggregate route becomes active when it has one or more contributing routes. A contributing route is an active route that is a more specific match for the aggregate destination

    you don't need aggregate if it's the same as static route. Export static routes or change the contributing static routes to be more specific then aggregates.

    jtb 

     



  • 3.  RE: BGP advertisements

    Posted 10-31-2013 11:10

    Thanks a lot jtb,

     

    Exactly, there are hidden aggregates, what does it mean?

     

    root@B1> show route hidden extensive

     

    1.2.104.128/25 (1 entry, 0 announced)
             Aggregate
                    Next hop type: Reject
                    Address: 0x8f27f24
                    Next-hop reference count: 5
                    State: <Hidden Int Ext>
                    Local AS: 64
                    Age: 2d 22:50:03
                    Task: Aggregate
                    AS path: I
                                    Flags: ASPathChanged    Depth: 0        Inactive

     

    However, if I run:

     # delete routing-options static route 1.2.104.0/26 discard

     # delete routing-options static route 1.2.104.128/25 discard

     # commit

     

    The router advertise 1.2.104.0/26 but not 1.2.104.128/25. I think it is because the router has a network interface with the address 1.2.104.1/28. 

     

    With regards to 1.2.104.128/25, how can I change the contributing static routes to be more specific?

     

    Thanks, best regards.

     



  • 4.  RE: BGP advertisements
    Best Answer

     
    Posted 10-31-2013 13:10

    hi,

     

    > Exactly, there are hidden aggregates, what does it mean?

     

    http://www.juniper.net/techpubs/en_US/junos/topics/concept/hidden-routes-understanding.html says:

    Hidden routes are routes that the device cannot use for reasons such as an invalid next hop or a routing policy that rejects the routes.

     

    In your case to make aggregates active, Junos requires to have active contributing routes (more specific routes). For 1.2.104.0/26 it may any subnet of the prefix, like 1.2.104.0/27, 1.2.104.1/32, etc.

     

    The router needs to have a route to any subnet 'covered' by the aggregate. It must be more specific (smaller net) then the aggregate - your static routes are the same as aggregates.

     

    Let's test the config.

     

    1)  Just aggregates, no contributing routes. The aggregates are hidden (non usable):

     

    admin@Junos# show routing-options
    aggregate {
        route 1.2.104.0/26;
        route 1.2.104.128/25;
    }
    
    admin@Junos# run show route 1.2.104.0/26
    
    inet.0: 4 destinations, 4 routes (2 active, 0 holddown, 2 hidden)
    
    [edit]
    admin@Junos# run show route 1.2.104.128/25 
    
    inet.0: 4 destinations, 4 routes (2 active, 0 holddown, 2 hidden)
    
    admin@Junos# run show route hidden detail
    
    inet.0: 4 destinations, 4 routes (2 active, 0 holddown, 2 hidden)
    1.2.104.0/26 (1 entry, 0 announced)
             Aggregate
                    Next hop type: Reject
                    Address: 0x24dfbd4
                    Next-hop reference count: 2
                    State: <Hidden Int Ext>
                    Age: 1:03
                    Validation State: unverified
                    Task: Aggregate
                    AS path: I
                    Flags:                  Depth: 0        Inactive
    
    1.2.104.128/25 (1 entry, 0 announced)
             Aggregate
                    Next hop type: Reject
                    Address: 0x24dfbd4
                    Next-hop reference count: 2
                    State: <Hidden Int Ext>
                    Age: 1:03
                    Validation State: unverified
                    Task: Aggregate
                    AS path: I
                    Flags:                  Depth: 0        Inactive
    
    [edit]
    admin@Junos#

     

    2)  Let's add your static routes - equal to aggregates (not valid contributing routes).

          Static routes are active (and can be exported in BGP policy)

          Aggregates are hidden (can't be exported)

     

    admin@Junos# show routing-options
    static {
        route 1.2.104.0/26 discard;
        route 1.2.104.128/25 discard;
    }
    aggregate {
        route 1.2.104.0/26;
        route 1.2.104.128/25;
    }
    
    [edit]
    admin@Junos# run show route 1.2.104.0/26 exact 
    
    inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
    + = Active Route, - = Last Active, * = Both
    
    1.2.104.0/26       *[Static/5] 00:01:47
                          Discard
    
    [edit]
    admin@Junos# run show route 1.2.104.128/25 exact 
    
    inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
    + = Active Route, - = Last Active, * = Both
    
    1.2.104.128/25     *[Static/5] 00:01:56
                          Discard
    
    [edit]
    admin@Junos# 
    
    admin@Junos# run show route 1.2.104.0/26 exact all
    
    inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
    + = Active Route, - = Last Active, * = Both
    
    1.2.104.0/26       *[Static/5] 00:02:19
                          Discard
                        [Aggregate] 00:00:45
                          Reject
    
    [edit]
    admin@Junos# run show route 1.2.104.128/25 exact all  
    
    inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
    + = Active Route, - = Last Active, * = Both
    
    1.2.104.128/25     *[Static/5] 00:02:25
                          Discard
                        [Aggregate] 00:00:51
                          Reject
    
    [edit]
    admin@Junos# 
    
    admin@Junos# run show route protocol aggregate 1.2.104.0/26 all detail
    
    inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
    1.2.104.0/26 (2 entries, 1 announced)
             Aggregate
                    Next hop type: Reject
                    Address: 0x24dfbd4
                    Next-hop reference count: 2
                    State: <Hidden Int Ext>
                    Inactive reason: Unusable path
                    Age: 1:24 
                    Validation State: unverified 
                    Task: Aggregate
                    AS path: I
                    Flags:                  Depth: 0        Inactive
    
    [edit]
    admin@Junos# run show route protocol aggregate 1.2.104.128/25 all detail  
    
    inet.0: 4 destinations, 6 routes (4 active, 0 holddown, 2 hidden)
    1.2.104.128/25 (2 entries, 1 announced)
             Aggregate
                    Next hop type: Reject
                    Address: 0x24dfbd4
                    Next-hop reference count: 2
                    State: <Hidden Int Ext>
                    Inactive reason: Unusable path
                    Age: 1:41 
                    Validation State: unverified 
                    Task: Aggregate
                    AS path: I
                    Flags:                  Depth: 0        Inactive
    
    [edit]
    admin@Junos# 
    

     

    3)  let's change the static routes to be more specific.

         Now aggregates are active as expected and will be exported by the BGP policy.

     

    admin@Junos# show routing-options
    static {
        route 1.2.104.0/30 discard;
        route 1.2.104.128/30 discard;
    }
    aggregate {
        route 1.2.104.0/26;
        route 1.2.104.128/25;
    }
    
    
    admin@Junos# run show route 1.2.104.0/26
    
    inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    1.2.104.0/26       *[Aggregate/130] 00:05:56
                          Reject
    1.2.104.0/30       *[Static/5] 00:01:27
                          Discard
    
    [edit]
    admin@Junos# run show route 1.2.104.128/25               
    
    inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    1.2.104.128/25     *[Aggregate/130] 00:05:59
                          Reject
    1.2.104.128/30     *[Static/5] 00:01:30
                          Discard
                          
    admin@Junos# run show route 1.2.104.0/26 exact detail
    
    inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
    1.2.104.0/26 (1 entry, 1 announced)
            *Aggregate Preference: 130
                    Next hop type: Reject
                    Address: 0x24dfbd4
                    Next-hop reference count: 4
                    State: <Active Int Ext>
                    Age: 6:17 
                    Validation State: unverified 
                    Task: Aggregate
                    Announcement bits (1): 0-KRT 
                    AS path: I (LocalAgg)
                    Flags:                  Depth: 0        Active
                    AS path list:
                    AS path: I Refcount: 1
                    Contributing Routes (1):
                            1.2.104.0/30 proto Static
    
    [edit]
    admin@Junos# run show route 1.2.104.128/25 exact detail
    
    inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
    1.2.104.128/25 (1 entry, 1 announced)
            *Aggregate Preference: 130
                    Next hop type: Reject
                    Address: 0x24dfbd4
                    Next-hop reference count: 4
                    State: <Active Int Ext>
                    Age: 6:25 
                    Validation State: unverified 
                    Task: Aggregate
                    Announcement bits (1): 0-KRT 
                    AS path: I (LocalAgg)
                    Flags:                  Depth: 0        Active
                    AS path list:
                    AS path: I Refcount: 1
                    Contributing Routes (1):
                            1.2.104.128/30 proto Static
    
    [edit]
    admin@Junos#
    

     

    The router advertise 1.2.104.0/26 but not 1.2.104.128/25. I think it is because the router has a network interface with the address 1.2.104.1/28. 

     

    correct

     

    > With regards to 1.2.104.128/25, how can I change the contributing static routes to be more specific?

     

    see example above, hope that helps.

    Play with the config and verify results.

     

    jtb

     

     



  • 5.  RE: BGP advertisements

    Posted 11-01-2013 11:18

    Thanks a lot jtb, your explanation is very clear.

     

    It seems to work well and now I understand the issue.

     

    Best regards.



  • 6.  RE: BGP advertisements

    Posted 11-01-2013 14:44

    Good to know. Now if you could mark jtb solution as solved, throw in kudos, we can all benefit from this and others who search the forum for answers can find this resolution also.