Skip to content

Connection Templates in rConfig V8 Core

Connection templates define how rConfig V8 Core authenticates, connects, and interacts with your network devices. After reading this page, you can understand how templates work, import community templates, create and edit your own in the YAML editor, and troubleshoot connection problems they cause.

Use connection templates whenever you need rConfig to talk to a new device type, standardise connection behaviour across a fleet, or fix connection failures caused by mismatched prompts, timeouts, or paging. Templates let you define connection parameters once and reuse them across many devices, rather than configuring each device by hand.

A connection template is a reusable blueprint that specifies connection parameters, authentication prompt patterns, CLI prompt recognition, command syntax, and behaviour for a group of devices. Define these parameters once in a template, then apply that template to every device of the same type or vendor family.

Templates solve several common problems in configuration management:

  • Consistency across the fleet: All devices of a type use identical connection parameters, reducing drift and troubleshooting effort.
  • Multi-vendor support: Each template encapsulates a vendor’s CLI behaviour, prompt patterns, and command syntax, so rConfig can talk to diverse equipment.
  • Simplified onboarding: Assign a pre-built template to a new device instead of configuring connection parameters from scratch.
  • Centralised maintenance: Update a template once (for example a changed timeout) and the change applies to every device using it.

Each template is written in YAML, a human-readable data format. A template defines:

  • Connection protocol: Whether to use SSH, Telnet, or another protocol.
  • Authentication parameters: The username and password prompt patterns (not actual credentials).
  • CLI prompt recognition: Patterns that identify when the device is ready for commands.
  • Command execution behaviour: Timeout values, paging settings, and command delimiters.
  • Privilege escalation: Enable mode access and privilege level commands.
  • Vendor-specific handling: Special handling for unique device behaviours.
  • One template per device: Each device is assigned exactly one connection template, giving predictable connection behaviour.
  • Many devices per template: A single template can be assigned to unlimited devices. This is the main mechanism for scaling configuration management.
  • Cross-vendor flexibility: A template labelled for one vendor (such as Cisco IOS) often works with other vendors using similar CLI patterns. Test before relying on it across vendor boundaries.
  • No limit on template count: Create as many templates as your equipment requires.
  • Portability: Templates use a standard format compatible across rConfig versions, so they can be shared and reused.

rConfig V8 Core ships with four default connection templates covering common device types:

  • Cisco IOS/IOS-XE: Standard Cisco router and switch platforms.
  • Cisco NXOS: Nexus data center switching platforms.
  • Cisco ASA: Adaptive Security Appliance firewalls.
  • Generic SSH: Basic SSH connectivity for Linux/Unix systems.

Although labelled for Cisco, these templates frequently work with Arista, HP/Aruba, Juniper (with modifications), and other vendors using similar CLI patterns. Verify compatibility through testing before production deployment.

The rConfig project maintains an open-source template repository on GitHub with templates for dozens of vendor platforms, YAML key/value documentation, and contribution guidelines.

The Templates interface provides centralised management for your template library. The main view lists all templates in a searchable, sortable table.

rConfig V8 Core Templates main view listing connection templates with name, protocol, and action columns in a searchable table

From this view you can:

  • View all configured templates with their key metadata.
  • Filter templates by name or protocol.
  • Add a new custom template.
  • Import the community template repository to local storage.
  • Edit or delete existing templates.
  • Assign templates to test devices for validation.

Importing community templates is a deliberate two-step process. First you download the repository to local storage on the server, then you import the individual templates you want into your library.

  • The git command available on the server or in your container. See Docker setup if you run rConfig in containers.
  • The storage directory writable by the web server user.
  • Access to the Templates interface under Inventory → Templates.
Import Templates button with a GitHub icon in the rConfig V8 Core Templates interface toolbar
  1. Navigate to Inventory → Templates.
  2. Click Import Templates (the button with the GitHub icon).
  3. rConfig clones the repository into local storage under storage/app/rconfig/templates/rConfig-templates.
  4. Read the success message confirming how many template files were downloaded.

At this point the templates are staged on disk but the Templates list is unchanged. Nothing has been added to your library yet.

Step 2: Import individual templates into your library

Section titled “Step 2: Import individual templates into your library”
  1. Click Add Template, or edit an existing template, to open the YAML editor.
  2. Click Choose Template to Import (this appears once the repository has been downloaded).
  3. Select a vendor folder, then select a template file from that vendor.
  4. Click Apply to load the selected template’s YAML into the editor.
  5. Review or adjust the template name and contents.
  6. Click Save to add the template to your library.

Each save creates one template record. Repeat for every community template you want. Because you save them individually, you keep full control over naming and content, and existing custom templates are never overwritten.

