init III
This commit is contained in:
24
Perl procurve konfigurieren/procurve_config.pl
Normal file
24
Perl procurve konfigurieren/procurve_config.pl
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
($ss,$mm,$hh,$dd,$mon,$yy,$we,$doy,$st)=localtime;
|
||||
$mon=$mon+1;
|
||||
if ($mon<10) { $mon="0" . $mon; }
|
||||
if ($dd <10) { $dd="0" . $dd; }
|
||||
if ($hh <10) { $hh="0" . $hh; }
|
||||
if ($mm <10) { $mm="0" . $mm; }
|
||||
if ($ss <10) { $ss="0" . $ss; }
|
||||
|
||||
$yy=$yy+1900;
|
||||
$date=$yy . "-" . $mon . "-" . $dd;
|
||||
|
||||
open CONF,"</home/monitoring/procurve_switches.conf";
|
||||
#print "\n";
|
||||
|
||||
while (<CONF>) {
|
||||
chomp;
|
||||
|
||||
print "Konfiguriere Switch $_\n";
|
||||
`./procurve_config.sh admin LTBBffD45 $_`;
|
||||
|
||||
}
|
||||
close CONF;
|
||||
32
Perl procurve konfigurieren/procurve_config.sh
Normal file
32
Perl procurve konfigurieren/procurve_config.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set USER [lindex $argv 0]
|
||||
set PASSWD [lindex $argv 1]
|
||||
set SSHHOST [lindex $argv 2]
|
||||
|
||||
spawn ssh $SSHHOST -l $USER
|
||||
expect "password"
|
||||
send "$PASSWD\r"
|
||||
expect "continue"
|
||||
send "\r"
|
||||
expect "#"
|
||||
send "conf\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 130.35.0.77 255.255.255.255 access manager\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 130.35.0.84 255.255.255.255 access manager\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 130.35.0.92 255.255.255.255 access manager\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 130.35.0.205 255.255.255.255 access manager\r"
|
||||
expect "#"
|
||||
send "ip authorized-managers 10.10.12.32 255.255.255.240 access manager\r"
|
||||
expect "#"
|
||||
send "wr mem"
|
||||
expect "#"
|
||||
send "logout\r"
|
||||
expect "log out"
|
||||
send "y\r"
|
||||
expect eof
|
||||
exit
|
||||
|
||||
22
Perl procurve konfigurieren/procurve_switches.conf
Normal file
22
Perl procurve konfigurieren/procurve_switches.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
10.10.11.4
|
||||
10.10.11.11
|
||||
10.10.11.12
|
||||
10.10.11.14
|
||||
10.10.11.19
|
||||
10.10.11.22
|
||||
10.10.11.24
|
||||
10.10.11.26
|
||||
10.10.11.28
|
||||
10.10.11.29
|
||||
10.10.11.30
|
||||
10.10.11.31
|
||||
10.10.11.32
|
||||
10.10.11.39
|
||||
10.10.11.41
|
||||
10.10.11.42
|
||||
10.10.11.43
|
||||
10.10.11.44
|
||||
10.10.11.45
|
||||
10.10.11.46
|
||||
170.60.2.11
|
||||
170.60.2.12
|
||||
118
Perl procurve konfigurieren/procurve_switches.conf.backup
Normal file
118
Perl procurve konfigurieren/procurve_switches.conf.backup
Normal file
@@ -0,0 +1,118 @@
|
||||
10.10.10.1
|
||||
10.10.10.253
|
||||
10.10.11.1
|
||||
10.10.11.4
|
||||
10.10.11.5
|
||||
10.10.11.6
|
||||
10.10.11.7
|
||||
10.10.11.8
|
||||
10.10.11.11
|
||||
10.10.11.12
|
||||
10.10.11.14
|
||||
10.10.11.22
|
||||
10.10.11.24
|
||||
10.10.11.26
|
||||
10.10.11.28
|
||||
10.10.11.29
|
||||
10.10.11.30
|
||||
10.10.11.31
|
||||
10.10.11.32
|
||||
10.10.11.33
|
||||
10.10.11.34
|
||||
10.10.11.35
|
||||
10.10.11.36
|
||||
10.10.11.39
|
||||
10.10.11.40
|
||||
10.10.11.41
|
||||
10.10.11.42
|
||||
10.10.11.43
|
||||
10.10.11.44
|
||||
10.10.11.45
|
||||
10.10.11.46
|
||||
10.10.11.133
|
||||
10.10.11.134
|
||||
10.10.11.135
|
||||
10.10.11.136
|
||||
10.10.11.138
|
||||
10.10.11.141
|
||||
10.10.11.142
|
||||
10.10.11.143
|
||||
10.10.11.144
|
||||
10.10.11.145
|
||||
10.10.11.146
|
||||
10.10.11.147
|
||||
10.10.11.148
|
||||
10.10.11.150
|
||||
10.10.11.253
|
||||
10.10.20.1
|
||||
10.10.20.5
|
||||
10.10.20.103
|
||||
10.10.20.105
|
||||
10.10.20.106
|
||||
10.10.20.115
|
||||
10.10.20.117
|
||||
10.10.20.118
|
||||
10.10.20.253
|
||||
10.10.30.1
|
||||
10.10.30.253
|
||||
10.10.70.9
|
||||
10.10.70.10
|
||||
10.10.70.15
|
||||
10.10.70.16
|
||||
10.10.70.17
|
||||
10.10.70.18
|
||||
10.10.70.19
|
||||
10.10.70.20
|
||||
10.80.1.11
|
||||
10.80.1.13
|
||||
10.80.1.14
|
||||
10.80.1.15
|
||||
10.80.1.16
|
||||
10.90.1.11
|
||||
10.90.1.12
|
||||
10.90.1.13
|
||||
130.35.0.1
|
||||
130.35.0.253
|
||||
170.11.1.12
|
||||
170.11.1.13
|
||||
170.11.1.14
|
||||
170.11.1.16
|
||||
170.11.1.17
|
||||
170.11.1.23
|
||||
170.11.1.24
|
||||
170.11.1.26
|
||||
170.15.1.5
|
||||
170.16.1.9
|
||||
170.21.1.4
|
||||
170.40.1.12
|
||||
170.40.1.13
|
||||
170.40.1.14
|
||||
170.40.1.17
|
||||
170.40.1.63
|
||||
170.40.1.64
|
||||
170.43.1.10
|
||||
170.45.1.5
|
||||
170.45.1.6
|
||||
170.50.1.12
|
||||
170.50.1.13
|
||||
170.50.1.14
|
||||
170.50.1.15
|
||||
170.50.1.16
|
||||
170.50.1.17
|
||||
170.50.1.18
|
||||
170.50.1.19
|
||||
170.60.1.12
|
||||
170.60.1.17
|
||||
170.60.1.18
|
||||
170.60.1.21
|
||||
170.60.1.22
|
||||
170.60.2.11
|
||||
170.60.2.12
|
||||
170.61.3.11
|
||||
170.61.3.12
|
||||
170.61.4.11
|
||||
170.61.6.11
|
||||
170.61.6.13
|
||||
170.61.7.13
|
||||
192.168.110.102
|
||||
192.168.110.104
|
||||
Reference in New Issue
Block a user