Recommended way to shutdown a working BGP session -- ordered bgp session stop -- bgp session shutdown

Francis Brosnan Blázquez francis.brosnan at aspl.es
Mon Dec 17 11:01:09 CET 2018


Hello Michael.

Just report our results.

After removing BGP upstream configuration (commented out), run
"config", our traffic was instantly directed to the rest of BGP
sessions.

We didn't lose any traffic (at least noticeable) during the transition.
This confirms your response and Ondrej's: it takes seconds or at most a
few minutes (not hours).

Also confirm condition change you are describing: most of the traffic
was directed to a less preferable BGP session because it has same
As-path length and bigger uptime. 

We will have to increase as-path length by prepending (export filter {
... bgp_path.prepend .. } at the BGP session we want to have with less
weight).

Given these results, it is not necessary to increase AS-path length
before shutting down the session: it is already fast and smooth.

Best Regards.


El mar, 11-12-2018 a las 17:05 +0600, Michael Rack escribió:
> Correct, it will remove routes faster. This is because of the logic
> behind BGP.
> 
> 
> If you add a new upstream peer / transit peer the new route will not
> be in use if the as-path is the same as the old one. Traffic is
> directed to that port wich session that have longer uptime.
> 
> 
> The routes gets active when a condition will change.
> 
> 
> But back to your question in timeouting a BGP Session. When a BGP
> Session will timeoute, your neighbor will send withdraws to his
> neighbors. So after 20secs no neighbour will see the route to your
> shutted down interface anymore.
> 
> 
> Correct: Shutdown Inferace after traffic disappears.
> 
> 
> 
> 
> 
> Am Mo., 10. Dez. 2018, 15:33 hat Francis Brosnan Blázquez
> <francis.brosnan at aspl.es> geschrieben:
> 
>         Hello Michael.
>         
>         Thanks for the info; very useful. 
>         
>         Considering this, could we say BGP is faster removing routes
>         when
>         session is lost/closed/shut down than when they are added?
>         
>         Even though you start receiving traffic right away you setup a
>         BGP
>         session, we have seen it takes hours (even days) to fully
>         propagate new
>         BGP upstream we added in the past.
>         
>         Did you find this behavior too?
>         
>         Thanks Michael.
>         Best Regards.
>         
>         
>         PD: Just to clarify point 2) Another solution is to just
>         shutdown BGP
>         session but leave upstream connected and configured (so
>         outdated
>         routers we still reach us...) AND unplug the cable after
>         traffic disappears.
>         
>         
>         > We are using option number 2.
>         > 
>         > 
>         > After 600 seconds, all routes via the shutted down peer will
>         > get invalid.
>         > 
>         > 
>         > So just wait 10 Minutes and your inbound traffic should
>         > stop.
>         > 
>         > 
>         > .........
>         > 
>         > 
>         > But there was a another thread with a feature request to
>         > send withdraws to your peer, so you can immediatley shutdown
>         > your network interface after shutting down the bgp session.
>         > 
>         > 
>         > 
>         > Am Sa., 8. Dez. 2018, 04:03 hat Francis Brosnan Blázquez
>         > <francis.brosnan at aspl.es> geschrieben:
>         > 
>         > 
>         >         Hello.
>         >         
>         >         We are using bird with several upstream providers,
>         >         all of them with a
>         >         share of traffic.
>         >         
>         >         We are in the process of shutting down one of them
>         >         but we are unsure
>         >         how to proceed to minimize loss of traffic.
>         >         
>         >         We have been reading and looking for general
>         >         recommendations but it is
>         >         not clear (besides using graceful shutdown which is
>         >         not supported by
>         >         the upstream we want to shutdown).
>         >         
>         >         We have been looking at mailing list but we haven't
>         >         found anything
>         >         treating this matter.
>         >         
>         >         So far, solutions we have come up are:
>         >         
>         >         1) Use AS-path prepend to increase metric on the
>         >         uptstream to be
>         >         shutted down and once nearly no traffic comes in
>         >         through that link, shutdown
>         >         BGP and unplug. Something like:
>         >         
>         >             export filter
>         >         {                                                                                                                                                                                                                       
>         >                                                                                                                                                                                                                                                   
>         >                   if source = RTS_STATIC then { # Export
>         >         only static
>         >         routes                                                                                                                                                                       
>         >                          # Assign our
>         >         community                                                                                                                                                                                                   
>         >         
>         >         bgp_community.add((65000,64501));                                                                                                                                                                                        
>         >                          # Artificially increase path
>         >         length                                                                                                                                                                                      
>         >                          # by advertising local AS number
>         >         twice                                                                                                                                                                                   
>         >                          if bgp_path ~ [= 65000 =]
>         >         then                                                                                                                                                                                           
>         >                               bgp_path.prepend(65000);
>         >                               bgp_path.prepend(65000);
>         >         
>         >         accept;                                                                                                                                                                                                                  
>         >                    }                                                                                                                                                                                                                               
>         >         
>         >         reject;                                                                                                                                                                                                                         
>         >             };                         
>         >         
>         >         2) Another solution is to just shutdown BGP session
>         >         but leave upstream
>         >         connected and configured (so outdated routers we
>         >         still reach us...).
>         >         
>         >         3) And the obvious, just shutdown BGP session and
>         >         unplug the cable.
>         >         
>         >         It would be great to know your opinion and what's
>         >         the recommended way
>         >         to proceed. 
>         >         
>         >         What do you think?
>         >         
>         >         Many thanks
>         >         Best Regards.
>         >         
>         >         
>         >         
>         >         
>         >         
>         >         
>         
>         -- 
>         Francis Brosnan Blázquez  -  ASPL
>         http://www.asplhosting.com/
>         http://www.aspl.es/
>         https://twitter.com/aspl_es
>         https://twitter.com/asplhosting
>         https://twitter.com/francisbrosnanb
>         https://es.linkedin.com/in/francis-brosnan-blázquez-1353a218
>         
>         91 134 14 22 - 91 134 14 45 - 91 116 07 57
>         Av. Juan Carlos I 13, 2ºC, Torre Garena
>         28806 - Alcalá de Henares (España)
>         
>         AVISO LEGAL
>          
>         En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
>         diciembre, de Protección de Datos de Carácter Personal, le informamos de
>         que sus datos de carácter personal, recogidos de fuentes accesibles al
>         público o datos que usted nos ha facilitado previamente, proceden de
>         bases de datos propiedad de Advanced Software Production Line, S.L.
>         (ASPL).
>          
>         ASPL garantiza que los datos serán tratados con la finalidad de mantener
>         las oportunas relaciones comerciales o promocionales con usted o la
>         entidad que usted representa. No obstante, usted puede ejercitar sus
>         derechos de acceso, rectificación, cancelación y oposición dispuestos en
>         la mencionada Ley Orgánica, notificándolo por escrito a ASPL -
>         Protección Datos, Av. Juan Carlos I 13, 2ºC, Alcalá de Henares
>         (Madrid)

