# ndodson/open5gs architecture

> Architecture diagram of the GitHub repository ndodson/open5gs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ndodson/open5gs
- Repository: https://github.com/ndodson/open5gs

## Overview

##### Main Components Identification
The system should be divided into these major components:

a. Core Network Functions (Main Components):
- AMF (Access and Mobility Management Function)
- SMF (Session Management Function)
- UPF (User Plane Function)
- NRF (Network Repository Function)
- AUSF (Authentication Server Function)
- UDM (Unified Data Management)
- PCF (Policy Control Function)
- UDR (Unified Data Repository)
- NSSF (Network Slice Selection Function)
- BSF (Binding Support Function)
- SCP (Service Communication Proxy)
- SEPP (Security Edge Protection Proxy)

b. Support Components:
- WebUI (Management Interface)
- MongoDB (Database Backend)
- TUN/TAP Interfaces
- SCTP/GTP Tunneling

##### Relationships and Interactions

- Service-based Interface (SBI) connections between NFs using HTTP/2
- Control plane protocols (NGAP, GTP-C)
- User plane protocols (GTP-U)
- Database connections
- Management interfaces

##### Architectural Patterns

Key architectural aspects:
- Service-Based Architecture (SBA)
- Control and User Plane Separation (CUPS)
- Network Function Virtualization (NFV) readiness
- Microservices-based design

##### Additional Details

Supporting elements:
- Interface protocol labels
- Version/release information
- Security boundaries
- Deployment considerations

##### Technical Specifications

Technical aspects:
- Protocol stacks for each interface
- Security associations
- Network slicing support
- QoS enforcement points
- Redundancy/high availability features

- UML or similar notation
- Layered organization
- Export to various formats
- Collaboration features

## Diagram (Mermaid)

```mermaid
graph TB
    %% Core Network Functions
    subgraph Control_Plane
        AMF["AMF (Access and Mobility Management)"]:::control
        SMF["SMF (Session Management)"]:::control
        NRF["NRF (Network Repository)"]:::control
        AUSF["AUSF (Authentication Server)"]:::control
        UDM["UDM (Unified Data Management)"]:::control
        PCF["PCF (Policy Control)"]:::control
        UDR["UDR (Unified Data Repository)"]:::control
        NSSF["NSSF (Network Slice Selection)"]:::control
        BSF["BSF (Binding Support)"]:::control
        SCP["SCP (Service Communication Proxy)"]:::control
        SEPP["SEPP (Security Edge Protection)"]:::control
    end

    subgraph User_Plane
        UPF["UPF (User Plane Function)"]:::userplane
    end

    subgraph Support_Systems
        WebUI["Web Management Interface"]:::support
        MongoDB["MongoDB Database"]:::database
        TUN["TUN/TAP Interfaces"]:::interface
        SCTP["SCTP Implementation"]:::protocol
        GTP["GTP Implementation"]:::protocol
        SBI["Service-Based Interface"]:::interface
        CRYPT["Security/Cryptography"]:::security
    end

    %% Relationships
    AMF --> SMF
    SMF --> UPF
    AMF --> NRF
    SMF --> NRF
    AUSF --> UDM
    UDM --> UDR
    PCF --> UDR
    NRF --> SCP
    SCP --> SEPP
    BSF --> UDR
    NSSF --> NRF

    %% Support System Connections
    MongoDB --> UDR
    WebUI --> MongoDB
    UPF --> TUN
    AMF --> SCTP
    UPF --> GTP
    SCP --> SBI
    SEPP --> CRYPT

    %% Click Events
    click AMF "https://github.com/ndodson/open5gs/tree/main/src/amf/"
    click SMF "https://github.com/ndodson/open5gs/tree/main/src/smf/"
    click UPF "https://github.com/ndodson/open5gs/tree/main/src/upf/"
    click NRF "https://github.com/ndodson/open5gs/tree/main/src/nrf/"
    click AUSF "https://github.com/ndodson/open5gs/tree/main/src/ausf/"
    click UDM "https://github.com/ndodson/open5gs/tree/main/src/udm/"
    click PCF "https://github.com/ndodson/open5gs/tree/main/src/pcf/"
    click UDR "https://github.com/ndodson/open5gs/tree/main/src/udr/"
    click NSSF "https://github.com/ndodson/open5gs/tree/main/src/nssf/"
    click BSF "https://github.com/ndodson/open5gs/tree/main/src/bsf/"
    click SCP "https://github.com/ndodson/open5gs/tree/main/src/scp/"
    click SEPP "https://github.com/ndodson/open5gs/tree/main/src/sepp/"
    click WebUI "https://github.com/ndodson/open5gs/tree/main/webui/"
    click MongoDB "https://github.com/ndodson/open5gs/tree/main/lib/dbi/"
    click TUN "https://github.com/ndodson/open5gs/tree/main/lib/tun/"
    click SCTP "https://github.com/ndodson/open5gs/tree/main/lib/sctp/"
    click GTP "https://github.com/ndodson/open5gs/tree/main/lib/gtp/"
    click SBI "https://github.com/ndodson/open5gs/tree/main/lib/sbi/"
    click CRYPT "https://github.com/ndodson/open5gs/tree/main/lib/crypt/"

    %% Styling
    classDef control fill:#f9f,stroke:#333,stroke-width:2px
    classDef userplane fill:#bbf,stroke:#333,stroke-width:2px
    classDef support fill:#bfb,stroke:#333,stroke-width:2px
    classDef database fill:#fb7,stroke:#333,stroke-width:2px
    classDef interface fill:#ddd,stroke:#333,stroke-width:2px
    classDef protocol fill:#fdd,stroke:#333,stroke-width:2px
    classDef security fill:#fbb,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        L1["Control Plane"]:::control
        L2["User Plane"]:::userplane
        L3["Support Systems"]:::support
        L4["Database"]:::database
        L5["Interface"]:::interface
        L6["Protocol"]:::protocol
        L7["Security"]:::security
    end
```
