# frrouting/frr architecture

> Architecture diagram of the GitHub repository frrouting/frr, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/frrouting/frr
- Repository: https://github.com/frrouting/frr

## Overview

FRRouting (FRR) is a suite of routing daemons plus shared runtime and management components. Its principal workflow is to run routing protocols that manage IPv4/IPv6 routing; operators configure daemons through their configuration interfaces, with centralized YANG configuration available through mgmtd for migrated daemons. The README documents the protocol suite and centralized-configuration relationship, but the sampled source does not establish most daemon-to-daemon or daemon-to-kernel calls. Those links are therefore omitted rather than inferred.

Main entry points: [`lib/northbound.c`](https://github.com/frrouting/frr/blob/master/lib/northbound.c) (Northbound API), [`mgmtd`](https://github.com/frrouting/frr/tree/master/mgmtd) (Central manager), [`bgpd`](https://github.com/frrouting/frr/tree/master/bgpd) (BGP), [`ospfd`](https://github.com/frrouting/frr/tree/master/ospfd) (OSPFv2)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_protocols["Routing protocols"]
  node_bgp["BGP"]
  node_ospf["OSPFv2"]
  node_ospf6["OSPFv3"]
  node_isis["IS-IS / OpenFabric"]
  node_rip["RIP / RIPng"]
  node_babel["Babel"]
  node_eigrp["EIGRP"]
  node_pim["PIM"]
  node_ldp["LDP"]
  node_nhrp["NHRP"]
end

subgraph group_services["Routing services"]
  node_zebra["Zebra routing manager"]
  node_bfd["BFD"]
  node_pbr["Policy routing"]
  node_static["Static routes"]
  node_path["Path control"]
  node_vrrp["VRRP"]
end

subgraph group_management["Configuration management"]
  node_mgmtd["Central manager"]
  node_datastore[("Management datastore<br/>[mgmt_ds.c]")]
  node_northbound["Northbound API<br/>[northbound.c]"]
  node_vtysh["Unified CLI<br/>[vtysh.c]"]
end

subgraph group_platform["Shared runtime"]
  node_cli["Command framework<br/>[command.h]"]
  node_events["Event loop<br/>[frrevent.h]"]
  node_zclient["Zebra client API<br/>[zclient.h]"]
  node_interfaces["Interface model<br/>[if.h]"]
  node_route_tables["Route tables<br/>[table.h]"]
end

node_operator(("Network operator"))
node_peers(("Routing peers"))
node_kernel(("Operating system"))

node_operator -->|"configures"| node_vtysh
node_operator -->|"configures"| node_mgmtd
node_mgmtd -->|"applies config"| node_northbound
node_northbound -->|"configures"| node_bgp
node_northbound -->|"configures"| node_ospf
node_northbound -->|"configures"| node_ospf6
node_northbound -->|"configures"| node_isis
node_northbound -->|"configures"| node_rip
node_northbound -->|"configures"| node_babel
node_northbound -->|"configures"| node_eigrp
node_northbound -->|"configures"| node_pim
node_northbound -->|"configures"| node_ldp
node_northbound -->|"configures"| node_nhrp
node_peers -.->|"exchanges routes"| node_bgp
node_peers -.->|"exchanges routes"| node_ospf
node_peers -.->|"exchanges routes"| node_ospf6
node_peers -.->|"exchanges routes"| node_isis
node_peers -.->|"exchanges routes"| node_rip
node_peers -.->|"exchanges routes"| node_babel
node_peers -.->|"exchanges routes"| node_eigrp
node_peers -.->|"exchanges multicast"| node_pim
node_peers -.->|"exchanges labels"| node_ldp
node_peers -.->|"exchanges requests"| node_nhrp
node_zebra -.->|"programs routes"| node_kernel

click node_bgp "https://github.com/frrouting/frr/tree/master/bgpd"
click node_ospf "https://github.com/frrouting/frr/tree/master/ospfd"
click node_ospf6 "https://github.com/frrouting/frr/tree/master/ospf6d"
click node_isis "https://github.com/frrouting/frr/tree/master/isisd"
click node_rip "https://github.com/frrouting/frr/tree/master/ripd"
click node_babel "https://github.com/frrouting/frr/tree/master/babeld"
click node_eigrp "https://github.com/frrouting/frr/tree/master/eigrpd"
click node_pim "https://github.com/frrouting/frr/tree/master/pimd"
click node_ldp "https://github.com/frrouting/frr/tree/master/ldpd"
click node_nhrp "https://github.com/frrouting/frr/tree/master/nhrpd"
click node_zebra "https://github.com/frrouting/frr/tree/master/zebra"
click node_bfd "https://github.com/frrouting/frr/tree/master/bfdd"
click node_pbr "https://github.com/frrouting/frr/tree/master/pbrd"
click node_static "https://github.com/frrouting/frr/tree/master/staticd"
click node_path "https://github.com/frrouting/frr/tree/master/pathd"
click node_vrrp "https://github.com/frrouting/frr/tree/master/vrrpd"
click node_mgmtd "https://github.com/frrouting/frr/tree/master/mgmtd"
click node_datastore "https://github.com/frrouting/frr/blob/master/mgmtd/mgmt_ds.c"
click node_northbound "https://github.com/frrouting/frr/blob/master/lib/northbound.c"
click node_vtysh "https://github.com/frrouting/frr/blob/master/vtysh/vtysh.c"
click node_cli "https://github.com/frrouting/frr/blob/master/lib/command.h"
click node_events "https://github.com/frrouting/frr/blob/master/lib/frrevent.h"
click node_zclient "https://github.com/frrouting/frr/blob/master/lib/zclient.h"
click node_interfaces "https://github.com/frrouting/frr/blob/master/lib/if.h"
click node_route_tables "https://github.com/frrouting/frr/blob/master/lib/table.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bgp,node_ospf,node_ospf6,node_isis,node_rip,node_babel,node_eigrp,node_pim,node_ldp,node_nhrp toneBlue
class node_zebra,node_bfd,node_pbr,node_static,node_path,node_vrrp toneAmber
class node_mgmtd,node_datastore,node_northbound,node_vtysh toneMint
class node_cli,node_events,node_zclient,node_interfaces,node_route_tables toneRose
class node_operator,node_peers,node_kernel toneIndigo
```

## Components

### Routing protocols

- [BGP](https://github.com/frrouting/frr/tree/master/bgpd): `bgpd`
- [OSPFv2](https://github.com/frrouting/frr/tree/master/ospfd): `ospfd`
- [OSPFv3](https://github.com/frrouting/frr/tree/master/ospf6d): `ospf6d`
- [IS-IS / OpenFabric](https://github.com/frrouting/frr/tree/master/isisd): `isisd`
- [RIP / RIPng](https://github.com/frrouting/frr/tree/master/ripd): `ripd`
- [Babel](https://github.com/frrouting/frr/tree/master/babeld): `babeld`
- [EIGRP](https://github.com/frrouting/frr/tree/master/eigrpd): `eigrpd`
- [PIM](https://github.com/frrouting/frr/tree/master/pimd): `pimd`
- [LDP](https://github.com/frrouting/frr/tree/master/ldpd): `ldpd`
- [NHRP](https://github.com/frrouting/frr/tree/master/nhrpd): `nhrpd`

### Routing services

- [Zebra routing manager](https://github.com/frrouting/frr/tree/master/zebra): `zebra`
- [BFD](https://github.com/frrouting/frr/tree/master/bfdd): `bfdd`
- [Policy routing](https://github.com/frrouting/frr/tree/master/pbrd): `pbrd`
- [Static routes](https://github.com/frrouting/frr/tree/master/staticd): `staticd`
- [Path control](https://github.com/frrouting/frr/tree/master/pathd): `pathd`
- [VRRP](https://github.com/frrouting/frr/tree/master/vrrpd): `vrrpd`

### Configuration management

- [Central manager](https://github.com/frrouting/frr/tree/master/mgmtd): `mgmtd`
- [Management datastore](https://github.com/frrouting/frr/blob/master/mgmtd/mgmt_ds.c): `mgmtd/mgmt_ds.c`
- [Northbound API](https://github.com/frrouting/frr/blob/master/lib/northbound.c): `lib/northbound.c`
- [Unified CLI](https://github.com/frrouting/frr/blob/master/vtysh/vtysh.c): `vtysh/vtysh.c`

### Shared runtime

- [Command framework](https://github.com/frrouting/frr/blob/master/lib/command.h): `lib/command.h`
- [Event loop](https://github.com/frrouting/frr/blob/master/lib/frrevent.h): `lib/frrevent.h`
- [Zebra client API](https://github.com/frrouting/frr/blob/master/lib/zclient.h): `lib/zclient.h`
- [Interface model](https://github.com/frrouting/frr/blob/master/lib/if.h): `lib/if.h`
- [Route tables](https://github.com/frrouting/frr/blob/master/lib/table.h): `lib/table.h`

### Other components

- **Network operator**
- **Routing peers**
- **Operating system**

## Connections

- Network operator → Unified CLI: configures
- Network operator → Central manager: configures
- Central manager → Northbound API: applies config
- Northbound API → BGP: configures
- Northbound API → OSPFv2: configures
- Northbound API → OSPFv3: configures
- Northbound API → IS-IS / OpenFabric: configures
- Northbound API → RIP / RIPng: configures
- Northbound API → Babel: configures
- Northbound API → EIGRP: configures
- Northbound API → PIM: configures
- Northbound API → LDP: configures
- Northbound API → NHRP: configures
- Routing peers → BGP: exchanges routes
- Routing peers → OSPFv2: exchanges routes
- Routing peers → OSPFv3: exchanges routes
- Routing peers → IS-IS / OpenFabric: exchanges routes
- Routing peers → RIP / RIPng: exchanges routes
- Routing peers → Babel: exchanges routes
- Routing peers → EIGRP: exchanges routes
- Routing peers → PIM: exchanges multicast
- Routing peers → LDP: exchanges labels
- Routing peers → NHRP: exchanges requests
- Zebra routing manager → Operating system: programs routes
