M
M
mambr2013-11-26 13:49:24
Programming
mambr, 2013-11-26 13:49:24

How to write a script to edit a config file?

There are many (1000) managed dlink switches, it is possible to manually shovel the config of each, but there is no desire, you need to write a script that changes vlans, ip, etc. in the file - and upload the config. Tell me, is there a manual or a useful article on Habré on this issue?
Powershell? Bash? PHP?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
C
catHD, 2013-11-26
@catHD

Once upon a time, expect was used in corbin for the initial setup. The bundle is simple telnet + expect, you can attach it anywhere :)

V
Valentine, 2013-11-26
@vvpoloskin

Bash + sed to edit configs, expect or any scripting language to upload them. Itself just shoveled 700 configs for different switches.

M
mambr, 2013-11-26
@mambr

Thanks, I'm thinking about the implementation of php with a web muzzle
of the ip address field, controlled by vlan and the range of vlan subscribers , I
entered the parameters, I received the file and uploaded it to the switch. the simpler the better)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question