Routing

 View Only
last person joined: 3 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.  ECMP Static route with BFD Issue

    Posted 02-03-2016 14:05

    Greetings.  I have a Juniper MX480 running

     

    Model: mx480
    Junos: 14.2R4.9

     

    We have a pair of LoadBalancer VMs in an Openstack enviornment using Open-BFD.  They handle incoming traffic for other processing VMs.  BFD is configured on both ends with static routes. In a recent test setup one of the LBs was administratively locked but we still saw application traffic coming in on the externally facing interfaces.  during inspection we saw that the BFD session was in a down state on both the MX and the LB. Normally when either of the LBs goes down, the BFD session will go down and the next-hop peer will be removed from the route tables.  In this instance the MX is not removing the down peer from the route table and still trying to send packets to the disabled LB. 

     

    Config

     

    labadmin@RTRL012# show routing-options static route 172.18.155.160/29
    next-hop [ 172.18.113.145 172.18.113.146 ];
    bfd-liveness-detection {
        minimum-interval 167;
        minimum-receive-interval 167;
        multiplier 3;
        no-adaptation;
    }

    labadmin@RTRL012> show configuration routing-options forwarding-table
    export load-balancing-policy;

    labadmin@RTRL012> show configuration policy-options policy-statement load-balancing-policy
    then {
        load-balance per-packet;
    }



     

    Operational:

     

    labadmin@RTRL012> show bfd session
                                                      Detect   Transmit
    Address                  State     Interface      Time     Interval  Multiplier
    
    .....
    
    172.18.113.145           Up        irb.305        0.501     0.167        3
    172.18.113.146           Down      irb.305        0.501     2.000        3

     

    BFD Session is down BUT the peer is not removed from the MX route table.

     

     

    labadmin@RTRL012> show route 172.18.155.161
    
    inet.0: 1038 destinations, 1041 routes (1038 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    172.18.155.160/29  *[Static/5] 2d 02:43:46
                          to 172.18.113.145 via irb.305
                        > to 172.18.113.146 via irb.305

     

    Any ideas why the Static route peer will still be enabled even though the BFD peer is down?

     

    Thanks

     


    #BFD
    #static


  • 2.  RE: ECMP Static route with BFD Issue

    Posted 02-04-2016 01:07

    Hello,

     

    As a general JUNOS rule, anything which is configured in square brackets, is treated as logical OR.

     

    labadmin@RTRL012# show routing-options static route 172.18.155.160/29
    next-hop [ 172.18.113.145 172.18.113.146 ];

    The above is saying "if next-hop 172.18.113.145 is alive OR next-hop 172.18.113.146 is alive, keep this static route in the table".

    So when only 1 one next-hop is down, the route is still active.

    If You want the static route to LB to go down on BFD down, configure more specific static for each LB:

     

    set routing-options static route 172.18.155.161/32 next-hop 172.18.113.145 ### LB no.1
    set routing-options static route 172.18.155.162/32 next-hop 172.18.113.146 ### LB no.2

    - and attach BFD to them.

    HTH

    Thx

    Alex



  • 3.  RE: ECMP Static route with BFD Issue
    Best Answer

    Posted 02-04-2016 06:29

    Hi,

     

    as we have seen from the ericjwolf''s output the route is still active as expected but with both next-hops which is not to be expected as the second next-hop has BFD status down.

     

    By the way, in my lab running JUNOS 13.3R4 everythin works fine. Only difference is that I am running the routing within a VR and using ge-interfaces instead of irb. Here is the config

     

    camtable@MX-1> show configuration routing-instances VR1
    instance-type virtual-router;
    interface ge-1/1/8.10;
    interface ge-1/1/9.20;
    interface lo0.1001;
    routing-options {
        static {
            route 192.168.1.0/24 {
                next-hop [ 172.16.1.2 172.16.1.6 ];
                bfd-liveness-detection {
                    minimum-interval 100;
                    multiplier 3;
                    no-adaptation;
                }
            }
        }
    }

     If both interfaces are up, I get the normal behaviour with two active next hops

     

    camtable@MX-1> show bfd session
                                                      Detect   Transmit
    Address                  State     Interface      Time     Interval  Multiplier
    172.16.1.2               Up        ge-1/1/8.10    6.000     2.000        3
    172.16.1.6               Up        ge-1/1/9.20    0.300     0.100        3
    
    camtable@MX-1> show route 192.168.1.0 table VR1.inet.0
    
    VR1.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    192.168.1.0/24     *[Static/5] 00:01:52
                          to 172.16.1.6 via ge-1/1/9.20
                        > to 172.16.1.2 via ge-1/1/8.10

    If I disable BFD on the remote side (ge-interface is still physically up but no BFD replies), one of the next-hops is withdrawn:

     

    camtable@MX-1> show bfd session
                                                      Detect   Transmit
    Address                  State     Interface      Time     Interval  Multiplier
    172.16.1.2               Down      ge-1/1/8.10    0.000     2.000        3
    172.16.1.6               Up        ge-1/1/9.20    0.300     0.100        3
    
    
    camtable@MX-1> show route 192.168.1.0 table VR1.inet.0
    
    VR1.inet.0: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    
    192.168.1.0/24     *[Static/5] 00:01:04
                        > to 172.16.1.6 via ge-1/1/9.20

    So, either it's a bug in 14.2 or related to using irb.

     

    Cheers,

    Carsten



  • 4.  RE: ECMP Static route with BFD Issue

    Posted 02-05-2016 08:37

    All, I have upgraged my MX to a newer load and now the issue is gone (for now).  So I suspect that there are some BFD bugs in the 14.2 stream.  I looked in some release notes and noticed about 3 or 4 fixes related to BFD.

     

    It is working as expected.  I will monitor the setup with this newer load to see how things progress.

     

    Thanks again.



  • 5.  RE: ECMP Static route with BFD Issue

    Posted 02-17-2016 12:09

    Greetings

     

    this scenarios has come up again.  Reading the RFC5880 it looks like the condition maybe caused because when we put our LB into a maintanence mode we set the BFD state to AdminDown and not DOWN.  I saw on the router that when the BFD session is AdminDown the ECMP routes are still there.  In our case when in MTC mode the forwarding path is actually down. 

     

    Does anybody have insite on how Juniper emplimented the BFD state differences and ECMP routes?

     

    Here is the sample when the LB forwarding path is down:

     

    labadmin@RTRL012> show bfd session address 172.18.113.136 extensive
                                                      Detect   Transmit
    Address                  State     Interface      Time     Interval  Multiplier
    172.18.113.136           Down      irb.305        0.501     2.000        3
    Client Static, TX interval 0.167, RX interval 0.167
    Session down time 00:00:18, previous up time 00:00:36
    Local diagnostic CtlExpire, remote diagnostic None
    Remote state Up, version 1
    Session type: Single hop BFD
    Min async interval 0.167, min slow interval 2.000
    Adaptive async TX interval 2.000, RX interval 2.000
    Local min TX interval 2.000, minimum RX interval 0.167, multiplier 3
    Remote min TX interval 0.167, min RX interval 0.000, multiplier 3
    Local discriminator 76, remote discriminator 0
    Echo mode disabled/inactive, no-absorb, no-refresh
    Adaptation disabled
      Session ID: 0x1b6
    
    
    labadmin@RTRL012> show route 172.18.155.129 terse table inet.0
    
    inet.0: 1017 destinations, 1020 routes (1017 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    A V Destination        P Prf   Metric 1   Metric 2  Next hop        AS path
    * ? 172.18.155.128/29  S   5                       >172.18.113.137
    

    Thsi is the router state when the LB is in MTC Mode:

     

    labadmin@RTRL012> show route 172.18.155.129 terse
    
    inet.0: 1019 destinations, 1022 routes (1019 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    A V Destination        P Prf   Metric 1   Metric 2  Next hop        AS path
    * ? 172.18.155.128/29  S   5                       >172.18.113.136
                                                        172.18.113.137
    
    
    labadmin@RTRL012> show bfd session address 172.18.113.136 extensive
                                                      Detect   Transmit
    Address                  State     Interface      Time     Interval  Multiplier
    172.18.113.136           Down      irb.305        0.501     2.000        3
    Client Static, TX interval 0.167, RX interval 0.167
    Session down time 00:15:46, previous up time 00:03:38
    Local diagnostic NbrSignal, remote diagnostic AdminDown
    Remote state AdminDown, version 1
    Session type: Single hop BFD
    Min async interval 0.167, min slow interval 2.000
    Adaptive async TX interval 2.000, RX interval 2.000
    Local min TX interval 2.000, minimum RX interval 0.167, multiplier 3
    Remote min TX interval 0.167, min RX interval 0.167, multiplier 3
    Local discriminator 76, remote discriminator 1203799065
    Echo mode disabled/inactive, no-absorb, no-refresh
    Adaptation disabled
      Session ID: 0x1b6
    
    1 sessions, 1 clients
    
    

    You can see that the ECMP routes are not removed during AdminDown state.

     

    TIA.