Template creation and editing happen in rConfig’s integrated YAML editor, which provides syntax highlighting and structured formatting.

  • Access to the Templates interface under Inventory → Templates.
  • A non-production device available for testing the template before deployment.
  • Console or out-of-band access to that test device in case a connection test locks you out.
  1. Navigate to Inventory → Templates.
  2. Click Add Template to open the YAML editor with a blank template.
  3. Enter a descriptive template name indicating the vendor or platform.
  4. Specify the connection protocol (SSH, Telnet, and so on).
  5. Set the authentication prompt patterns.
  6. Configure the command prompt recognition patterns.
  7. Set timeout values appropriate for the device’s response time.
  8. Define paging control commands if the device requires them.
  9. Click Save, then assign the template to a test device and run a debug connection test (see How to test and debug a template).
  10. Refine the parameters based on the test, then assign to production devices.

The editor is a direct interface to the YAML configuration file. Follow these syntax rules to avoid errors:

  • Comments begin with #, on their own line or at the end of a configuration line. Default templates include extensive comments explaining each parameter. Keep them or add your own.
  • Indentation uses spaces, not tabs, typically 2 or 4 spaces per level.
  • Quotation marks may be needed on string values containing special characters.
  • Key-value pairs use key: value with a space after the colon.
  • List items begin with a dash and a space, - item.
  • Case matters: keys and values are case-sensitive.

The username and password keys define the CLI prompt patterns rConfig watches for during authentication. They specify prompt text patterns, not actual credentials:

username: "Username:" # The prompt the device displays
password: "Password:" # The password prompt pattern

Device credentials are stored separately in the device configuration and provided at connection time. Never put real usernames or passwords in a template.

The timeout parameter controls how long rConfig waits for a device response before declaring a connection failure:

timeout: 15 # Timeout in seconds

The YAML editor does not perform real-time syntax validation. Syntax errors may not surface until template execution, where they cause connection failures. Watch for the common YAML mistakes: extra or missing indentation spaces, missing colons after keys, unmatched quotes, incorrect list formatting, mixed tabs and spaces, and trailing spaces.

Effective template development is iterative. Test, read the debug output, refine, and repeat.

  1. Identify a non-production device for testing, with console or out-of-band access available.
  2. Navigate to Inventory → Devices and edit the test device.
  3. Assign the new template and save.
  4. Run a debug connection test from the CLI:
Terminal window
cd /var/www/html/rconfig
php artisan rconfig:download-device {device-id} --debug

The --debug flag prints verbose output covering connection attempts, the authentication sequence, prompt recognition, command execution, and any errors or timeout events.

  1. Review the output for successful authentication, correct prompt recognition, complete command execution, and a clean disconnect.
  2. Adjust the prompt patterns, timeout values, command syntax, or privilege escalation as needed, then retest.
  3. Before production, test against multiple devices of the same type and over several connection cycles.

For full YAML key documentation, value formats, and worked examples, see the rConfig templates repository on GitHub.

Template problems usually show up as connection failures, authentication errors, or incomplete output. The tabs below cover the most common causes and fixes.

Symptoms: connections fail with timeout errors, downloads are incomplete, or success is intermittent.

Common causes: the timeout value is too low, network latency on WAN or VPN paths, an overloaded device responding slowly, or a prompt pattern mismatch that leaves rConfig waiting for a prompt that never matches.

Resolution:

  1. Increase the timeout incrementally (start with 5-second steps).
  2. Run with --debug to observe actual response times.
  3. Verify prompt patterns match the real device output.
  4. Extend timeouts for remote devices on high-latency paths.
  5. Check device CPU and memory during connection attempts.
# Original - too aggressive
timeout: 5
# Adjusted for WAN devices
timeout: 20
ParameterPurposeTypical values
timeoutConnection timeout in seconds5-30 seconds
usernameUsername prompt pattern”Username:”, “login:“
passwordPassword prompt pattern”Password:”, “password:“
promptCLI ready prompt patternDevice-specific regex
protocolConnection protocolSSH, Telnet
paging_commandDisable output pagingVendor-specific
enable_passwordEnable mode prompt”Password:“
enable_commandPrivilege escalation”enable”, “en”
ScenarioRecommended timeoutRationale
LAN devices, modern hardware10-15 secondsFast network, responsive devices
WAN devices, remote locations20-30 secondsNetwork latency considerations
Legacy equipment25-35 secondsSlower device processing
Devices with large configs30-45 secondsExtended output generation time
Test/development environment15 secondsBalance speed and reliability
  • Never embed credentials in template files. Use rConfig’s encrypted credential storage instead.
  • Prefer SSH over Telnet wherever the device supports it.
  • Use the minimum required privilege level, and enable mode only when a command needs it.
  • Document vendor-specific quirks and security requirements in YAML comments.
  1. Navigate to Inventory → Devices.
  2. Select the device to configure, or create a new device.
  3. Select the template from the Connection Template dropdown.
  4. Save the device configuration.

The assigned template controls all connection behaviour for that device, including configuration downloads and SNMP operations. Multiple devices can share one template for consistent behaviour across a fleet.