Quantcast
Channel: THWACK: All Content - Network Configuration Manager
Viewing all articles
Browse latest Browse all 6057

Script for mass change of VLAN 1 subnet

$
0
0

I need to change native vlan subnet for tens of switches. Instead of doing it manually by login to every switch separately I would like to do it with NCM template. But naturally IP should be different to every switch, so how should I create a script to manage that?

 

Last part of IP remains the same, just C-class changes. For example 192.168.11.30 changes to 10.10.10.30, 192.168.11.8 changes to 10.10.10.8 and so on.

 

All switches are Cisco 2950 and 2960 models.

 

I got an idea, that maybe I (or at least someone(!), I'm not very familiar work templates...) would be able to create a script that takes the last part of address, saves it to variable, then adds it in the end of the second variable, and then writes all back to configuration. So I could change all IP's with one template without need to be afraid of typos...

 

Doesn't sound so complex in theory.

 

Also gateway need to be changed same way, but that's the same for every switch, so no need to be case sensitive script for that.


Viewing all articles
Browse latest Browse all 6057

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>