Şube networklerinizi denetlemek için ip subnetlerinizi tek tek pinglemek bazen pek kolay olmayabiliyor.Aşağıdaki scripti kullanarak toplu olarak ping gönderimi yapabiliriz.Başarılı olanlar “!!!!!” başarısız olanlar “…..” şeklinde karşımıza gelecek ve hangilerinin çalıştığını anlayabiliriz.IP adreslerini kendinize networklerinize göre düzenleyebilirsiniz.FQDN bazlı sorgulama yapacaksanız name-server ve domain-lookup ayarlamalarını yapmış olmanız gerekmektedir.
tclsh
foreach address {
192.168.2.1
4.2.2.1
4.2.2.2
8.8.8.8
208.67.222.222
208.67.220.220
195.175.39.39
195.175.39.40
google.com
korayonder.com
} {
ping $address }
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.2.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 100/373/588 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 160/180/196 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/132/216 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 208.67.222.222, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/139/348 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 208.67.220.220, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/79/96 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 195.175.39.39, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 195.175.39.40, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/11/20 ms
Translating “google.com”…domain server (255.255.255.255)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 74.125.232.208, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/59/84 ms
Translating “korayonder.com”…domain server (255.255.255.255)
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 174.34.167.66, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 164/165/172 ms
MERKEZ_BACKBONE(tcl)#tclquit
MERKEZ_BACKBONE#
işlem bittikten sonra enable moda dönmek istiyorsak “tclquit” komutunu kullanabiliriz.