Jump to content

FRRouting

From Official NixOS Wiki

FRRouting (FRR) is a free and open source Internet routing protocol suite for Linux and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric and VRRP, with alpha support for EIGRP and NHRP.

Configuration

The frr nixos module in nixpkgs does not currently support structured settings, the config or configFile options have to be used. The configuration is described in the frr documentation: docs.frrouting.org.

github:secshellnet/frr.nix introduced settings for access-lists, prefix-lists and route-maps.

Monitoring

prometheus-frr-exporter can be used to generate prometheus metrics. By default, the bfd, bgp, ospf, and route collectors are enabled. Review and adjust them to match your requirements. A complete list is available in the help page.

{
  services.prometheus.exporters.frr = {
    enable = true;
    disabledCollectors = [ "ospf" ];
    enabledCollectors = [
      "bgp6"
      "bgpl2vpn"
      "rpki"
    ];
  };
}

Examples

Several example configurations have been implemented using the NixOS test framework in github:secshellnet/nixos-tests. These tests verify interoperability with other routing daemons (such as BIRD and GoBGP) and different networking implementations (like IfState, systemd-networkd, NetworkManager and scripted networking).