Skip to content

patrickhodelsg/cisco-network-gathering

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cisco Network Info Gather

This script connects to Cisco switches and routers and collects infos and writes them to a CSV. Following info will be collected:

  • Device Name / IP Address
  • Interface Name
  • IP Address of the interface
  • Subnet Mask in decimal Format
  • CIDR Notation of the IP address
  • CIDR Notation of the network address
  • Interface Description
  • VRF Name the interface belongs to
  • UP/Down state of the interface

Warning: The information is mainly gathered of the running config. Interfaces with dynamically assigned (i.e. DHCP) IP addresses will not be collected.

Prerequisites

Restrictions

  • Works only with IOS based WLCs, AireOS is not supported
  • Tested only with IOS 17.3.4c and DNAC 2.2.2.5, use on your on risk

Installation

Clone the repository

$ git clone https://github.com/Ch1ll3r/cisco-network-gathering.git

Python version 3 and pip3 is required. Creating a dedicated virtual environment is recommended.

Creating a virtual environment (optional)

Install the virtualenv package:

$ python3 -m pip install virtualenv

Create and activate a new virtual environment:

$ python3 -m venv ./venv
$ source venv/bin/activate

Install dependencies

$ python3 -m pip install -r requirements.txt

How to Use

Add the IP addresses or hostnames you wish to check to the switches.txt file. Add one IP/hostname per line Afterward the script is ready for execution. To execute run following command:

$ python cisco-network-info-gather.py

The script will ask you for username and password to connect to the devices. The credentials are NOT stored.

It will write a csv with following filename: interface_config_info.csv

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%