Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/masoud-maghsoudi/python-cisco-switch-interfaces-descriptions

python script to automate adding description to access switch ports based on computer name retrieved from active directory DNS server
https://github.com/masoud-maghsoudi/python-cisco-switch-interfaces-descriptions

cisco netmiko python yaml-configuration

Last synced: 25 days ago
JSON representation

python script to automate adding description to access switch ports based on computer name retrieved from active directory DNS server

Awesome Lists containing this project

README

        

# About Script

## Aim

We want to automate the description setting on Cisco access switch user interfaces throughout the network.

## Mechanism:

This script is written in Python using [netmiko](https://github.com/ktbyers/netmiko) and [dnspython](https://github.com/rthalley/dnspython). Using specified **VLANs** for access users and the **switch** IP addresses in [configuration file](./config.yml) it filters out user interfaces and resolves the active IP address on the port via ARP cache of the corresponding **router** specified in the same configuration file and queries an IP reveres lookup from **Local DNS server** declared in configuration file. after formatting the resolved name it will be set on corresponding switch interface.

For disabled interfaces, we set _Disabled by Admin_ description.
For ports with more than active 1 MAC address, in the case that it has no description we set _Multi User_ description, otherwise we would not change the interface description, but list them all in a report file.

## License

MIT

## Author Information

| Author | Masoud Maghsoudi |
| ------ | ------------------------------------- |
| Email | |
| Github | |