{"id":27464764,"url":"https://github.com/carlosrabelo/negev","last_synced_at":"2025-04-15T23:15:06.639Z","repository":{"id":287223487,"uuid":"964025831","full_name":"carlosrabelo/negev","owner":"carlosrabelo","description":"NEGEV is a VLAN automation tool for Cisco switches. It dynamically assigns VLANs based on MAC address prefixes, using a flexible and easy-to-configure template.","archived":false,"fork":false,"pushed_at":"2025-04-14T17:56:28.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T23:14:30.991Z","etag":null,"topics":["automation-tool","cisco","cisco-switches","sysadmin","tool","vlan"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carlosrabelo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-04-10T15:17:52.000Z","updated_at":"2025-04-14T17:56:31.000Z","dependencies_parsed_at":"2025-04-10T16:48:41.746Z","dependency_job_id":"a2db7044-f906-426c-a226-6bb369664984","html_url":"https://github.com/carlosrabelo/negev","commit_stats":null,"previous_names":["carlosrabelo/negev"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosrabelo%2Fnegev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosrabelo%2Fnegev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosrabelo%2Fnegev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carlosrabelo%2Fnegev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carlosrabelo","download_url":"https://codeload.github.com/carlosrabelo/negev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249167458,"owners_count":21223508,"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","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-tool","cisco","cisco-switches","sysadmin","tool","vlan"],"created_at":"2025-04-15T23:15:06.151Z","updated_at":"2025-04-15T23:15:06.632Z","avatar_url":"https://github.com/carlosrabelo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Negev\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/carlosrabelo/negev)](https://goreportcard.com/report/github.com/carlosrabelo/negev)\n\n**Negev** is a VLAN automation tool for Cisco switches via Telnet. It dynamically assigns VLANs based on MAC address prefixes, offering a flexible and easy-to-configure solution.\n\n## 🚀 Features\n\n- Telnet connection to Cisco switches\n- Device identification using the dynamic MAC address table\n- Automatic VLAN assignment based on MAC prefixes\n- Sandbox mode for safe simulation\n- Configuration persistence with write memory\n- Dynamic VLAN replacement via CLI\n- Exclusion of specific MAC addresses from reconfiguration\n- Automatic detection and exclusion of trunk interfaces\n- Automatic creation of missing VLANs on the switch\n\n## 🔧 Installation\n\nClone the repository and build the tool using the following commands\n\n```bash\ngit clone https://github.com/carlosrabelo/negev.git\ncd negev\ngo build -o negev main.go\n```\n\n## 📂 Configuration\n\nThe configuration is defined in a YAML file, specifying the default VLAN, MAC-to-VLAN mappings, and exclusions. Below is an example:\n\n```bash\nhost: \"192.168.1.1\"\nusername: \"admin\"\npassword: \"senha\"\nenable_password: \"senha_enable\"\ndefault_vlan: \"10\"\n\nmac_to_vlan:\n  \"3c:2a:f4\": \"30\"  # Brother\n  \"dc:c2:c9\": \"30\"  # Canon\n  \"00:c8:8b\": \"50\"  # Cisco AP\n\nexclude_macs:\n  - \"d8:d3:85:d7:0d:b7\"\n  - \"ac:16:2d:34:bb:da\"\n```\n\nRequired fields:\n\n- **host** (IP address of the Cisco switch)\n- **username**/**password**/**enable_password** (Telnet and privileged mode credentials)\n- **default_vlan** (used for unmapped MACs)\n- **mac_to_vlan** (mapping of MAC prefixes, first 3 bytes, to VLANs)\n- **exclude_macs** (full MAC addresses to ignore)\n\n## 📌 Examples:\n\nRun in sandbox mode:\n\n`negev -y example.yaml`\n\nApply configurations to the switch:\n\n`negev -y example.yaml -x`\n\nReplace VLANs dynamically (e.g., VLAN 10 to 100):\n\n `negev -y example.yaml -x -r 10,100`\n\nRun with debug output:\n\n`negev -y example.yaml -x -d`\n\nSkip VLAN validation:\n\n`negev -y example.yaml -w -s`\n\nCreate missing VLANs:\n\n`negev -y example.yaml -w -c`\n\nOverride the YAML host:\n\n`negev -y example.yaml -h 10.0.0.1`\n\n## ⚠️ Security\n\n- Telnet is insecure; use only on trusted networks\n- Negev applies changes without confirmation\n- Test in sandbox mode (default) before using -w\n\n## 📋 Limitations\n\n- Uses Telnet (insecure); SSH support is planned.\n- Supports only one switch per execution.\n- Does not revert changes in case of failure.\n- Assumes a single MAC address per port to avoid ambiguity in VLAN assignment. If multiple MACs are detected on a port, the port is skipped with a warning.\n- Parsing of switch commands may fail with unexpected output formats.\n\n## 📎 Contributing\n\nContributions are welcome! Please submit issues or pull requests to the GitHub repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosrabelo%2Fnegev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlosrabelo%2Fnegev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosrabelo%2Fnegev/lists"}