Best practice for route preference

Nico Schottelius nico.schottelius at ungleich.ch
Tue Aug 6 12:58:53 CEST 2024


Good morning,

you might remember my confusion about non-exported routes some threads
away [0] and while not completely bird specific, I think it might be a
good topic to discuss for most bird users as well:

     How to deal with route preference when one has multiple sources?

Problem statement:

- Your ASN receives the same route multiple times from different upstreams
- What is the best way of handling multiple routes in regards to
  a) best practice ("the next engineer understands the solution")
  b) efficiency ("how fast to failover")
  c) robustness ("simplicity" and "default behaviour")

The setup will for almost anybody look something like that:

 --------
|Your ASN |
 --------

router1----------------- ASN A: sends route X
  |
 iBGP+IGP (babel, OSPF, etc.) - other-routers-of-the-asn
  |
router2
  |--------------------- ASN B: sends route X

And let's assume that by default ASN A is the preferred path for route
X.

Solution 1: lower bgp_local pref on import from ASN B
-----------------------------------------------
- Advantage:
  - very easy to configure
  - has the state local: "this upstream is not so interesting"
- Disadvantage
  - router2 does not export route X into the ASN
  - Only if the ASN A route vanishes, it is being redistributed

From a setup perspective, this looks very logical and coherent, besides
the lack of knowledge of all other routers of the routes.

Solution 2: lower bgp_local pref on import from router2
-------------------------------------------------
- Advantage:
  - route X will be propagated into the ASN
  - Should have almost zero failover time, only kernel needs to be
    updated on each router
- Disadvantage
  - All routes from router2 will have a lower preference, if router2
    handles other routes that should be treated normally, configuration
    can get complex

From a setup perspective this looks more messy and complicated, but
should achieve faster failover times and seems more transparent.

Solution 3: Elongate the bgp_path
-------------------------------------------------
router2 could prepend ASN B some times on import or export to iBGP.

- Advantage:
  - route would be propagated (actually unclear, as it is not the best route)
- Disadvantage
  - path is modified in an "incorrect" way


Solution 4: other solutions
-------------------------------------------------
Maybe something else is actually much smarter?
If you solve the problem differently, I'm looking for feedback on that
topic.

Best regards,

Nico


[0] https://bird.network.cz/pipermail/bird-users/2024-July/017743.html

-- 
Sustainable and modern Infrastructures by ungleich.ch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 873 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20240806/16918d19/attachment.sig>


More information about the Bird-users mailing list