Skip to content

Network Configuration Snippets Management - rConfig V8

Configuration Snippets: Implementation Guide

Section titled “Configuration Snippets: Implementation Guide”

This guide covers everything needed to create, test, and deploy configuration snippets in rConfig V8 Pro, from basic static snippets to advanced parameterized configurations with special instructions.


  • rConfig V8 Pro installation
  • Devices configured and backing up successfully
  • Appropriate permissions (admin role or snippet creation/deployment permissions)
  • Understanding of device command syntax for your network equipment

Navigate to Config Tools → Snippets

Click Add Snippet to open the snippet creation form. Play the video below for a walkthrough of adding and editing snippets.

Name (required)

  • Descriptive name for the snippet
  • Good: “Add Standard SNMP Configuration”
  • Bad: “Snippet1”

Description (optional but recommended)

  • Explain what the snippet does
  • Note any prerequisites or warnings
  • Example: “Configures standard SNMP community, location, and contact. Requires write access.”

Snippet Content (required)

  • Free-text field for configuration commands
  • Write commands exactly as you would type them in a device console session
  • Include mode changes (conf t for Cisco config mode)
  • Include save commands (wr mem, copy run start)

RBAC (Role-Based Access Control)

  • Assign which roles can view and deploy this snippet
  • Admin role has access to all snippets (hardcoded)
  • Use RBAC to restrict sensitive snippets to authorized users

Cisco IOS example:

conf t
vlan 100
name Engineering
exit
wr mem
exit

Structure breakdown:

  1. conf t - Enter configuration mode
  2. Configuration commands (VLAN creation and naming)
  3. exit - Exit VLAN config sub-mode
  4. wr mem - Save configuration
  5. exit - Exit config mode

Common mistakes:

  • Forgetting to enter config mode
  • Forgetting to save configuration
  • Not exiting config mode cleanly

Complete snippet (removes and adds NTP server):

conf t
no ntp server 192.168.1.10
ntp server 10.0.0.5
exit
wr mem
exit

Different vendors require different command syntax. Create separate snippets per vendor or use parameterized snippets with vendor selection.

Cisco:

conf t
snmp-server community rConfig123 RO
exit
wr mem

Juniper:

configure
set snmp community rConfig123 authorization read-only
commit
exit

Aruba:

configure terminal
snmp-server community rConfig123
exit
write memory

For complex changes, break into logical steps:

conf t
! Remove old ACL
no ip access-list extended OLD_ACL
! Create new ACL
ip access-list extended NEW_ACL
permit ip 10.0.0.0 0.255.255.255 any
deny ip any any log
! Apply to interface
interface GigabitEthernet0/1
ip access-group NEW_ACL in
exit
wr mem
exit

Parameterized snippets use variables that are filled in at deployment time, making snippets reusable across different scenarios.

Variables use curly brace notation: {variable_name}

Example:

interface {interface_name}
description {description_text}
no shutdown
exit
wr mem

You can use the same variable multiple times in a snippet:

interface {interface_name}
description Default configuration for {interface_name}
ip address {ip_address} 255.255.255.0
no shutdown
exit
wr mem

When deploying, you’ll be prompted once for {interface_name} and once for {ip_address}. The {interface_name} value is used in both the interface selection and the description.

rConfig V8 parameterized configuration snippet editor with variable placeholders for dynamic deployment

Parameterized snippet showing variable placeholders

At deployment time:

  1. rConfig detects variables in snippet
  2. User prompted to enter value for each unique variable
  3. Values are substituted into snippet before execution
  4. Snippet with substituted values is deployed to devices

User interface:

  • Modal dialog shows all variables
  • Text input for each variable
  • Preview of snippet with values substituted (optional)
  • Deploy button enabled after all variables filled
rConfig V8 parameter input dialog for snippet variable values during network configuration deployment

Parameter input dialog prompting for variable values

VLAN creation:

conf t
vlan {vlan_id}
name {vlan_name}
exit
wr mem

User account creation:

conf t
username {username} privilege {privilege_level} password {password}
exit
wr mem

Interface configuration:

interface {interface_name}
description {description}
ip address {ip_address} {subnet_mask}
no shutdown
exit
wr mem

