Device Types
TeamsEnterpriseUnderstand all supported network device platforms, auto-detection, and when to use each platform driver string.
Overview
Every device in NetStacks is assigned a device type that tells the platform which CLI dialect to speak, which commands to run for config collection, and how to parse the output. Choosing the correct device type is critical — a Juniper Junos device assigned cisco_ios will produce garbage output or fail to connect entirely.
NetStacks supports platform drivers for all major network vendors. Each driver knows the correct command to capture the running configuration, the prompt pattern to match, and the paging behavior to handle (e.g., terminal length 0 on Cisco IOS vs. set cli screen-length 0 on Junos).
Supported Vendors
| Vendor | Device Type String | Platforms |
|---|---|---|
| Cisco | cisco_ios | IOS, IOS-XE (ISR, ASR, Catalyst) |
| Cisco | cisco_nxos | Nexus NX-OS (Nexus 3000, 5000, 7000, 9000) |
| Cisco | cisco_xr | IOS-XR (ASR 9000, NCS 5500, XRv) |
| Cisco | cisco_asa | ASA Firewalls (ASA 5500-X, Firepower) |
| Juniper | juniper_junos | Junos OS (MX, EX, QFX, SRX, vMX, vSRX) |
| Arista | arista_eos | EOS (7050X, 7280R, 7500R, 7800R, cEOS) |
| Palo Alto | paloalto_panos | PAN-OS (PA-400, PA-800, PA-3200, PA-5200, PA-7000) |
| Fortinet | fortinet_fortios | FortiOS (FortiGate all series) |
| HPE | hp_procurve | ProCurve / Aruba switches (2530, 2930F, 3810M) |
| Linux | linux | Any SSH-enabled Linux host |
| Generic | generic | Any SSH-accessible device (basic terminal only) |
The device type string is derived from Netmiko-style platform identifiers. If you have used Netmiko, NAPALM, or Nornir, the same type strings work in NetStacks.
How It Works
NetStacks uses platform-specific drivers that map each device type to a set of behaviors:
- Config capture command — The command used to retrieve the running configuration. For example,
show running-configon Cisco IOS vs.show configuration | display seton Juniper Junos. - Paging disable command — The command to prevent output pagination so the full config is captured in a single stream. Cisco IOS uses
terminal length 0, Arista EOS usesterminal length 0, Junos usesset cli screen-length 0, and PAN-OS usesset cli pager off. - Prompt pattern — A regex that matches the device's CLI prompt. This tells NetStacks when a command has finished executing and output is complete.
- Privilege escalation — Some platforms require an
enablecommand (Cisco IOS) orstart shell(Junos) to reach the correct privilege level for config capture.
Auto-Detection
When a device type is not specified or set to auto, NetStacks attempts to identify the platform automatically during the first SSH connection. The auto-detection process works by:
- Analyzing the SSH login banner for vendor-specific strings (e.g., "Cisco IOS Software", "JUNOS", "Arista").
- Examining the command prompt pattern for vendor-specific formats (e.g.,
Router#for Cisco,user@router>for Junos). - Running a small set of non-destructive probe commands and analyzing the output to confirm the platform.
Auto-detection works well for stock device configurations but may fail on heavily customized banners or prompts. If auto-detection selects the wrong platform, config captures and command execution may produce incorrect results. Always verify the detected type after initial connection.
Step-by-Step Guide
Selecting the Right Device Type
- Identify the vendor and OS version of the target device. If unsure, SSH in manually and run
show version(Cisco/Arista),show system information(Junos), or check the login banner. - Match the output to the device type table above. For example, a Cisco Catalyst 9300 running IOS-XE uses
cisco_ios, while a Nexus 9000 running NX-OS usescisco_nxos. - When adding the device in the Admin UI, select the matched device type from the dropdown.
Verifying Auto-Detection
- Add a device with the type set to
autoor leave the type blank during import. - Click Test Connection on the device. The test result shows the detected platform type.
- If the detected type is correct, no action needed. If incorrect, edit the device and manually set the correct device type.
Changing Device Type After Creation
- Navigate to the device detail page.
- Click Edit and change the device type dropdown.
- Click Save. The new platform driver takes effect on the next connection or config capture.
If you change a device type after capturing configs, existing backups are not affected. Only future config captures use the new platform driver.
Code Examples
Platform-Specific Config Capture Commands
# Cisco IOS / IOS-XE
terminal length 0
show running-config
# Cisco NX-OS
terminal length 0
show running-config
# Cisco IOS-XR
terminal length 0
show running-config
# Cisco ASA
terminal pager 0
show running-config
# Juniper Junos
set cli screen-length 0
show configuration | display set
# Arista EOS
terminal length 0
show running-config
# Palo Alto PAN-OS
set cli pager off
show config running
# Fortinet FortiOS
config system console
set output standard
end
show full-configuration
# HPE ProCurve / Aruba
no page
show running-config
# Linux
cat /etc/network/interfaces
ip addr showFilter Devices by Type via API
# List all Cisco IOS devices
curl -s http://localhost:3000/api/devices?device_type=cisco_ios \
-H "Authorization: Bearer ${TOKEN}" | jq '.devices[] | {name, host, site}'
# List all Juniper Junos devices
curl -s http://localhost:3000/api/devices?device_type=juniper_junos \
-H "Authorization: Bearer ${TOKEN}" | jq '.devices[] | {name, host}'
# List all devices at a specific site
curl -s "http://localhost:3000/api/devices?site=dc-east&device_type=arista_eos" \
-H "Authorization: Bearer ${TOKEN}" | jq '.total'Update Device Type via API
# Change a device from generic to cisco_nxos after confirming platform
curl -X PUT http://localhost:3000/api/devices/${DEVICE_ID} \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{"device_type": "cisco_nxos"}'Questions & Answers
- Q: What device types does NetStacks support?
- A: NetStacks supports
cisco_ios(IOS/IOS-XE),cisco_nxos(Nexus NX-OS),cisco_xr(IOS-XR),cisco_asa(ASA Firewalls),juniper_junos(Junos OS),arista_eos(EOS),paloalto_panos(PAN-OS),fortinet_fortios(FortiOS),hp_procurve(ProCurve/Aruba),linux(any SSH-enabled Linux), andgeneric(any SSH device with basic terminal support). - Q: How does auto-detection work?
- A: When a device type is set to
auto, NetStacks analyzes the SSH login banner, command prompt pattern, and output from lightweight probe commands during the first connection. It matches these signals against known vendor fingerprints to identify the platform. Auto-detection covers all supported platforms but may fail on devices with customized banners or prompts. - Q: What if my device type is not listed?
- A: Use the
genericdevice type. It provides basic SSH terminal access without platform-specific config capture or command parsing. You can still connect to the device, run commands manually, and manage credentials. Config snapshots may not work correctly since the generic driver does not know which command retrieves the running configuration. - Q: Can I add a custom device type?
- A: Custom device types are not currently supported through the UI. The platform drivers are compiled into the Controller binary. If you need support for an additional platform, contact the NetStacks team or use the
generictype as a workaround with manual config capture. - Q: What is the difference between cisco_ios and cisco_xr?
- A:
cisco_ioscovers traditional IOS and IOS-XE platforms (ISR, ASR 1000, Catalyst switches) which use a single-context CLI withenablemode.cisco_xrcovers IOS-XR platforms (ASR 9000, NCS 5500) which use a different CLI structure with commit-based configuration,show running-configthat outputs in a hierarchical format, and different prompt patterns. Using the wrong type causes config capture to fail or produce incomplete output. - Q: Does the device type affect terminal sessions?
- A: The device type primarily affects automated operations like config capture, template rendering, and scheduled tasks. For interactive terminal sessions, the device type influences prompt detection and paging disable commands sent at connection time. Using the wrong type may result in extra output or missed prompts during automated workflows, but manual terminal access generally works regardless of type.
Troubleshooting
Wrong device type detected
If auto-detection assigns the wrong platform, edit the device and manually select the correct device type. Common misdetections include Cisco IOS-XE devices detected as cisco_ios (usually harmless since they share the same CLI) and Aruba CX switches detected as hp_procurve (they use different CLI structures).
Config capture returns empty or garbage output
This usually means the device type is wrong. The platform driver is sending the wrong config capture command. Verify the device type by SSHing in manually and running show version. Update the device type to match the actual platform.
Commands fail with "invalid input" errors
Platform mismatch is the most common cause. For example, a Junos device assigned cisco_ios will reject show running-config because Junos uses show configuration. Correct the device type and retry.
Unsupported vendor workarounds
For devices not covered by a specific platform driver (e.g., Ubiquiti EdgeOS, MikroTik RouterOS, Dell OS10), use the generic or linux device type. Interactive terminal sessions work normally. For config capture, you can use connect commands to run the appropriate show command and capture the output manually through the UI.
Related Features
Device types are integral to how NetStacks interacts with your network equipment:
- Adding Devices — Add devices to the inventory and assign device types
- Config Snapshots — Platform-aware config capture using device type drivers
- Terminal Connecting — Connect to devices with platform-specific prompt detection
- NetBox Integration — Platform slugs from NetBox map to NetStacks device types