[nog] Bird in action

Marian Marinov mm at 1h.com
Thu Feb 25 22:06:13 EET 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Recently I decided to replace Quagga with Bird and wanted share some info with you.

I would like to start a discussion about how you use Bird (if you use it) and more importantly how are you managing.

My office router has only 1GB of RAM so this is why I decided to switch to switch to Bird.
With 8 BGP sessions, 6 of which are sending me the full BGP table Bird is using only ~300MB RAM:

bird> show memory
BIRD memory usage
Routing tables:    160 MB
Route attributes:  139 MB
ROA tables:        112  B
Protocols:          68 kB
Total:             299 MB

Usually what I'm checking in the routing daemon is if all of my BGP sessions are up:
bird> show protocol "bgp*"
name     proto    table    state  since       info
bgp_itd_main BGP      main     up     2016-02-16  Established
bgp_evolink_bg_backup BGP      main     up     2016-02-23  Established
bgp_evolink_bg_main BGP      main     up     2016-02-23  Established
bgp_itd_backup BGP      main     up     18:36:50    Established
bgp_evolink_int_main BGP      main     up     18:37:26    Established
bgp_evolink_int_backup BGP      main     up     18:37:26    Established
bgp_telehouse_main BGP      main     up     18:37:26    Established
bgp_telehouse_backup BGP      main     up     18:37:26    Established

But this is not enough, I can't see the route stats this way. And issuing 'show protocol all "bgp*"' gives me too much information. So I decided to make something a bit more useful:
root at sfgw:~# bgp_states
BIRD                    1.5.0   ready.
bgp_itd_main            BGP     main    up      2016-02-16      Established
  Routes:         577143 imported, 1 filtered, 1 exported, 0 preferred
bgp_evolink_bg_backup   BGP     main    up      2016-02-23      Established
  Routes:         9768 imported, 0 filtered, 1 exported, 13 preferred
bgp_evolink_bg_main     BGP     main    up      2016-02-23      Established
  Routes:         9768 imported, 0 filtered, 1 exported, 0 preferred
bgp_itd_backup          BGP     main    up      18:36:50        Established
  Routes:         577143 imported, 1 filtered, 1 exported, 2330 preferred
bgp_evolink_int_main    BGP     main    up      18:37:26        Established
  Routes:         576981 imported, 1 filtered, 1 exported, 0 preferred
bgp_evolink_int_backup  BGP     main    up      18:37:26        Established
  Routes:         576981 imported, 1 filtered, 1 exported, 576981 preferred
bgp_telehouse_main      BGP     main    up      18:37:26        Established
  Routes:         577599 imported, 0 filtered, 1 exported, 619 preferred
bgp_telehouse_backup    BGP     main    up      18:37:26        Established
  Routes:         472484 imported, 0 filtered, 1 exported, 3727 prefer

bpg_states is a simple bash function that produces the above:
  function bgp_states {
    for i in $(birdc show protocols|sed 's/\s\+/|/g'|grep -E "^BIRD|bgp"); do
      a=( ${i//|/ })
      echo ${a[*]}|awk '{printf "%-16s\t%s\t%s\t%s\t%s\t%s\n", $1, $2, $3, $4, $5, $6;}'
      birdc show protocol all ${a[0]}|grep Routes
    done
  }

Have any of you tried ExaBGP to dynamically manage their routes?

And finally how are you managing your local preferences ? I already did a script that helps me with that, but it is tightly connected to the way I structured my configuration files.


- -- 
Marian Marinov
Founder & CEO of 1H Ltd.
Jabber/GTalk: hackman at jabber.org
ICQ: 7556201
Mobile: +359 886 660 270
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlbPXrUACgkQ4mt9JeIbjJQqvgCgwbTUVgnxbqQdPgC6oBcGTR0/
5fMAniXLFEpdAjBGaGYcq5cKngNmzu4i
=altQ
-----END PGP SIGNATURE-----


More information about the Nog mailing list