Dgs-CLI – 63-command CLI for D-Link DGS-1100 switches via Selenium

The DGS-1100 is a ~$40 managed gigabit switch with real features (802.1Q VLANs, STP, IGMP, port security) but its only management interface is a JavaScript web UI from 2015. No SSH, no REST API, SNMP is read-only for anything useful. I needed to configure a few of these and clicking through the web UI was painful, so I wrote a CLI that drives headless Chrome via Selenium. It logs in, scrapes the JS data files the switch populates via XHR, and submits forms to the CGI endpoints for changes. Every write command reads back the config afterward to verify the switch accepted it. 63 commands covering everything the switch exposes — VLANs, PVIDs, STP, IGMP, storm control, port security, mirroring, QoS, bandwidth limits, SNMP, traffic segmentation, and more. Plus a recommend command that crawls 13 data files and checks 20 categories of issues (PVID mismatches, orphaned ports, disabled security features, etc.) and a fix command that auto-applies what it finds. Other things that fell out of this: config dump/diff/restore for version control, a template command to generate reproducible batch files, multi-switch support, a Prometheus exporter, a Textual TUI, and shell completions. Built with Nix so nix run github:bobberb/dgs-cli -- status just works. 179 offline tests. Tested on DGS-1100-08V2. The --1210 flag is stubbed out for future DGS-1210 support.

  • API Platform
  • Chrome Extension
  • Code Generation
Mar 23, 2026Visit website

AI Summary

Dgs-CLI is a command-line interface that automates the configuration of D-Link DGS-1100 series managed gigabit switches using Selenium to interact with their web UI. It offers 63 commands for managing features like VLANs, STP, IGMP, and port security, along with diagnostic and auto-correction capabilities.

Best For

Network administrators managing D-Link DGS-1100 switches, Users who prefer CLI automation over web interfaces, IT professionals seeking to batch configure multiple switches

Why It Matters

Provides a robust command-line interface for comprehensive automation and management of D-Link DGS-1100 switches, overcoming the limitations of their dated web UI.

Key Features

  • Automated CLI for D-Link DGS-1100 switches using Selenium and headless Chrome
  • 63 commands covering VLANs, STP, IGMP, port security, QoS, and more
  • Configuration verification by reading back settings after each write operation
  • Automated configuration analysis and remediation with 'recommend' and 'fix' commands

Use Cases

  • A network administrator managing multiple D-Link DGS-1100 switches can use Dgs-CLI to automate the initial configuration of VLANs, port security, and STP across all devices, saving significant time compared to manual web UI configuration.
  • A home lab enthusiast can leverage Dgs-CLI's config dump and diff features to version control their switch configurations, allowing for easy rollback or comparison of changes made over time.
  • A small business owner with limited IT resources can use the `recommend` and `fix` commands to quickly identify and resolve common network misconfigurations on their DGS-1100 switch, improving network stability and security without deep technical expertise.