FRRouting (FRR) Documentation

repository·master·Indexed 26 days ago

https://github.com/frrouting/frr

A suite of routing protocols. This documentation covers building and managing FRR as a Linux Snap package, using Docker containers for Debian 10 and Ubuntu (20.04, 22.04, 24.04), running Topotest suites, and utilizing development tools such as the frr-format GCC plugin and Coccinelle patches. It also includes Debian-specific configuration for daemons and package management.

Tokens
232.1K
Snippets
628
Records
1.3K
Agent score
88%

What's inside FRRouting (FRR)

  1. Overview of FRR Lua Scripting

    master

    FRR supports Lua scripting (version 5.3) to extend built-in behavior, perform calculations, or make decisions using arbitrary user code. This is implemented via standard Lua C bindings.

    Key characteristics:

    • Data Exchange: C objects can be passed into Lua, and Lua objects can be retrieved by C code through an encoding/decoding system, allowing arbitrary data from FRR to be passed to scripts.
    • Isolation: The Lua environment is isolated from the C environment. User scripts cannot access FRR's address space unless explicitly allowed by FRR.
  2. Overview of VNC and VNC-GW Services

    master

    FRRouting supports VNC (Virtual Network Control) services, including NVA (Network Virtualization Authority) and VNC-GW (VNC Gateway) functions.

    Key concepts:

    • VNC-GW (VNC Gateway): Supports importing and exporting routing information between VNC and CE (customer edge) routers operating within a VN (Virtual Network). It supports both IP/Layer 3 (L3) VNs and IP with Ethernet/Layer 2 (L2) VNs.
    • BGP Usage: BGP with IP VPNs and Tunnel Encapsulation is used to distribute VN information between NVAs (following RFC 4364 and RFC 4659). Encapsulation information is provided via the Tunnel Encapsulation Attribute (RFC 5512).
    • RFP (Remote Forwarder Protocol): The protocol used to communicate routing and Ethernet/Layer 2 (L2) forwarding information between NVAs and NVEs (Network Virtualization Edges). OpenFlow is a cited example of an RFP.
    • State Models: RFP implementations may use hard-state or soft-state prefix/address registration. For soft-state models, a lifetime in seconds is used for registrations and responses.
  3. Overview of the Zebra Protocol (ZAPI)

    master

    The Zebra protocol (also known as ZAPI) is a streaming protocol used by protocol daemons to communicate with the zebra daemon. It allows daemons to request or send information regarding interface states, routing state, nexthop-validation, and to install routes.

    Session Identification: Each ZAPI session is uniquely identified by the tuple: {protocol, instance, session_id}.

    • The default session_id is 0.
    • Daemons requiring multiple sessions (e.g., LDPD for label blocks) must assign unique session_id values.
  4. Overview of SHARP (Super Happy Advanced Routing Process)

    master
    SHARP is a specialized FRR daemon designed for testing FRR functionality and creating proof-of-concept routing labs. It provides miscellaneous utility functions that are not part of the core routing protocols but are useful for experimental environments.
  5. Overview of MGMTd (Management Daemon)

    master

    The FRR Management Daemon (MGMTd) serves as the centralized Management Plane for FRR. It provides a unified interface for various UI/Frontend clients (CLI, Netconf, Restconf, Grpc, etc.) to interact with FRR components.

    Key features include:

    • Centralized Data Management: Stores and retrieves management data using YANG-compliant schemas.
    • Computational Offloading: Offloads YANG parsing and validation from individual component daemons to improve performance.
    • Transaction Control: Provides centralized control over configuration validation, commits, and rollbacks.
    • Sub-components: Consists of the MGMT Frontend Interface, MGMT Backend Interface, and MGMT Transaction Engine.
  6. Overview of FRR Flowspec

    master

    FRR Flowspec implements a mechanism to distribute traffic rule flow specifications using a new NLRI (Network Layer Reachability Information) encoding format. Instead of relying solely on destination IP prefixes, Flowspec uses an n-tuple rule to define traffic criteria.

    Supported rule components include:

    • Network: Source and/or destination IP (IPv4 or IPv6).
    • Layer 4 (UDP/TCP): Source port, destination port, or any port.
    • Layer 4 (ICMP): ICMP type and ICMP code.
    • Layer 4 (TCP): TCP Flags.
    • Layer 3: DSCP value, Protocol type, packet length, and fragmentation.

    Actions associated with these rules (encoded via BGP extended communities) can include rerouting (to a specific nexthop or VRF), shaping, or discarding traffic.

  7. Overview of PCEPlib

    master

    PCEPlib is a PCEP (Path Computation Element Communication Protocol) implementation library designed for use by either a PCE (Path Computation Element) or a PCC (Path Computation Client).

    Key capabilities include:

    • Simultaneous connection to multiple PCEP peers.
    • Maintenance of persistent PCEP connections.
    • Currently, the FRR pathd daemon is the primary implementation using PCEPlib as a PCC.
  8. Overview of the OSPF API

    master

    The OSPF API allows external applications to interact with the OSPF daemon's Link-State Database (LSDB). It provides two primary capabilities:

    1. LSDB Retrieval: Applications can obtain a full or partial copy of the LSDB (including router LSAs, network LSAs, etc.). The API module provides real-time synchronization by sending messages to the application whenever a new LSA arrives.
    2. Opaque LSA Origination: Applications can originate their own opaque LSAs (types 9, 10, or 11) to distribute application-specific information (e.g., for Traffic Engineering like MPLS-TE) across the network. These LSAs are transparent to the routing process but can be processed by other modules.
  9. Understand EVPN Concepts in FRR

    master

    EVPN (Ethernet Virtual Private Network) is a BGP extension for signaling bridged (L2) and routed (L3) VPNs.

    Key concepts:

    • BGP-EVPN: The control plane for transporting Ethernet frames.
    • VNI (VXLAN Network Identifier): Represents an EVPN Instance (EVI). A VNI is either Layer-2 (tied to a MAC-VRF) or Layer-3 (tied to an IP-VRF).
    • MAC-VRF: Represents a bridging table (MAC/FDB and ARP/NDP entries). It can be thought of as a VLAN with or without an SVI.
    • IP-VRF: Represents a routing table (similar to L3VPN).
    • SVI (Switched Virtual Interface): A Layer-3 interface bound to a bridging domain. In Linux, this is typically a bridge or a VLAN subinterface.
    • L2VNI to L3VNI Association: In FRR, this is determined by the presence of an SVI for the VLAN and its VRF membership. If an L2VNI has an SVI whose master device is a VRF, the L2VNI is associated with that master VRF.
  10. Understand PCEP Module Architecture and RFC Support

    master

    The PCEP module for the pathd daemon implements the PCEP protocol (RFC 5440) to update policies and candidate paths. It relies on the pceplib external library for protocol encoding/decoding and session management.

    Supported RFCs

    • RFC 5440: Most protocol features are implemented. All messages can be parsed (tested primarily with Segment Routing). Note that only a small subset of metric types is configurable, and some Cisco routers may have issues with IANA metric numbers.
    • RFC 8231: Supports delegation of candidate paths after initial computation. If the PCE cannot compute a path, an empty candidate path is delegated.
    • RFC 8408: Used to communicate Segment Routing support to the PCE.
    • RFC 8664: All NAI types are implemented, but only MPLS NAI is supported. Providing non-MPLS segments will cause the PCC to return an error.

    Architectural Layers

    1. pathd interface: Handles interactions with the daemon API.
    2. command-line console: Handles VTYSH configuration commands.
    3. controller: Manages multiple PCC connections and mediates between the daemon and PCCs.
    4. PCC: Handles a single connection to a PCE via a pceplib session.
    5. pceplib interface: Abstracts the pceplib API.