christianmanivong 5f0c7c76b3
driver / standard (push) Successful in 18s
driver / lint (push) Failing after 7s
driver / types (push) Successful in 1m30s
driver / test (3.13) (push) Successful in 1m16s
driver / test (3.12) (push) Successful in 1m31s
driver / lowest (push) Successful in 34s
driver / build (push) Successful in 44s
driver / security (push) Successful in 1m23s
CI / driver (push) Failing after 3m15s
driver / publish (push) Skipped
Merge pull request 'fix(tests): stub is_alive so no test opens a socket' (#18) from fix/bugs-2026-11-02c into main
2026-11-02 09:57:10 +00:00

napalm-zyxel

NAPALM driver for Zyxel VMG series residential gateways (VMG4005-B50A and similar), built on napalm-device-types (ResidentialGatewayDriver).

Tested against

Model Firmware
not recorded yet not recorded yet

Connection

The gateway's web API (the Zyxel DAL protocol) over HTTP on port 80, or HTTPS on port 443 with use_tls. The driver fetches the gateway's RSA public key, sends a fresh AES key encrypted with it, and logs in with the web interface account; every request and response after that is AES-encrypted.

from napalm import get_network_driver

driver = get_network_driver("zyxel")
with driver("192.0.2.1", "admin", "secret", optional_args={"use_tls": True}) as device:
    print(device.get_facts())
Optional argument Default Meaning
use_tls False HTTPS instead of HTTP
port 443 with use_tls, else 80 port of the web interface
verify False verify the gateway's TLS certificate

Supported

Getter / action Source
get_facts basic device information
get_interfaces, get_interfaces_ip basic device information (WAN, LAN, Wi-Fi)
get_arp_table derived from the active LAN hosts
get_wan_status basic device information
get_hosts DAL LAN_HOSTS, else the DHCP page
get_port_forwards, get_nat_translations DAL NAT_PORTMAP, else the status page
get_wireless_clients, get_ssids, get_radio_status DAL, else the wireless page
get_diagnostics DAL DIAGNOSTICS
is_alive TCP connect to the web port
reboot_host DAL REBOOT
restart_wifi DAL WIFI_RESTART

Not supported

Configuration changes (load_merge_candidate and load_replace_candidate raise NotImplementedError), get_config, LLDP, BGP, NTP, SNMP, users, routes, MAC address table, optics, environment, traceroute, VPN tunnels and the CLI.

ping returns an error and SUPPORTS_PING is False: the DAL accepts a PINGTEST request but does not report whether the target answered.

Development

The rules are in STANDARDS.md.

python -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/pytest --cov

License

Apache-2.0

S
Description
No description provided
Readme
423 KiB
0 Stars 1 Watchers 0 Forks
2026-10-23 13:01:34 +00:00
Languages
Python 100%