Network & SNMP Discovery
Discover hosts and open ports across IP ranges with network scanning, and query network devices for system information, interfaces, neighbors and VLANs with SNMP.
Overview
AsPeekIt has two network discovery zone types. Network Scan probes IP ranges for live hosts and open TCP ports and records one asset per responding host. SNMP Discovery queries devices (switches, routers, firewalls, access points, UPS, printers, NAS…) for system information, interfaces, VLANs and LLDP/CDP neighbors. Neither needs an agent on the devices. Targets in private ranges are allowed while DISCOVERY_ALLOW_PRIVATE_TARGETS is true (the default).
Network Scan Configuration
The network scan collector probes IP addresses across the configured ranges.
- targets (Target Networks, required): CIDR ranges (e.g., "10.0.0.0/24"), ranges (e.g., "10.0.0.1-10.0.0.254") or single IPs, one per line or comma-separated. A zone expands to at most 65,536 addresses.
- ports (Ports to Scan): Top 100 ports (default), Top 1024 ports, All ports 1-65535, or Custom port list (e.g., "22,80,443,8000-9000").
- scan_type (Scan Type): fast, normal (default) or comprehensive; used only when the scan runs through nmap (see below).
- timeout (Connection Timeout, seconds): per-probe timeout.
- banner_grab (Banner Grabbing): read service banners from open ports to identify the running service.
- use_nmap (Use nmap): use nmap when it is installed on the worker (default yes); otherwise a socket-based scan is used.
Scan Types and Large Scans
With nmap the scan type selects the nmap options; the socket-based scan ignores it.
- fast: -sS -T4 --min-rate=1000 (SYN scan, no service detection)
- normal: -sS -sV -T4 (SYN scan with service version detection)
- comprehensive: -sS -sV -O -T3 (adds OS detection, slower timing)
- More than 100 ports (Top 1024, All ports, large custom lists): the zone is scanned by parallel Celery tasks — live hosts are found first, then every host is scanned in chunks of 5,000 ports with sockets (nmap is not used, banner grabbing is off unless enabled)
Note: Network scanning can trigger intrusion detection systems. Coordinate with your security team and allow-list the AsPeekIt workers (or the relay) before scanning production networks.
SNMP Discovery Configuration
SNMP discovery queries every address of the target ranges with SNMP. The form fields are:
- targets (Target Networks, required): CIDR ranges, one per line.
- version (SNMP Version): v2c (default) or v3. SNMP v1 is not supported.
- community (SNMP Community, v2c, required): the community string.
- v3 only: username (SNMPv3 Username, required), auth_protocol (SHA default, MD5 or none) with auth_password, priv_protocol (AES-128 default, DES or none) with priv_password.
- port (SNMP Port): default 161.
- timeout (seconds): default 5.
- retries: default 1.
Note: Zones created before the version selector was fixed stored it as snmp_version: the collector still reads that key when version is missing, and editing the zone saves it as version.
SNMP Options
Optional connection_config keys, settable through the API:
- collect_interfaces (default true), collect_lldp (true), collect_cdp (true), collect_vlans (true), collect_entity_mib (true), collect_vendor_details (true), collect_arp (false)
- exclude_ips: addresses that are never queried
- max_concurrent: parallel queries (default 50)
Device Classification
Each SNMP device is classified from its system data:
- Vendor: from the enterprise number in sysObjectID (Cisco, Juniper, HP, Arista, MikroTik, Huawei, Fortinet, F5, Aruba and many more)
- Type: patterns on sysDescr first (switch, router, firewall, load balancer, wireless AP, UPS, NAS, printer…), then a default per vendor (e.g. Fortinet → firewall, APC → ups), otherwise network_device
- Vendor details: model, serial and firmware from vendor-specific OIDs and the Entity MIB when available
Note: For network scan hosts the type is guessed from the open ports and the vendor of the MAC address (e.g. database ports → database_server, SSH → server_linux, RDP/SMB → server_windows, web-only → application).
Discovered Assets and Data
Network and SNMP discovery create one asset per host or device; details are stored in its attributes.
- Network Scan hosts: IP, MAC address and vendor (from the ARP table when the host is on the same segment), open ports, banners and services detected
- SNMP devices: system description, uptime, contact and location, vendor and model, interfaces (name, speed, MAC, addresses, status), VLANs (IEEE Q-Bridge MIB, then Cisco VTP) and Entity MIB data
- Dependencies: SNMP creates lldp_neighbor and cdp_neighbor dependencies between devices that see each other as neighbors
- Hosts no longer answering are deactivated at the end of a completed scan
Merging with Other Sources
When cross-zone deduplication is enabled, an SNMP device and the network-scan asset of its polled address, or an agent host and the scan/SNMP asset of one of its interface addresses, can be merged into one asset (see /docs/assets/deduplication).
Tips and Best Practices
Consider these recommendations when configuring network and SNMP discovery.
- Start with a small range and the Top 100 ports to check connectivity and duration before scaling up
- Use separate zones for network scan and SNMP so each has its own schedule
- SNMP inventories change slowly: an interval of 6–24 hours is usually enough
- Split very large ranges into several zones, or run them from a relay close to the network
- Never keep the default "public" community string in production