2013/11/13

Simple Tcl Script Ping Test

我們可以在notepad寫下這段

foreach abc {
150.1.1.1
150.1.2.2
150.1.3.3
150.1.4.4
150.1.5.5
150.1.6.6
150.1.7.7
150.1.8.8
150.1.9.9
150.1.10.10 } { ping $abc source loopback0 }

然後於 # 進入tclsh 後,貼上這一段。(進入用tclsh,離開用tclquit)


Rack1SW4# tclsh
Rack1SW4(tcl)# foreach abc {
+>150.1.1.1
+>150.1.2.2
+>150.1.3.3
+>150.1.4.4
+>150.1.5.5
+>150.1.6.6
+>150.1.7.7
+>150.1.8.8
+>150.1.9.9
+>150.1.10.10 } { ping $abc source loopback0 }


Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/13/25 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.2.2, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/13/25 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.3.3, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/15/25 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.4.4, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 17/25/34 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.5.5, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/15/25 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.6.6, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 17/21/33 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.7.7, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 17/21/25 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.8.8, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/5/9 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.9.9, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/20/26 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.10.10, timeout is 2 seconds:
Packet sent with a source address of 150.1.10.10
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

Rack1SW4(tcl)#
Rack1SW4(tcl)# tclquit
Rack1SW4#

沒有留言:

張貼留言