cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
529
Views
0
Helpful
4
Replies

Smart Install Question / Post install/Finalizing tasks...ran out of idea...stuck...

Hello community,

following problem:

I will have to roll out loads of switches, to be more precise C2960CG-8TC-L.

So far so simple, all of the switches will have similar config, despite of the hostname/IP address.

Thanks to cisco they don´t print the base mac address on the labels, so i cannot use the informations from the packed switches to deploy a specific configuration to the switches using SmartInstall matching to that mac.

I don´t want use DHCP in the management vlan at the end, the switches shall get a fixed IP address.

After SmartInstall finishes i could do successfully THIS on the switches:

term shell

ip=`sh int vlan99 | grep 10.123.123 | cut -d "." -f 4 | cut -d "/" -f 1`

function chg_cnf() {
conf t
hostname CUST-BRANCH_2960-8P_0$1
int vlan 99
ip address 10.123.123.$1 255.255.255.0

vtp mode client
vtp version 1
vtp domain <MYVTPDOMAIN>
vtp password <MYVTPKEY>

crypto key generate rsa general-keys modulus 1024

end
wr
}

chg_cnf $ip

term no shell

Everything nice, works like a charm, the last octet of the negotiated ip address on vlan 99 gets put in the hostname, and as well used as static address on vlan 99 then instead of DHCP, also the VTP thing is done, as well the SSH gets its key. Switch finalized now, tadaaa!

But...when i tried to use EEM like this, to put it in the initial config deployed via SmartInstall:

event manager applet FINALIZE
event syslog pattern "%SYS-5-RESTART:"
action 1.005 cli command "enable"
action 1.010 cli command "event manager run CFGFINAL"
!
event manager applet CFGFINAL
event none
action 2.000 cli command "enable"
action 2.005 cli command "term shell"
action 2.010 cli command "ip=`sh int vlan99 | grep 10.123.123 | cut -d "." -f 4 | cut -d "/" -f 1`"
action 2.015 cli command "function chg_cnf() {"
action 2.020 cli command "conf t"
action 2.025 cli command "hostname CUST-BRANCH_2960-8P_0$1"
action 2.030 cli command "int vlan 99"
action 2.035 cli command "ip address 10.123.123.$1 255.255.255.0"
action 2.040 cli command "exit"
action 2.045 cli command "vtp mode client"
action 2.050 cli command "vtp password <MYVTPKEY>"
action 2.055 cli command "vtp version 1"
action 2.060 cli command "vtp domain <MYVTPDOMAIN>"
action 2.065 cli command "crypto key generate rsa general-keys modulus 1024"
action 2.070 syslog msg "Finalizing finished, removing EEM-applets from config"
action 2.075 cli command "no event manager applet FINALIZE"
action 2.080 cli command "no event manager applet CFGFINAL"
action 2.085 cli command "end"
action 2.090 cli command "wr"
action 2.095 reload

...i figured out: EEM not supported on these 2960s...headshot.

I know i can use post-install.txt, but this only (as far as i know...?) adds config options to the config...so i cannot execute EXEC-commands.

Any ideas on how i can totally automate my rollout, given that IOS.sh script which works great when used via telnet/console session on the switch?

As said, customer doesn´t want DHCP for the switches, even with infinite lease time. Me too, btw.

But i´m stuck on how to proceed on this, with the non-existing EEM on the 2960s. This sucks...

4 Replies 4

BTW i know that the EEM CFGFINAL wouldn´t have worked like this...forgot to execute the function with "chg_cnf $ip" ;)

But thats not the real problem and i would have figured out when running the first time.

Just to mention...

Andreas, 

EEM scripting is not what I do so I cannot respond to this.  

hello leo,

thanks for checking. and yes, i know, but i thought u may have another approach how i could solve this...?

Ok, so Management VLAN and DHCP.  I too don't agree but if one was to deploy "X" amount of switches across, then I don't see any problems with assigning Management VLANs using DHCP.  

HOWEVER (emphasis), if that was me, once the switches are online, I would log in and manually change the Management VLAN IP address to the correct subnet.  Meaning, if I was to deploy this way, I would have two (2) Management VLANs, one is temporary (to be used for deployment only) and then a "true" VLAN for Management.