ACL with custom network:

conf t
ip access-list extended {acl_name}
permit ip {source_network} {source_wildcard} any
deny ip any any log
exit
wr mem

Snippet instructions modify snippet execution behavior using special directives in the format #[instruction_name instruction_value].

Purpose: Pause snippet execution for specified seconds.

Use case: Device needs time to process commands (reloading configuration, restarting services, hardware operations).

Syntax: #[sleep seconds]

Example (reboot device and wait):

conf t
reload in 1
#[sleep 90]
! Device should be back online now
show version

Example (multiple sleeps):

conf t
interface GigabitEthernet0/1
shutdown
#[sleep 5]
no shutdown
#[sleep 5]
exit
wr mem
rConfig V8 configuration snippet editor showing sleep instruction for deployment timing control

Snippet using sleep instruction to pause execution

Purpose: Override device prompt detection when in configuration mode.

Problem: Some devices change their prompt when entering config mode (e.g., router# becomes router(config)#). If rConfig doesn’t recognize the new prompt, commands fail because rConfig thinks the device isn’t ready.

Solution: Explicitly tell rConfig what prompt to expect in config mode.

Syntax: #[config_prompt new_prompt_pattern]

Example (Cisco config mode):

conf t
#[config_prompt (config)#]
vlan 100
name Engineering
exit
wr mem
exit

Regex support: Config prompts support regex patterns for flexibility:

#[config_prompt .*\(config\)#]

This matches any device name followed by (config)#.

Auto-escaped characters: These characters are automatically escaped in prompt patterns:

  • ( and ) (parentheses)
  • ' and " (quotes)

Wildcards allowed: Use regex wildcards like .* for flexible matching:

#[config_prompt .*config.*]

Matches prompts containing “config” anywhere.

You can use multiple instructions in a single snippet:

conf t
#[config_prompt (config)#]
interface GigabitEthernet0/1
shutdown
#[sleep 5]
no shutdown
#[sleep 5]
exit
wr mem
exit

Execution order: Instructions are processed in the order they appear in the snippet.


Use case: Test snippet on single device, or apply unique change to specific device.

Steps:

  1. Navigate to Devices → [Device Name]
  2. Click Deploy Snippet button
  3. Select snippet from dropdown
  4. Fill in parameters (if parameterized snippet)
  5. Click Deploy
  6. Monitor in Horizon Queue Manager

Method 2: Deploy to Multiple Devices (Bulk)

Section titled “Method 2: Deploy to Multiple Devices (Bulk)”

Use case: Apply configuration change across many devices simultaneously.

Steps:

  1. Navigate to Config Tools → Snippets
  2. Click Deploy next to desired snippet
  3. Select devices using one of three methods:
    • Individual devices: Check boxes next to specific devices
    • By category: Select device category (e.g., “Core Routers”)
    • By tag: Select devices with specific tag (e.g., “Production”)
  4. Fill in parameters (if parameterized snippet)
  5. Review selection count
  6. Click Deploy to All Selected
  7. Monitor in Horizon Queue Manager

Use case: Automate snippet deployment on a schedule (e.g., weekly VLAN cleanup, monthly security updates).

Steps:

  1. Navigate to Tasks → Create Task
  2. Select task type:
    • Send Snippets - Devices
    • Send Snippets - Categories
    • Send Snippets - Tags
  3. Configure schedule (daily, weekly, monthly)
  4. Select snippet
  5. Select target devices/categories/tags
  6. Save task

Result: Snippet deploys automatically on schedule without manual intervention.

Learn more about scheduled tasks →

Use case: Script-based deployment, automation, or debugging.

Command:

Terminal window
php artisan rconfig:send-snippet {snippet_id} {device_id}

Example:

Terminal window
# Deploy snippet ID 5 to device ID 1001
php artisan rconfig:send-snippet 5 1001
# Deploy snippet ID 5 to multiple devices
php artisan rconfig:send-snippet 5 1001 1002 1003

Note: CLI deployment bypasses queue and runs synchronously—useful for debugging but not recommended for large-scale deployments.

Learn more about CLI commands →

Use case: External system integration, programmatic deployment, webhook-triggered changes.

Endpoint: POST /api/v1/snippet/deploy

Parameters:

  • snippet_id: Snippet to deploy
  • device_ids: Array of device IDs
  • parameters: Object with variable values (if parameterized)

Example (curl):

Terminal window
curl -X POST \
"https://rconfig.example.com/api/v1/snippet/deploy" \
-H "apitoken: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"snippet_id": 5,
"device_ids": [1001, 1002, 1003],
"parameters": {
"vlan_id": "100",
"vlan_name": "Engineering"
}
}'

