cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1158
Views
0
Helpful
9
Replies

MDS scriptig

Does anyone know about scripting possibilities for the MDS series.

I know the FM Server Database Schema document, but want to script directly the switch.

Many thanks in advance for any idea.

Kind regards,

Chris

9 Replies 9

user_4444
Level 1
Level 1

I have done some basic stuff, see attached. I opened CLI via Putty and just copied and pasted what I wanted to do.

I have removed our IP Addresses from the first section.

Hopefully that helps.

"conf

no ip access-list bogus permit udp 0.0.0.0 any eq port snmp

no ip access-list bogus permit tcp 0.0.0.255 any eq port ssh

no ip access-list bogus permit icmp 0.0.0.255 any icmp-type echo

no ip access-list bogus permit icmp 255.255.255.255 any icmp-type echo

no ip access-list bogus permit icmp 0.0.0.255 any icmp-type echo

no ip access-list bogus permit icmp 0.0.0.255 any icmp-type echo

no ip access-list bogus permit tcp 0.0.0.0 any eq port ssh

no ip access-list bogus permit tcp 0.0.0.0 any eq port ssh

no ip access-list bogus permit udp 0.0.0.0 any eq port snmp

no ip access-list bogus permit udp 0.0.0.0 any eq port snmp

no ip access-list bogus permit udp 0.0.0.0 any eq port snmp

no ip access-list bogus permit tcp any any eq port www

no ip access-list bogus permit udp any 0.0.0.0 eq port 69

ip access-list bogus permit tcp 0.0.0.0 any

ip access-list bogus permit udp 0.0.0.0 any

ip access-list bogus permit icmp 0.0.0.0 any

ip access-list bogus permit tcp 0.0.0.0 any

ip access-list bogus permit udp 0.0.0.0 any

ip access-list bogus permit icmp 0.0.0.0 any

ip access-list bogus permit tcp 0.0.0.0 any

ip access-list bogus permit udp 0.0.0.0 any

ip access-list bogus permit icmp 0.0.0.0 any

ip access-list bogus permit tcp 0.0.0.0 any

ip access-list bogus permit udp 0.0.0.0 any

ip access-list bogus permit icmp 0.0.0.0 any

ip access-list bogus permit tcp 0.0.0.0 any

ip access-list bogus permit udp 0.0.0.0 any

ip access-list bogus permit icmp 0.0.0.0 any

ip access-list bogus permit tcp 0.0.0.0 any

ip access-list bogus permit udp 0.0.0.0 any

ip access-list bogus permit icmp 0.0.0.0 any

int mgmt0

ip access-group bogus in

end

copy run start"

Hi,

Tanks for the idea. I will try to use it as foundation for my scriptings.

Kind regards,

Chris

inch
Level 3
Level 3

Hi Christoph,

You can script directly to the switch via ssh keys and/or using snmp :-)

Cheers

Andrew

Hi Andrew,

thanks for the hint. I just played with plink and looking for more snmp details in combination with the MDS.

Kind regards,

Chris

KevinBeaulieu
Level 1
Level 1

Please keep in mind that Cisco doesn't officially support scripting to the switch and there are known problems in using it. Scripts that run fine at one version can also break as I've experience at new SAN-OS versions. Please keep this in mind when you use scripting.

G'day,

Cisco DO support the command line and if scripting means running commands via the command line and/or via snmp of course they support it.

What they wont support is your actual scripts (obviously).

If you have any issues with running the commands either via command line or snmp (ie: the commands dont do what they should log a case with cisco as things should work as documented).

If in doubt, get in contact with your local SE....

Cheers

Andrew

marsnow
Level 1
Level 1

You can create scripts on the switch using the scheduler command.

You create a schedule job and enter the commands you want to run, then choose how often to run it. You can also output it to a file on bootflash: and ftp off to a server as part of the scheduled job.

This tells you how to use the scheduler.

http://cco/en/US/docs/storage/san_switches/mds9000/sw/rel_3_x/configuration/guides/cli_3_4_x/maint.html

...or you give expect a try. I'm using it since my early Cisco days

Andre

We are using MDS Cisco Fabric switch.I would like to know more about scirpting documentation for switch.

everytime we need to add the port descrition manually via DM.Could u please someone suggest how that can be managed by script.We have mulpiple server description need to add in DM.How that can be do it via script:

For Example:

Suppose i would like to add port description to Port fc12/21 on switch following is syntax how that i can run on for mulpiple servers:

config

interface fc12/21

switchport description XYZ (SP1)

no shutdown

end

show interface fc12/21

Please suggest.

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: