{"id":22432703,"url":"https://github.com/1999azzar/network-redundancy","last_synced_at":"2026-05-13T23:38:06.666Z","repository":{"id":216375837,"uuid":"741173870","full_name":"1999AZZAR/network-redundancy","owner":"1999AZZAR","description":"This script is designed to create a virtual bridge that combines a specified main connection with other active network interfaces. It continuously monitors the network interfaces, dynamically adjusting the virtual bridge for network redundancy. ","archived":false,"fork":false,"pushed_at":"2024-01-09T21:12:44.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T07:48:23.788Z","etag":null,"topics":["automation","bridge","linux","network-management"],"latest_commit_sha":null,"homepage":"","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/1999AZZAR.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}},"created_at":"2024-01-09T21:09:43.000Z","updated_at":"2024-01-11T23:10:04.000Z","dependencies_parsed_at":"2024-01-09T22:43:40.331Z","dependency_job_id":null,"html_url":"https://github.com/1999AZZAR/network-redundancy","commit_stats":null,"previous_names":["1999azzar/network-redundancy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1999AZZAR/network-redundancy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fnetwork-redundancy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fnetwork-redundancy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fnetwork-redundancy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fnetwork-redundancy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1999AZZAR","download_url":"https://codeload.github.com/1999AZZAR/network-redundancy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1999AZZAR%2Fnetwork-redundancy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008460,"owners_count":26084460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":["automation","bridge","linux","network-management"],"created_at":"2024-12-05T22:12:36.938Z","updated_at":"2025-10-11T19:17:33.083Z","avatar_url":"https://github.com/1999AZZAR.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Network Redundancy Script\n\n## Table of Contents\n- [Introduction](#introduction)\n- [Prerequisites](#prerequisites)\n- [How to Run](#how-to-run)\n- [Run as a Service (systemd)](#run-as-a-service-systemd)\n- [Run as a Service (rc.local)](#run-as-a-service-rclocal)\n- [Removing the Service](#removing-the-service)\n- [Flowchart](#flowchart)\n\n## Introduction\nThis script is designed to create a virtual bridge that combines a specified main connection with other active network interfaces. It continuously monitors the network interfaces, dynamically adjusting the virtual bridge for network redundancy. This is particularly useful in scenarios where multiple network connections are available, providing a seamless and automatic failover mechanism.\n\n## Prerequisites\nEnsure your system meets the following requirements:\n- Linux operating system.\n- The `ip`, `brctl`, and `awk` commands are available.\n- `sudo` privileges are required to execute the script.\n\n## How to Run\n1. **Clone or Download the Script:**\n   ```bash\n   git clone https://github.com/1999AZZAR/network-redundancy.git\n   ```\n   Replace the URL with the actual path if you are downloading manually.\n\n2. **Make the Script Executable:**\n   ```bash\n   chmod +x /path/to/network_redundancy.sh\n   ```\n\n3. **Run the Script with sudo:**\n   ```bash\n   sudo /path/to/network_redundancy.sh\n   ```\n\n   This will execute the script with elevated privileges necessary for managing network interfaces.\n\n## Run as a Service (systemd)\n1. **Create a systemd Service File:**\n   Create a new service file for systemd. Open an editor and create `/etc/systemd/system/network_redundancy.service` with the following content:\n   ```ini\n   [Unit]\n   Description=Network Redundancy Script\n\n   [Service]\n   ExecStart=/path/to/network_redundancy.sh\n   Restart=always\n   User=root\n   Group=root\n\n   [Install]\n   WantedBy=multi-user.target\n   ```\n   Replace `/path/to/network_redundancy.sh` with the actual path to your script.\n\n2. **Reload systemd:**\n   ```bash\n   sudo systemctl daemon-reload\n   ```\n\n3. **Enable the Service to Start on Boot:**\n   ```bash\n   sudo systemctl enable network_redundancy.service\n   ```\n\n4. **Start the Service:**\n   ```bash\n   sudo systemctl start network_redundancy.service\n   ```\n\n   The script will now run as a service and automatically start on system boot.\n\n## Run as a Service (rc.local)\n1. **Edit the rc.local File:**\n   Edit the `rc.local` file using your preferred text editor:\n   ```bash\n   sudo nano /etc/rc.local\n   ```\n\n2. **Add the Command to Run the Script:**\n   Add the following line before `exit 0`:\n   ```bash\n   /path/to/network_redundancy.sh \u0026\n   ```\n   Replace `/path/to/network_redundancy.sh` with the actual path to your script.\n\n3. **Make rc.local Executable:**\n   ```bash\n   sudo chmod +x /etc/rc.local\n   ```\n\n4. **Reboot Your System:**\n   ```bash\n   sudo reboot\n   ```\n\n   The script will run automatically on system boot using `rc.local`.\n\n## Removing the Service\n1. **If Using systemd:**\n   ```bash\n   sudo systemctl disable network_redundancy.service\n   sudo systemctl stop network_redundancy.service\n   ```\n\n2. **If Using rc.local:**\n   Remove the line added to `rc.local`.\n\n3. **Delete the systemd Service File (if created):**\n   ```bash\n   sudo rm /etc/systemd/system/network_redundancy.service\n   ```\n\n4. **Reboot Your System:**\n   ```bash\n   sudo reboot\n   ```\n\n5. **Remove the Script (if no longer needed):**\n   ```bash\n   rm /path/to/network_redundancy.sh\n   ```\n\n   The script and associated configurations will be removed from your system.\n\n## Flowchart\n```mermaid\ngraph TB\n\nsubgraph Initialization\n  A[Define Variables]\n  B[Define Functions]\n  C[Trap Exit Signal]\nend\n\nsubgraph Cleanup\n  D[Cleanup]\nend\n\nsubgraph Main Loop\n  E[Get Active Interfaces]\n  F[Check Changes in Interfaces]\n  G[Update Virtual Bridge]\n  H[Set Virtual Bridge as Main Connection]\nend\n\nA --\u003e B --\u003e C --\u003e D --\u003e E --\u003e F --\u003e G --\u003e H --\u003e E\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fnetwork-redundancy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1999azzar%2Fnetwork-redundancy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1999azzar%2Fnetwork-redundancy/lists"}