[See in-app API documentation for complete reference]


All snippet deployments (except CLI debug mode) queue through Horizon.

Access: Navigate to Queue → Horizon Dashboard

Monitor:

  • Pending jobs: Snippets queued, waiting for workers
  • Processing jobs: Snippets currently deploying
  • Completed jobs: Successful deployments
  • Failed jobs: Deployment errors requiring attention

Click any job to view:

  • Device name
  • Snippet name
  • Start time
  • Duration
  • Output captured from device
  • Error messages (if failed)

Detailed snippet deployment history and output.

Access: Navigate to Settings → Logs → Activity Logs

Filter by:

  • Device name
  • Snippet name
  • Date range
  • Success/failure status

Log contents:

  • Full device output
  • Commands sent
  • Prompt detection
  • Timing information
  • Error details

If snippet deployment fails, use CLI debug mode for real-time visibility:

Terminal window
php artisan rconfig:send-snippet {snippet_id} {device_id}

What this shows:

  • Each command being sent
  • Device responses in real-time
  • Prompt detection
  • Timeouts and errors
  • Connection establishment details

Bypasses queue: Executes immediately, shows full output to terminal.

Example output:

Connecting to device 10.0.0.1...
Connected successfully
Sending command: conf t
Waiting for prompt: (config)#
Received prompt
Sending command: vlan 100
Waiting for prompt: (config-vlan)#
Received prompt
Sending command: name Engineering
...
Deployment successful

Symptom: Snippet job shows “Timeout” error in Horizon.

Causes:

  1. Sleep instruction longer than connection timeout
  2. Device slow to respond
  3. Commands require user confirmation (not provided)

Solutions:

  • Increase device connection timeout in device settings
  • Reduce sleep duration in snippet
  • Add expected prompts/confirmations to snippet

Symptom: Some commands execute, others don’t. Device in inconsistent state.

Causes:

  1. Prompt detection fails mid-snippet
  2. Syntax error in later commands
  3. Device rejects command (ACL error, insufficient privileges)

Solutions:

  • Use #[config_prompt] instruction to fix prompt detection
  • Test snippet on lab device first
  • Review device output in activity logs for error messages

Symptom: Snippet with variables doesn’t execute.

Causes:

  1. Variable not filled in (empty value)
  2. Variable contains special characters breaking command syntax
  3. Variable substitution failed
  4. Must ONLY be run from Device Page in the UI

Solutions:

  • Verify all variables have values
  • Escape special characters in variable values
  • Test with simple values first

Commands Execute But Configuration Not Saved

Section titled “Commands Execute But Configuration Not Saved”

Symptom: Snippet completes successfully but changes disappear after reload.

Cause: Snippet doesn’t include save command.

Solution: Always end snippets with:

  • Cisco: wr mem or copy run start
  • Juniper: commit
  • Aruba: write memory

Symptom: Same snippet succeeds on test device, fails on production devices.

Causes:

  1. Software version differences
  2. Different device prompts
  3. Different privilege levels
  4. Different connection templates

Solutions:

  • Verify software versions match
  • Use #[config_prompt] for flexible prompt matching
  • Check user privileges on production devices
  • Review connection template settings

Never deploy untested snippets to production.

  1. Lab testing: Test on lab device first
  2. Single device: Deploy to one non-critical production device
  3. Small group: Deploy to 5-10 devices
  4. Review results: Check Horizon logs and activity logs
  5. Full deployment: Roll out to all target devices

Naming convention:

  • Include action: “Add”, “Remove”, “Update”, “Configure”
  • Include target: “SNMP”, “VLAN”, “NTP”, “ACL”
  • Include scope: “Standard”, “Branch”, “Core”
  • Example: “Add Standard SNMP Configuration”

Use tags:

  • Vendor: cisco, juniper, aruba
  • Function: security, logging, snmp, ntp
  • Environment: production, lab, staging

Create rollback snippets: For every major change snippet, create corresponding rollback snippet.

Example pair:

  • Snippet: “Add VLAN 100”
  • Rollback: “Remove VLAN 100”

Document each snippet:

  • Purpose: What does it do?
  • Prerequisites: What must be true before running?
  • Impact: What changes on the device?
  • Rollback: How to undo if needed?
  • Testing: When was it last tested?

Example description:

Purpose: Configures standard corporate SNMP settings
Prerequisites: Device must support SNMPv2c
Impact: Sets community string, location, contact, and trap destination
Rollback: Use "Remove Standard SNMP" snippet
Tested: 2025-10-01 on IOS 15.7, working

Sensitive data:

  • Avoid hardcoding passwords in snippets
  • Use parameterized variables for credentials
  • Consider integration with secret management tools

RBAC enforcement:

  • Restrict sensitive snippets to authorized roles
  • Audit snippet creation and modification
  • Monitor deployment logs for unauthorized usage

Change control:

  • Treat snippet deployment as a change
  • Document deployments in change management system
  • Schedule major deployments for maintenance windows

Concurrent deployments:

  • Default: 10-50 simultaneous deployments (depends on configuration)
  • Monitor queue depth in Horizon
  • Stagger large deployments if queue backs up

Connection timeouts:

  • Set reasonable timeouts (60-120 seconds typical)
  • Increase for snippets with sleep instructions
  • Decrease for fast, simple snippets

Snippet size:

  • Keep snippets focused and concise
  • Break large multi-step procedures into multiple snippets
  • Long snippets increase timeout risk

Snippets don’t support native if/then logic, but you can work around this:

Approach 1: Create multiple snippets for different conditions

  • Snippet: “Add VLAN 100 - Cisco”
  • Snippet: “Add VLAN 100 - Juniper”
  • Deploy appropriate snippet based on device vendor

Approach 2: Use parameterized snippets with different values

  • Snippet with {command_syntax} variable
  • For Cisco: Enter switchport mode access
  • For Juniper: Enter set interface mode access

Approach 3: Use device-specific command templates

  • Configure different command templates per vendor
  • Snippet executes using appropriate template

Strategy 1: Separate snippets per vendor

# Snippet: "Add SNMP - Cisco"
conf t
snmp-server community rConfig123 RO
exit
wr mem
# Snippet: "Add SNMP - Juniper"
configure
set snmp community rConfig123 authorization read-only
commit

Strategy 2: Parameterized vendor selection

{vendor_command_prefix}
{vendor_snmp_syntax} rConfig123 {vendor_access_level}
{vendor_commit_command}

Variables filled based on vendor.

Snippets don’t have native error handling, but you can design defensively:

Remove-then-add pattern:

conf t
! Try to remove first (fails silently if doesn't exist)
no vlan 100
! Now add (works whether vlan existed or not)
vlan 100
name Engineering
exit
wr mem

Validation snippet: Create separate snippet to verify changes:

show vlan id 100
show running-config | include vlan 100

Deploy after main snippet to validate success.

Best practice: Backup before and after snippet deployment.

Manual approach:

  1. Backup device (manual or API trigger)
  2. Deploy snippet
  3. Backup device again
  4. Use Manual Config Compare to verify changes

Automated approach:

  • Create scheduled task that backs up devices
  • Create second scheduled task that deploys snippet (runs 5 minutes later)
  • Create third scheduled task that backs up again (runs 5 minutes after snippet)

Result: Automatic before/after snapshots for every snippet deployment.


Snippet name: “Add Standard NTP Servers”

Description: Configures primary and secondary NTP servers per corporate policy.

Content:

conf t
ntp server 10.1.1.50 prefer
ntp server 10.1.1.51
exit
wr mem
exit

Rollback snippet: “Remove Standard NTP Servers”

conf t
no ntp server 10.1.1.50
no ntp server 10.1.1.51
exit
wr mem
exit

Example 2: Update Syslog Server (Parameterized)

Section titled “Example 2: Update Syslog Server (Parameterized)”

Snippet name: “Update Syslog Server”

Description: Removes old syslog server and adds new one. Use for syslog server migrations.

Content:

conf t
no logging host {old_syslog_ip}
logging host {new_syslog_ip}
exit
wr mem
exit

Parameters:

  • {old_syslog_ip}: IP address of old syslog server
  • {new_syslog_ip}: IP address of new syslog server

Example 3: Create VLAN with Extended Configuration

Section titled “Example 3: Create VLAN with Extended Configuration”

Snippet name: “Create VLAN - Full Config”

Description: Creates VLAN with name and assigns to interface. Parameterized for flexibility.

Content:

conf t
vlan {vlan_id}
name {vlan_name}
exit
interface {interface_name}
switchport mode access
switchport access vlan {vlan_id}
no shutdown
exit
wr mem
exit

Parameters:

  • {vlan_id}: VLAN number (e.g., 100)
  • {vlan_name}: VLAN name (e.g., “Engineering”)
  • {interface_name}: Interface to assign (e.g., “GigabitEthernet0/10”)

Example 4: Emergency Access-List Deployment

Section titled “Example 4: Emergency Access-List Deployment”

Snippet name: “Block Malicious IP - Emergency”

Description: Quickly block specific IP address across all devices. For security incidents.

Content:

conf t
ip access-list extended BLOCK_MALICIOUS
deny ip host {malicious_ip} any log
permit ip any any
exit
interface {external_interface}
ip access-group BLOCK_MALICIOUS in
exit
wr mem
exit

Parameters:

  • {malicious_ip}: IP address to block
  • {external_interface}: Interface facing threat (e.g., “GigabitEthernet0/0”)

Snippet name: “Reload Device - Scheduled”

Description: Schedules device reload in 1 minute and waits for device to return online.

Content:

#[sleep 5]
reload in 1
yes
#[sleep 90]
! Device should be online now
show version

Warning: Requires connection timeout > 95 seconds. Use with caution.

Snippet name: “Apply Security Baseline - Cisco”

Description: Implements multiple security settings per baseline policy.

Content:

conf t
! Disable unnecessary services
no ip http server
no ip http secure-server
no cdp run
no lldp run
! Configure login security
service password-encryption
login block-for 120 attempts 3 within 60
! Set timeout
line vty 0 4
exec-timeout 5 0
logging synchronous
exit
! Enable logging
logging buffered 16384
logging console critical
! Save config
exit
wr mem
exit

When snippet fails, check:

Good output:

Connecting to device 10.0.0.1...
Connected successfully
Sending command: conf t
Waiting for prompt: (config)#
Received prompt: (config)#
Sending command: vlan 100
Waiting for prompt: (config-vlan)#
Received prompt: (config-vlan)#
...
Deployment successful

Bad output (timeout):

Connecting to device 10.0.0.1...
Connected successfully
Sending command: conf t
Waiting for prompt: (config)#
Timeout waiting for prompt
Connection closed
Deployment failed

Solution: Add #[config_prompt] instruction or increase timeout.

Bad output (command rejected):

Sending command: vlan 5000
Received: % Invalid input detected at '^' marker.
Command failed

Solution: Fix command syntax or verify device supports command.



InstructionSyntaxPurposeExample
Sleep#[sleep seconds]Pause execution#[sleep 30]
Config Prompt#[config_prompt pattern]Override prompt#[config_prompt (config)#]
  • Format: {variable_name}
  • Case-sensitive
  • Alphanumeric and underscore only
  • Reusable within snippet
  • Example: {vlan_id}, {interface_name}, {ip_address}
MethodUse CaseSpeedScale
Individual DeviceTesting, one-off changesImmediate1 device
Bulk SelectionAd-hoc multi-deviceFast1-100s devices
Scheduled TaskAutomated recurringScheduledAny scale
CLIDebugging, scriptingImmediateAny scale
APIExternal integrationFastAny scale
Terminal window
wr mem # Short form
write memory # Long form
copy run start # Alternative
Terminal window
exit # Exit one level
end # Exit to privileged EXEC
Terminal window
# Cisco
conf t
configure terminal
# Juniper
configure
edit
# Aruba
configure terminal