{"id":48844289,"url":"https://github.com/maniam/frr-labnet","last_synced_at":"2026-04-15T04:02:54.566Z","repository":{"id":350037244,"uuid":"1204475412","full_name":"ManiAm/FRR-LabNet","owner":"ManiAm","description":"Hands-on Docker-based lab to learn FRRouting (FRR) using an automated multi-node OSPF topology.","archived":false,"fork":false,"pushed_at":"2026-04-08T17:08:33.000Z","size":403,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-08T17:27:20.331Z","etag":null,"topics":["frr","frrouting","ospf","sonic"],"latest_commit_sha":null,"homepage":"https://blog.homelabtech.dev/content","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ManiAm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-08T03:30:18.000Z","updated_at":"2026-04-08T17:08:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ManiAm/FRR-LabNet","commit_stats":null,"previous_names":["maniam/frr-labnet"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ManiAm/FRR-LabNet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManiAm%2FFRR-LabNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManiAm%2FFRR-LabNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManiAm%2FFRR-LabNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManiAm%2FFRR-LabNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManiAm","download_url":"https://codeload.github.com/ManiAm/FRR-LabNet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManiAm%2FFRR-LabNet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31825514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"online","status_checked_at":"2026-04-15T02:00:06.175Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frr","frrouting","ospf","sonic"],"created_at":"2026-04-15T04:02:38.785Z","updated_at":"2026-04-15T04:02:54.557Z","avatar_url":"https://github.com/ManiAm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# FRR-LabNet\n\nThis project is a hands-on lab for learning FRRouting (FRR) using Docker containers. It spins up a small multi-homed topology with three containers running OSPF, letting you observe route learning, kernel route installation, and end-to-end forwarding without needing physical hardware. The setup is fully automated: build the image, bring up the containers, and OSPF converges on its own.\n\n- For background on FRR itself see [FRRouting.md](FRRouting.md).\n- For details on how FRR is integrated within the SONiC see [FRR_SONIC.md](FRR_SONIC.md).\n\n\n\n## FRR Test Setup\n\nWe create three Ubuntu 20.04 containers with FRR for a small multi-homed lab topology.\n\n\u003cimg src=\"pics/frr-setup.png\" alt=\"segment\" width=\"450\"\u003e\n\nBuild the image:\n\n```bash\ndocker build --tag frr-labnet .\n```\n\nStart the containers:\n\n```bash\ndocker compose up -d\n```\n\nCompose creates two user-defined **bridge** networks with fixed subnets. Docker attaches a virtual Ethernet interface per network and picks an address from that subnet automatically, so you usually do not need to configure interface IPs by hand for the lab.\n\n- **H1** is only on `br1`: one NIC (**eth0**) with an address in 10.10.10.0/24.\n\n- **H3** is only on `br2`: one NIC (**eth0**) with an address in 20.20.20.0/24.\n\n- **H2** is on both networks (listed as `br1` then `br2`): **eth0** on 10.10.10.0/24 and **eth1** on 20.20.20.0/24, so it can forward between the two segments once routing is up.\n\nWe use dynamic routing (for example OSPF) across the three containers. Each host uses normal Linux interfaces from the Docker bridges.\n\n\n### Pre-loaded Configuration\n\nThe OSPF configuration is baked into the Docker image so everything comes up automatically after `docker compose up -d`. No manual steps are needed. The entrypoint script picks the right config based on the container's hostname. It also enables IP forwarding and starts FRR. The config files live under `configs/`:\n\n```\nconfigs/\n├── daemons              # shared — enables ospfd for all containers\n├── frr-h1/frr.conf      # loopback 1.1.1.1, OSPF on 10.10.10.0/24\n├── frr-h2/frr.conf      # loopback 2.2.2.2, OSPF on both subnets\n└── frr-h3/frr.conf      # loopback 3.3.3.3, OSPF on 20.20.20.0/24\n```\n\n\u003e To change a host's config, edit the file under `configs/` and rebuild the image. You can also make live changes with `vtysh` inside the container, but those will be lost on the next `docker compose up`.\n\n\n### Verify OSPF Convergence\n\nOnce the routing tables across all containers are converged, you should be able to see OSPF neighbors.\n\nGo to the H1 container:\n\n```bash\ndocker exec -it H1 bash\n```\n\nAnd check its OSPF neighbors:\n\n```bash\nfrr# show ip ospf neighbor\n\nNeighbor ID     Pri State         Up Time       Dead Time Address         Interface          RXmtL RqstL DBsmL\n2.2.2.2           1 Full/DR       9m12s           37.624s 10.10.10.3      eth0:10.10.10.2       0     0     0\n```\n\nThe routing table on H1 looks like this:\n\n```bash\nfrr# show ip route\n\nCodes: K - kernel route, C - connected, L - local, S - static,\n       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,\n       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,\n       f - OpenFabric, t - Table-Direct,\n       \u003e - selected route, * - FIB route, q - queued, r - rejected, b - backup\n       t - trapped, o - offload failure\n\nIPv4 unicast VRF default:\nK\u003e* 0.0.0.0/0 [0/0] via 10.10.10.1, eth0, weight 1, 00:01:31\nO   1.1.1.1/32 [110/0] is directly connected, lo, weight 1, 00:01:31\nL * 1.1.1.1/32 is directly connected, lo, weight 1, 00:01:31\nC\u003e* 1.1.1.1/32 is directly connected, lo, weight 1, 00:01:31\nO\u003e* 2.2.2.2/32 [110/10] via 10.10.10.2, eth0, weight 1, 00:00:46\nO\u003e* 3.3.3.3/32 [110/20] via 10.10.10.2, eth0, weight 1, 00:00:41\nO   10.10.10.0/24 [110/10] is directly connected, eth0, weight 1, 00:01:31\nC\u003e* 10.10.10.0/24 is directly connected, eth0, weight 1, 00:01:31\nL\u003e* 10.10.10.3/32 is directly connected, eth0, weight 1, 00:01:31\nO\u003e* 20.20.20.0/24 [110/20] via 10.10.10.2, eth0, weight 1, 00:00:46\n```\n\nYou can check the kernel routes on H1:\n\n```bash\n# ip route\n\ndefault via 10.10.10.1 dev eth0\n2.2.2.2 nhid 10 via 10.10.10.2 dev eth0 proto ospf metric 20\n3.3.3.3 nhid 10 via 10.10.10.2 dev eth0 proto ospf metric 20\n10.10.10.0/24 dev eth0 proto kernel scope link src 10.10.10.3\n20.20.20.0/24 nhid 10 via 10.10.10.2 dev eth0 proto ospf metric 20\n```\n\n\n### Testing End-to-End Connectivity\n\nWith OSPF converged, H1 can reach H3 through H2. IP forwarding is enabled automatically by the Dockerfile, so H2 routes packets between its two interfaces.\n\nPing H3 from H1:\n\n```bash\ndocker exec H1 ping -c 3 3.3.3.3\n```\n\nAnd ping H1 from H3:\n\n```bash\ndocker exec H3 ping -c 3 1.1.1.1\n```\n\nBoth should succeed, confirming the full routing path H1 → H2 → H3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaniam%2Ffrr-labnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaniam%2Ffrr-labnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaniam%2Ffrr-labnet/lists"}