当前位置:文档之家› IPOP工具下TCL脚本

IPOP工具下TCL脚本

单循环,i、j想关联
for { set i 2} {$i<1000} {incr i } {#incr i
set j [expr $i + 99]
tsend "vlan $i-$j\n"
after 1000
}

双层循环ACL
for { set i 2} {$i<100} {incr i} {
for { set j 1} {$j<254} {incr j} {
tsend "no access-list 1 permit 10.1.$i.$j 0.0.0.0\n"
#等待1S
after 1000
}
}

双层循环ACL(ACL序号变化)
set index 1
for { set i 2} {$i<100} {incr i} {
for { set j 1} {$j<254} {incr j} {
tsend "no access-list $index permit 10.1.$i.$j 0.0.0.0\n"
#等待1S
after 1000
}
#一个内层循环后,index递增1
incr index
}

静态ARP配置脚本
for { set m 2} {$m <100} {incr m } {
for { set i 2} {$i<=254} {incr i } {
#j、i相关联,j=i+1000
set j [expr $i + 1000]
#n、n相关联,n=m+1111
set n [expr $m + 1111]
tsend "arp 192.168.$m.$i 2222.$n.$j \n"
after 1000
}
}

[Switch Boot]: ?

? - print this list
@ - boot (load and go)
p - print boot params
c - change boot params
b0 - change to boot string 0
b1 - change to boot string 1
bc - change boot string 0,1 to default
R - reboot
N - show Serial Number
S - download bootrom via serial and write to flash
D - download image via serial and write to flash
H - show bootrom version
V - download image via outbind
L - load image via outbind
LS - show flash file information

[Switch Boot]:

相关主题
文本预览
相关文档 最新文档