cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2179
Views
0
Helpful
2
Replies

Switch Variables

sidbartle
Level 1
Level 1

Hi all,

Can anyone tell me the list of variables created by a MDS9000 switch by default?

So far I have found:

$(SWITCHNAME)

$(TIMESTAMP)

What else is there?

Sid

2 Replies 2

sidbartle
Level 1
Level 1

Why you ask?

Nice for scripting across multiple switches eg.

In my schedule jobs

copy startup-config tftp://xxx.xxx.xxx.xxx/$(TIMESTAMP).start.$(SWITCHNAME)_cfg.txt

I use it to backup my configs.

Sid

Those are the 2 default variables. You can add your own with the command 'cli var name "text" ' where the is what you call the variable, and "text" is what you want the variable to represent.

Once set, you can issue the command 'show cli variables' to see the names and values currently in place.

Hope this helps,

Mike

Review Cisco Networking for a $25 gift card