cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1387
Views
0
Helpful
8
Replies

Command prompt to deploy one command in a script

kevinmelka1
Level 1
Level 1

Hello everybody :D,

 

I want to deploy a script to deactivate "HTTP" for 30 switches with the following command : "no ip http server".

 

As i have 30 switches, i don't want to make this command one switch by one.

 

To do it, i want to deploy this command in a script thanks to Nedi (a open-source tool to manage network equipments)

 

The problem is i don't know the command prompt of SG300 switches to make this list of commands :

 

?

conf t
no ip http server
exit
wr mem
Y

Anyone knows what is the command prompt to use ?

 

Thank you in advance :).

 

greenkev

1 Accepted Solution

Accepted Solutions

I see.  Did you try Nedi forums then?  How about this? http://forum.nedi.ch/index.php?topic=1605.0

-- please remember to rate and mark answered helpful posts --

View solution in original post

8 Replies 8

Brandon Svec
Level 7
Level 7

I would try:

configure

no ip http server

exit

copy running-configuration startup-configuration

y

 

-- please remember to rate and mark answered helpful posts --

Brandon Svec,

 

Thanks for your help but unfortunately, your command doesnt't mach :s.

Other ideas ?

Can you provide more details about where you are having trouble then?  Do you have some log showing failure/errors?

Those commands work on my SG300.  The commands you posted orginally should also work, by the way.  Did you try entering them manually on a switch to check before doing your script?

You can reference the CLI guide for exact command definitions:  http://www.cisco.com/c/dam/en/us/td/docs/switches/lan/csbms/sf30x_sg30x/administration_guide/CLI_Nikola300_1_3_7.pdf

Of course, tab and ? will reveal the correct commands too.

HTH

-- please remember to rate and mark answered helpful posts --

If i make commands directly in the switch, i don't have problems.

In this case, I use Nedi, an open source tool to manage network equipments like Nagios...

When i make commands in Nedi by a script, there are nothing in logs (you can look the picture in attachment).

 

I see.  Did you try Nedi forums then?  How about this? http://forum.nedi.ch/index.php?topic=1605.0

-- please remember to rate and mark answered helpful posts --

Thanks Brandon, i already posted the same topic in Nedi forums --> http://forum.nedi.ch/index.php?topic=1905.0

I'm waiting answers.

I have an other question about SG300 switch.

It's possible to drop the message "Overwrite file [startup-config].... (Y/N)[N] ? when we do "wr mem" :

I want that when i do a wr mem, the command yes launch automatically.

 

I could be wrong, but I don't think so.  If you are running a script it shouldn't matter though, right?  Did you manage to get your backup script working?  If not, you may consider using expect.  Here is an example I found: http://technologyordie.com/cisco-configuration-backup-script

-- please remember to rate and mark answered helpful posts --
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Switch products supported in this community
Cisco Business Product Family
  • CBS110
  • CBS220
  • CBS250
  • CBS350
Cisco Switching Product Family
  • 110
  • 200
  • 220
  • 250
  • 300
  • 350
  • 350X
  • 550X