Skip to content

wiresandwifi/ciscoConfigureGlobalCommands

Repository files navigation

waw-banner

Cisco Send Commands

Python script to send commands to any number of Cisco devices.
Uses a CSV file to import which devices to configure and a simple text file with commands to run.

Useful for deploying configuration or running show commands to gather information.

Requirements

  • Python 3.12.6 (but probably works on earlier releases too).
  • See requirements.txt for required modules.

Features

  • Supports switches running both IOS-XE and IOS software.
  • Supports both SSH and Telnet connections.
  • Supports both IP and DNS names to connect to network device.
  • Includes prompt coloring to make script easier to read.
  • Saves the results into a log textfile.

How To Use

  • Install Python.
  • Install modules found in requirements.txt.
    • Use "pip install -r requirements.txt" to install all modules automatically.
  • Configure CSV file with port/service and IP address/hostname of network devices.
  • Configure text file commands_to_send.txt with commands to send to network devices.
  • Run send_commands.py to start the script.
  • Enter username, password (and optionally enable password, see comments in configure_accessport.py).
  • Confirm you want to push commands to X devices.
  • Commands are executed on network devices one by one and logged to textfile.
  • At the end of script, user is informed of failed connections (if any).

Support

  • No support is given for this script.
  • Always test the script in a test environment before trying it in a production environment.
  • Use at your own risk.

Example

Preview of number of devices that will be configured and asks to proceed. User must type "yes" to confirm script start.

sendcommands

Configuration is automatically saved on the network device after commands are executed.

config_saved

Built-in error handling for unreachable devices, wrong credentials, and more.

preview3

Credits

Inspired by/built upon andreirapuru/netmiko_send_commands

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages