# ashwin52/ospf-capstone architecture

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

- Interactive diagram: https://gitdiagram.com/ashwin52/ospf-capstone
- Repository: https://github.com/ashwin52/ospf-capstone

## Overview

This repository is a six-router Containerlab lab for demonstrating OSPF routing and resilience. The user deploys the topology, then observes neighbor formation, route propagation, ECMP, failure detection, reconvergence, recovery, and end-to-end connectivity. Router configuration supplies FRR/OSPF settings; the documented Bash verification script checks lab nodes, neighbors, ECMP, and connectivity. Relationships reflect the README and tree; no source excerpts were available, so implementation-level wiring beyond documented deployment and checks is not inferred.

Main entry points: [`configs/r1/frr.conf`](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf) (OSPF protocol), [`scripts/verify.sh`](https://github.com/ashwin52/ospf-capstone/blob/main/scripts/verify.sh) (Automated checks), [`configs/r2/frr.conf`](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf) (Equal-cost paths), [`ospf.clab.yml`](https://github.com/ashwin52/ospf-capstone/blob/main/ospf.clab.yml) (Lab topology)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lab["Lab deployment"]
  node_topology["Lab topology<br/>[ospf.clab.yml]"]
  node_containerlab["Containerlab"]
  node_docker["Docker runtime"]
end

subgraph group_routing["OSPF routing"]
  node_r1["Router R1<br/>[frr.conf]"]
  node_r2["Router R2<br/>[frr.conf]"]
  node_r3["Router R3<br/>[frr.conf]"]
  node_r4["Router R4<br/>[frr.conf]"]
  node_r5["Router R5<br/>[frr.conf]"]
  node_r6["Router R6<br/>[frr.conf]"]
  node_ospf["OSPF protocol<br/>[frr.conf]"]
  node_neighbors["Neighbor formation<br/>[frr.conf]"]
  node_routes["Route propagation<br/>[frr.conf]"]
end

subgraph group_resilience["Resilience demos"]
  node_ecmp["Equal-cost paths<br/>[frr.conf]"]
  node_failure["Link failure<br/>[frr.conf]"]
  node_failover["Route failover<br/>[frr.conf]"]
  node_recovery["Link recovery<br/>[frr.conf]"]
  node_connectivity["End-to-end reachability<br/>[frr.conf]"]
end

subgraph group_verification["Verification"]
  node_verify["Automated checks<br/>[verify.sh]"]
end

node_user(("Lab operator"))

node_user -->|"deploys"| node_topology
node_topology -->|"defines lab"| node_containerlab
node_containerlab -->|"orchestrates"| node_docker
node_docker -->|"runs"| node_r1
node_docker -->|"runs"| node_r2
node_docker -->|"runs"| node_r3
node_docker -->|"runs"| node_r4
node_docker -->|"runs"| node_r5
node_docker -->|"runs"| node_r6
node_r1 -->|"configures"| node_ospf
node_r2 -->|"configures"| node_ospf
node_r3 -->|"configures"| node_ospf
node_r4 -->|"configures"| node_ospf
node_r5 -->|"configures"| node_ospf
node_r6 -->|"configures"| node_ospf
node_ospf -->|"forms adjacencies"| node_neighbors
node_ospf -->|"propagates routes"| node_routes
node_ospf -->|"installs paths"| node_ecmp
node_failure -->|"triggers"| node_failover
node_ospf -->|"reconverges routes"| node_failover
node_recovery -->|"restores links"| node_ospf
node_ospf -->|"restores equal paths"| node_ecmp
node_r1 -->|"tests reachability"| node_connectivity
node_user -->|"runs"| node_verify
node_verify -->|"checks"| node_neighbors
node_verify -->|"checks"| node_ecmp
node_verify -->|"checks"| node_connectivity

click node_topology "https://github.com/ashwin52/ospf-capstone/blob/main/ospf.clab.yml"
click node_r1 "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf"
click node_r2 "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf"
click node_r3 "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r3/frr.conf"
click node_r4 "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r4/frr.conf"
click node_r5 "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r5/frr.conf"
click node_r6 "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r6/frr.conf"
click node_ospf "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf"
click node_neighbors "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf"
click node_routes "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf"
click node_ecmp "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf"
click node_failure "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf"
click node_failover "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf"
click node_recovery "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf"
click node_connectivity "https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf"
click node_verify "https://github.com/ashwin52/ospf-capstone/blob/main/scripts/verify.sh"

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_topology,node_containerlab,node_docker toneBlue
class node_r1,node_r2,node_r3,node_r4,node_r5,node_r6,node_ospf,node_neighbors,node_routes toneAmber
class node_ecmp,node_failure,node_failover,node_recovery,node_connectivity toneMint
class node_verify toneRose
class node_user toneIndigo
```

## Components

### Lab deployment

- [Lab topology](https://github.com/ashwin52/ospf-capstone/blob/main/ospf.clab.yml): `ospf.clab.yml`
- **Containerlab**
- **Docker runtime**

### OSPF routing

- [Router R1](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf): `configs/r1/frr.conf`
- [Router R2](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf): `configs/r2/frr.conf`
- [Router R3](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r3/frr.conf): `configs/r3/frr.conf`
- [Router R4](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r4/frr.conf): `configs/r4/frr.conf`
- [Router R5](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r5/frr.conf): `configs/r5/frr.conf`
- [Router R6](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r6/frr.conf): `configs/r6/frr.conf`
- [OSPF protocol](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf): `configs/r1/frr.conf`
- [Neighbor formation](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf): `configs/r1/frr.conf`
- [Route propagation](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf): `configs/r1/frr.conf`

### Resilience demos

- [Equal-cost paths](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf): `configs/r2/frr.conf`
- [Link failure](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf): `configs/r2/frr.conf`
- [Route failover](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf): `configs/r2/frr.conf`
- [Link recovery](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r2/frr.conf): `configs/r2/frr.conf`
- [End-to-end reachability](https://github.com/ashwin52/ospf-capstone/blob/main/configs/r1/frr.conf): `configs/r1/frr.conf`

### Verification

- [Automated checks](https://github.com/ashwin52/ospf-capstone/blob/main/scripts/verify.sh): `scripts/verify.sh`

### Other components

- **Lab operator**

## Connections

- Lab operator → Lab topology: deploys
- Lab topology → Containerlab: defines lab
- Containerlab → Docker runtime: orchestrates
- Docker runtime → Router R1: runs
- Docker runtime → Router R2: runs
- Docker runtime → Router R3: runs
- Docker runtime → Router R4: runs
- Docker runtime → Router R5: runs
- Docker runtime → Router R6: runs
- Router R1 → OSPF protocol: configures
- Router R2 → OSPF protocol: configures
- Router R3 → OSPF protocol: configures
- Router R4 → OSPF protocol: configures
- Router R5 → OSPF protocol: configures
- Router R6 → OSPF protocol: configures
- OSPF protocol → Neighbor formation: forms adjacencies
- OSPF protocol → Route propagation: propagates routes
- OSPF protocol → Equal-cost paths: installs paths
- Link failure → Route failover: triggers
- OSPF protocol → Route failover: reconverges routes
- Link recovery → OSPF protocol: restores links
- OSPF protocol → Equal-cost paths: restores equal paths
- Router R1 → End-to-end reachability: tests reachability
- Lab operator → Automated checks: runs
- Automated checks → Neighbor formation: checks
- Automated checks → Equal-cost paths: checks
- Automated checks → End-to-end reachability: checks
