常见问题 NETGEAR/美国网件网络交换机的常见问题>>

配置脚本(Configuration Scripting )

发布时间:2010-09-13 13:01:53

答案:

这一部分描述配置脚本(Configuration Scripting)的特性。

概述

配置脚本:

  • 允许您生成文本格式的文件
  • 提供可以上传和下载到系统的脚本
  • 可以方便地创建命令配置脚本
  • 可以应用在好几款交换机上
  • 可以保存10份或者500K大小的脚本
  • 允许查看,删除,应用,上传,下载
  • 提供每一个命令行界面命令的脚本格式
要点
  • 存储在交换机的脚本数量由存储器大小决定。
  • 如果脚本损坏,脚本是分部分执行的。例如,脚本执行了十个命令中的五句,然后损坏了,那么脚本就会挺在第五个。
  • 脚本正在应用的时候是不可以修改或者删除的。
  • 脚本只检查语法错误,如果脚本检查不通过则不会运行。
命令行界面示例

以下是使用脚本配置这项特性的命令参考

示例#1: script

(Netgear Switch) #script ?
apply                    Applies configuration script to the switch.
delete                  Deletes a configuration script file from the switch.
list                         Lists all configuration script files present on the switch.
show                    Displays the contents of configuration script.
validate               Validate the commands of configuration script.

示例#2: script list and script delete

(Netgear Switch) #script list
Configuration Script Name                    Size(Bytes)
----------------                                            -------------------
basic.scr                                                            93
running-config.scr                                         3201

2 configuration script(s) found.
1020706 bytes free.
(Netgear Switch) #script delete basic.scr
Are you sure you want to delete the configuration script(s)? (y/n) y
1 configuration script(s) deleted.

示例#3: script apply running-config.scr

(Netgear Switch) #script apply running-config.scr
Are you sure you want to apply the configuration script? (y/n) y
The systems has unsaved changes.
Would you like to save them now? (y/n) y
Configuration Saved!

示例#4: Creating a Configuration Script

(Netgear Switch) #show running-config running-config.scr
Config script created successfully.
(Netgear Switch) #script list
Configuration Script Name                    Size(Bytes)
--------------------------                                   ------------
running-config.scr                                    32011
 
configuration script(s) found.
1020799 bytes free.

示例#5: Upload a Configuration Script

(Netgear Switch) #copy nvram: script running-config.scr
tftp://192.168.77.52/running-config.scr
Mode......................... TFTP
Set TFTP Server IP...........192.168.77.52
TFTP Path...................../
TFTP Filename................running-config.scr
Data Type....................Config Script
Source Filename..............running-config.scr
Are you sure you want to start? (y/n) y
File transfer operation completed successfully.

我有NETGEAR FS728T的问题要问

本FAQ适用范围

下一步您可以:
查看NETGEAR/美国网件网络交换机产品 >>
查看网络交换机产品 >>
查看NETGEAR/美国网件网络交换机常见问题 >>