R
R
Rez_pk2017-06-06 07:52:30
linux
Rez_pk, 2017-06-06 07:52:30

Bulk Update Port Descriptions on Switches?

Good afternoon!
There are about 2500 switches in the network.
Every day, the same type of tasks come, by type, write there, write here.
Now the task has come to add a specific monitoring key to each description.
Question: how can I write a script that will help me?
PS: previously did not work with scripts.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Aleksandrov, 2017-06-06
@jamakasi666

The task is purely highly specialized, which means there will be no silver bullet.
The principle of setting each switch can be unique.
If there are many and often such tasks, then it is easier to write (or order to write) a utility, in fact there will be nothing complicated in it. The principle will be something like this:
1) List of switches with login \ pass pairs. Required commands for specific switch model/manufacturer.
2) The utility starts, connects sequentially to each switch via telnet\ssh, enters the necessary commands for a specific switch manufacturer or model.
Another option is that you can do this through SNMP, you will need the MIBs of the switches so that they support SNMP and the ability to change parameters through it. Then it’s a matter of technique and implement the functionality in some kind of zabix or a simple script that again takes a list of IP switches and snmp console utilities for specific OIDs will make changes.

A
Andrey Shubin, 2017-06-06
@idegree

I join the previous speaker. I work with 500+ switches, but I rewrite scripts for each new task, because each specific switch has a lot of features. For example, somewhere you need to enable admin to do, somewhere not. Somewhere you can specify vlanid , but somewhere you need exactly vlan name .
Python script example - https://pastebin.com/UKTmQdBz

D
Denis Michurin, 2017-06-08
@denistu10

bash + expect - to help you
In bash, start a cycle with ip forwarding them to the script on expecte
On expecte, connect to catch the switch prompt, enter their logo / pass, and then change what you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question