[[출처 : 4networkers.com 김학진님의 네트워크 솔루션 팁]]
명령어 : tclsh
지원IOS버전 : 12.3(2)T 에 처음으로 도입되었습니다.
오늘은 자질구래한 설명은 생략하고 바로 실전으로 들어가보져.
-------------
다음 아이피 주소로 핑을 한번 해 보겠습니다.
10.14.1.1
10.12.1.1
10.44.3.3
10.11.1.1
tcsh 모드로 들어가기위해 "tclsh"라고 privilege 모드에서 입력합니다.
R5#tclsh
R5(tcl)#foreach pl {
+>10.14.1.1
+>10.12.1.1
+>10.44.3.3
+>10.11.1.1
+>} {ping $pl}
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.14.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/18/20 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.12.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/20/20 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.44.3.3, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.11.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/20/20 ms
R5(tcl)#^Z
R5#
-------------
'pl' $p'는 대응관계인데 'pl' 다른 알파벳으로 사용해도 상관없으며, 'i' '$i' 't' '$t' 과 같이 서로간에 대응관계만 맞춰주면 됩니다.