-- 
Francis Brosnan Blázquez  -  ASPL
http://www.asplhosting.com/
http://www.aspl.es/
https://twitter.com/aspl_es
https://twitter.com/asplhosting
https://twitter.com/francisbrosnanb
https://es.linkedin.com/in/francis-brosnan-blázquez-1353a218

91 134 14 22 - 91 134 14 45 - 91 116 07 57
Av. Juan Carlos I 13, 2ºC, Torre Garena
28806 - Alcalá de Henares (España)

AVISO LEGAL
 
En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
diciembre, de Protección de Datos de Carácter Personal, le informamos de
que sus datos de carácter personal, recogidos de fuentes accesibles al
público o datos que usted nos ha facilitado previamente, proceden de
bases de datos propiedad de Advanced Software Production Line, S.L.
(ASPL).
 
ASPL garantiza que los datos serán tratados con la finalidad de mantener
las oportunas relaciones comerciales o promocionales con usted o la
entidad que usted representa. No obstante, usted puede ejercitar sus
derechos de acceso, rectificación, cancelación y oposición dispuestos en
la mencionada Ley Orgánica, notificándolo por escrito a ASPL -
Protección Datos, Av. Juan Carlos I 13, 2ºC, Alcalá de Henares
(Madrid).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20181217/995590c7/attachment.html>


More information about the Bird-users mailing list