Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Networking
- >
- Legacy
- >
- Switches, Hubs, Modems
- >
- Rebooting alot of switches whit PCM
Switches, Hubs, and Modems
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-16-2010 05:16 AM
07-16-2010 05:16 AM
Hello,
Is it possible to make a vb or batch script that reboots one switch after an other from the outside of the entire network map and in? Or any other way to make it work automaticly, using PCM v2.3
I have about 70 swithes i want to reboot on different locations in my network map, preferably over night, so i need to make a schedule. Any help whit this would be much appreciated.
Regards
Peter
Is it possible to make a vb or batch script that reboots one switch after an other from the outside of the entire network map and in? Or any other way to make it work automaticly, using PCM v2.3
I have about 70 swithes i want to reboot on different locations in my network map, preferably over night, so i need to make a schedule. Any help whit this would be much appreciated.
Regards
Peter
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-16-2010 08:18 AM
07-16-2010 08:18 AM
Solution
You can do it with PCM+.
You need to create policy, which will use as trigger whatever you need: time or some event.
As targets you need to select all switches you want to reload.
As action you need to select Group CLI. And write command to reboot switch:
reload
y (to confirm reload)
It should work.
Also you may test the following idea of script. My collegue write it to help me simplify configuring of VLAN on 12 switches.
You can change script and use it to reboot switches. I use this script on Linux.
Command which is used to login to switch:
%# (sleep 5; echo ${PASSWORD}; sleep 2; echo ; perl make-many-vlans.pl; sleep 2) | socat - EXEC:"ssh ${SWITCH}",setsid,pty,ctty
* PASSWORD -- password to access the switch
* switch.host.net -- name or IP address of switch
* make-many-vlans.pl -- script name
To reload few switches, I think you will need to create some file with list of switch IPs and change a little command and use it as argument in command.
script example (make-many-vlans.pl):
#!/usr/bin/perl
#
my $i=0;
print "conf t\n";
for (my $i=25; $i<30; $i++) {
print < vlan $i
tagged $i
exit
EOF
}
print "exit\nexit\nexit\ny\n";
For you it should look simpler:
#!/usr/bin/perl
#
print "reload\ny\n\n";
You need to create policy, which will use as trigger whatever you need: time or some event.
As targets you need to select all switches you want to reload.
As action you need to select Group CLI. And write command to reboot switch:
reload
y (to confirm reload)
It should work.
Also you may test the following idea of script. My collegue write it to help me simplify configuring of VLAN on 12 switches.
You can change script and use it to reboot switches. I use this script on Linux.
Command which is used to login to switch:
%# (sleep 5; echo ${PASSWORD}; sleep 2; echo ; perl make-many-vlans.pl; sleep 2) | socat - EXEC:"ssh ${SWITCH}",setsid,pty,ctty
* PASSWORD -- password to access the switch
* switch.host.net -- name or IP address of switch
* make-many-vlans.pl -- script name
To reload few switches, I think you will need to create some file with list of switch IPs and change a little command and use it as argument in command.
script example (make-many-vlans.pl):
#!/usr/bin/perl
#
my $i=0;
print "conf t\n";
for (my $i=25; $i<30; $i++) {
print <
tagged $i
exit
EOF
}
print "exit\nexit\nexit\ny\n";
For you it should look simpler:
#!/usr/bin/perl
#
print "reload\ny\n\n";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-21-2010 01:34 AM
07-21-2010 01:34 AM
Re: Rebooting alot of switches whit PCM
Thank you very much. All switches rebooted as they should so this is solved.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP