SlideShare una empresa de Scribd logo
1 de 11
TCLSH and Macro Ping Test on
Cisco Routers and Switches
www.netprotocolxpert.in
• When you are studying for CCIE, you will have to check connectivity
every time. It’s a good idea to use ping to check if you can reach all IP
addresses of the routers and switches in your network. If you have
many devices and many IP addresses it will take too much time to
ping each IP address manually.
• You can use TCLSH (Tool Control Language) on your Cisco routers and
devices, a scripting language that is used a lot by Cisco and one of the
things it can do is ping IP addresses.
• First you should check the active IP addresses on your device using the
following command:
• Router#show ip alias
• Address Type IP Address Port
• Interface 192.168.12.1
• Interface 192.168.13.1
• Interface 192.168.1.1
• The show ip alias command will show you all active IP addresses on your
device.
• You can also use show ip interface brief | exclude unassigned to see all IP
addresses of active interfaces:
• Router#show ip interface brief | exclude unassigned
• Interface IP‐Address OK? Method Status
• Protocol
• FastEthernet0/0 192.168.12.1 YES manual up
• up
• Serial0/0.1 192.168.13.1 YES manual up
• up
• Loopback0 192.168.1.1 YES manual up
• up
• Now we can use TCLSH to automatically ping all these IP addresses, this is how it works:
• Router#tclsh
• Router(tcl)#foreach address {
• +>1.1.1.1
• +>2.2.2.2
• +>3.3.3.3
• +>150.1.4.4
• +>} { ping $address repeat 3 size 1500 }
• Type escape sequence to abort.
• Sending 3, 1500‐byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
• !!!
• Success rate is 100 percent (3/3), round‐trip min/avg/max =
4/8/12 ms
• Type escape sequence to abort.
• Sending 3, 1500‐byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
• !!!
• Success rate is 100 percent (3/3), round‐trip min/avg/max =
4/4/4 ms
• Type escape sequence to abort.
• Sending 3, 1500‐byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
• !!!
• Success rate is 100 percent (3/3), round‐trip min/avg/max = 1/1/1 ms
• Type escape sequence to abort.
• Sending 3, 1500‐byte ICMP Echos to 150.1.4.4, timeout is 2 seconds:
• !!!
• Success rate is 100 percent (3/3), round‐trip min/avg/max = 1/4/8 ms
• Router(tcl)#tclquit
• The script above will ping all IP addresses 3 times and set the packet size
to 1500 bytes. Something you should remember is that you need to type
tclquit to exit TCLSH scripting.
• We can use TCLSH on routers and most switches. In case our switch doesn’t
support TCLSH WE can also create a macro that does a similar job. Here’s how
to do it:
• Switch#configure terminal
• Switch(config)#macro name PING_TEST
• Enter macro commands one per line. End with the character '@'.
• do ping 192.168.12.1
• do ping 192.168.13.1
• do ping 192.168.1.1
• @
• First we will create a macro called PING_TEST. A macro can only be applied
from the global configuration so we need to add “do” in front of our ping.
The macro is stored in the running configuration as you can see here:
• Switch#show run | begin macro
• macro name PING_TEST
• do ping 192.168.12.1
• do ping 192.168.13.1
• do ping 192.168.1.1
• @
• Now we will test our macro:
• Switch(config)#macro global apply PING_TEST
• Type escape sequence to abort.
• Sending 5, 100‐byte ICMP Echos to 192.168.12.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 192.168.13.1, timeout is 2 seconds:
• !!!!!
• Success rate is 100 percent (5/5), round‐trip min/avg/max = 1/1/1 ms
• Type escape sequence to abort.
• Sending 5, 100‐byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
• !!!!!
• Success rate is 100 percent (5/5), round‐trip min/avg/max = 1/1/4 ms
• Switch(config)#
• From the global configuration just type macro global apply and the name of your
macro. As we can see it pings all our IP addresses.

Más contenido relacionado

La actualidad más candente

AMBA 3 APB Protocol
AMBA 3 APB ProtocolAMBA 3 APB Protocol
AMBA 3 APB ProtocolSwetha GSM
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-ExpressDVClub
 
Access control list [1]
Access control list [1]Access control list [1]
Access control list [1]Summit Bisht
 
MIPI DevCon 2021: MIPI I3C Application and Validation Models for IoT Sensor N...
MIPI DevCon 2021: MIPI I3C Application and Validation Models for IoT Sensor N...MIPI DevCon 2021: MIPI I3C Application and Validation Models for IoT Sensor N...
MIPI DevCon 2021: MIPI I3C Application and Validation Models for IoT Sensor N...MIPI Alliance
 
Bidirectional Bus Modelling
Bidirectional Bus ModellingBidirectional Bus Modelling
Bidirectional Bus ModellingArrow Devices
 
Routebased-Policybased VPN.pptx
Routebased-Policybased VPN.pptxRoutebased-Policybased VPN.pptx
Routebased-Policybased VPN.pptxDhruv Sharma
 
Dynamic ARP Inspection (DAI)
Dynamic ARP Inspection (DAI)Dynamic ARP Inspection (DAI)
Dynamic ARP Inspection (DAI)NetProtocol Xpert
 

La actualidad más candente (20)

I2 c bus
I2 c busI2 c bus
I2 c bus
 
CCNA Report
CCNA ReportCCNA Report
CCNA Report
 
The I2C Interface
The I2C InterfaceThe I2C Interface
The I2C Interface
 
AMBA 3 APB Protocol
AMBA 3 APB ProtocolAMBA 3 APB Protocol
AMBA 3 APB Protocol
 
Fhrp notes
Fhrp notesFhrp notes
Fhrp notes
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-Express
 
AMBA Ahb 2.0
AMBA Ahb 2.0AMBA Ahb 2.0
AMBA Ahb 2.0
 
Access control list [1]
Access control list [1]Access control list [1]
Access control list [1]
 
I2C introduction
I2C introductionI2C introduction
I2C introduction
 
I2C BUS PROTOCOL
I2C BUS PROTOCOLI2C BUS PROTOCOL
I2C BUS PROTOCOL
 
Load Store Execution
Load Store ExecutionLoad Store Execution
Load Store Execution
 
MIPI DevCon 2021: MIPI I3C Application and Validation Models for IoT Sensor N...
MIPI DevCon 2021: MIPI I3C Application and Validation Models for IoT Sensor N...MIPI DevCon 2021: MIPI I3C Application and Validation Models for IoT Sensor N...
MIPI DevCon 2021: MIPI I3C Application and Validation Models for IoT Sensor N...
 
IS-IS Protocol Introduction
IS-IS Protocol IntroductionIS-IS Protocol Introduction
IS-IS Protocol Introduction
 
Bidirectional Bus Modelling
Bidirectional Bus ModellingBidirectional Bus Modelling
Bidirectional Bus Modelling
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Amba presentation2
Amba presentation2Amba presentation2
Amba presentation2
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
IS-IS Protocol Adjacency
IS-IS Protocol Adjacency IS-IS Protocol Adjacency
IS-IS Protocol Adjacency
 
Routebased-Policybased VPN.pptx
Routebased-Policybased VPN.pptxRoutebased-Policybased VPN.pptx
Routebased-Policybased VPN.pptx
 
Dynamic ARP Inspection (DAI)
Dynamic ARP Inspection (DAI)Dynamic ARP Inspection (DAI)
Dynamic ARP Inspection (DAI)
 

Destacado

Types of interfaces in a Cisco Router
Types of interfaces in a Cisco RouterTypes of interfaces in a Cisco Router
Types of interfaces in a Cisco RouterNetProtocol Xpert
 
OTV(Overlay Transport Virtualization)
OTV(Overlay  Transport  Virtualization)OTV(Overlay  Transport  Virtualization)
OTV(Overlay Transport Virtualization)NetProtocol Xpert
 
Securing management, control & data plane
Securing management, control & data planeSecuring management, control & data plane
Securing management, control & data planeNetProtocol Xpert
 
MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)NetProtocol Xpert
 
Common Layer 2 Threats, Attacks & Mitigation
Common Layer 2 Threats, Attacks & MitigationCommon Layer 2 Threats, Attacks & Mitigation
Common Layer 2 Threats, Attacks & MitigationNetProtocol Xpert
 
introducing PING comand
introducing PING comandintroducing PING comand
introducing PING comandali torabi
 
Converting ipv4 to ipv6 and vice versa
Converting ipv4 to ipv6 and vice versaConverting ipv4 to ipv6 and vice versa
Converting ipv4 to ipv6 and vice versaNetProtocol Xpert
 
Password recovery cisco catalyst 3850
Password recovery cisco catalyst 3850Password recovery cisco catalyst 3850
Password recovery cisco catalyst 3850NetProtocol Xpert
 

Destacado (20)

OTV Configuration
OTV ConfigurationOTV Configuration
OTV Configuration
 
IP Source Guard
IP Source Guard IP Source Guard
IP Source Guard
 
MPLS Layer 3 VPN
MPLS Layer 3 VPN MPLS Layer 3 VPN
MPLS Layer 3 VPN
 
Ping Tracert
Ping TracertPing Tracert
Ping Tracert
 
Reflexive Access List
Reflexive Access ListReflexive Access List
Reflexive Access List
 
Cisco OTV 
Cisco OTV Cisco OTV 
Cisco OTV 
 
Types of interfaces in a Cisco Router
Types of interfaces in a Cisco RouterTypes of interfaces in a Cisco Router
Types of interfaces in a Cisco Router
 
OTV(Overlay Transport Virtualization)
OTV(Overlay  Transport  Virtualization)OTV(Overlay  Transport  Virtualization)
OTV(Overlay Transport Virtualization)
 
Private VLANs
Private VLANsPrivate VLANs
Private VLANs
 
Regular expression examples
Regular expression examplesRegular expression examples
Regular expression examples
 
Securing management, control & data plane
Securing management, control & data planeSecuring management, control & data plane
Securing management, control & data plane
 
MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)MTU (maximum transmission unit) & MRU (maximum receive unit)
MTU (maximum transmission unit) & MRU (maximum receive unit)
 
Packet tracer
Packet tracerPacket tracer
Packet tracer
 
Cisco ISR 4351 Router
Cisco ISR 4351 RouterCisco ISR 4351 Router
Cisco ISR 4351 Router
 
Common Layer 2 Threats, Attacks & Mitigation
Common Layer 2 Threats, Attacks & MitigationCommon Layer 2 Threats, Attacks & Mitigation
Common Layer 2 Threats, Attacks & Mitigation
 
Networking
NetworkingNetworking
Networking
 
introducing PING comand
introducing PING comandintroducing PING comand
introducing PING comand
 
Cisco ASR 1001-X Router
Cisco ASR 1001-X RouterCisco ASR 1001-X Router
Cisco ASR 1001-X Router
 
Converting ipv4 to ipv6 and vice versa
Converting ipv4 to ipv6 and vice versaConverting ipv4 to ipv6 and vice versa
Converting ipv4 to ipv6 and vice versa
 
Password recovery cisco catalyst 3850
Password recovery cisco catalyst 3850Password recovery cisco catalyst 3850
Password recovery cisco catalyst 3850
 

Similar a TCLSH and Macro Ping Test on Cisco Routers and Switches

How NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkHow NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkAzul Systems Inc.
 
OSTU - hrPING QuickStart Part 1 (by Tony Fortunato & Peter Ciuffreda)
OSTU - hrPING QuickStart Part 1 (by Tony Fortunato & Peter Ciuffreda)OSTU - hrPING QuickStart Part 1 (by Tony Fortunato & Peter Ciuffreda)
OSTU - hrPING QuickStart Part 1 (by Tony Fortunato & Peter Ciuffreda)Denny K
 
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...Alexandre Moneger
 
General lab documentation~cisco router configuration
General lab documentation~cisco router configurationGeneral lab documentation~cisco router configuration
General lab documentation~cisco router configurationsayedatif
 
Please help with the below 3 questions, the python script is at the.pdf
Please help with the below 3  questions, the python script is at the.pdfPlease help with the below 3  questions, the python script is at the.pdf
Please help with the below 3 questions, the python script is at the.pdfsupport58
 
Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Amr Alaa El Deen
 
Cisco router configuration tutorial
Cisco router configuration tutorialCisco router configuration tutorial
Cisco router configuration tutorialIT Tech
 
On the way to low latency (2nd edition)
On the way to low latency (2nd edition)On the way to low latency (2nd edition)
On the way to low latency (2nd edition)Artem Orobets
 
So I used Erlang... is my system as scalable as they say it'd be?
So I used Erlang... is my system as scalable as they say it'd be?So I used Erlang... is my system as scalable as they say it'd be?
So I used Erlang... is my system as scalable as they say it'd be?Laura M. Castro
 
Ssh config note
Ssh config noteSsh config note
Ssh config noteR.k. Thapa
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writerEnkitec
 
SMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiSMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiTakuya ASADA
 
SPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic librarySPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic libraryAdaCore
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pieTomas Doran
 
FPGA based 10G Performance Tester for HW OpenFlow Switch
FPGA based 10G Performance Tester for HW OpenFlow SwitchFPGA based 10G Performance Tester for HW OpenFlow Switch
FPGA based 10G Performance Tester for HW OpenFlow SwitchYutaka Yasuda
 
Cisco CCNA-CCNP IP SLA Configuration
Cisco CCNA-CCNP IP SLA ConfigurationCisco CCNA-CCNP IP SLA Configuration
Cisco CCNA-CCNP IP SLA ConfigurationHamed Moghaddam
 

Similar a TCLSH and Macro Ping Test on Cisco Routers and Switches (20)

How NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkHow NOT to Write a Microbenchmark
How NOT to Write a Microbenchmark
 
OSTU - hrPING QuickStart Part 1 (by Tony Fortunato & Peter Ciuffreda)
OSTU - hrPING QuickStart Part 1 (by Tony Fortunato & Peter Ciuffreda)OSTU - hrPING QuickStart Part 1 (by Tony Fortunato & Peter Ciuffreda)
OSTU - hrPING QuickStart Part 1 (by Tony Fortunato & Peter Ciuffreda)
 
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
 
General lab documentation~cisco router configuration
General lab documentation~cisco router configurationGeneral lab documentation~cisco router configuration
General lab documentation~cisco router configuration
 
Please help with the below 3 questions, the python script is at the.pdf
Please help with the below 3  questions, the python script is at the.pdfPlease help with the below 3  questions, the python script is at the.pdf
Please help with the below 3 questions, the python script is at the.pdf
 
Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1
 
Cisco router configuration tutorial
Cisco router configuration tutorialCisco router configuration tutorial
Cisco router configuration tutorial
 
On the way to low latency (2nd edition)
On the way to low latency (2nd edition)On the way to low latency (2nd edition)
On the way to low latency (2nd edition)
 
So I used Erlang... is my system as scalable as they say it'd be?
So I used Erlang... is my system as scalable as they say it'd be?So I used Erlang... is my system as scalable as they say it'd be?
So I used Erlang... is my system as scalable as they say it'd be?
 
Ssh config note
Ssh config noteSsh config note
Ssh config note
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
SMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgiSMP implementation for OpenBSD/sgi
SMP implementation for OpenBSD/sgi
 
Itep
ItepItep
Itep
 
SPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic librarySPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic library
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pie
 
Raptor codes
Raptor codesRaptor codes
Raptor codes
 
QSpiders - Upper layer-protocols
QSpiders - Upper layer-protocolsQSpiders - Upper layer-protocols
QSpiders - Upper layer-protocols
 
Gre tunnel pdf
Gre tunnel pdfGre tunnel pdf
Gre tunnel pdf
 
FPGA based 10G Performance Tester for HW OpenFlow Switch
FPGA based 10G Performance Tester for HW OpenFlow SwitchFPGA based 10G Performance Tester for HW OpenFlow Switch
FPGA based 10G Performance Tester for HW OpenFlow Switch
 
Cisco CCNA-CCNP IP SLA Configuration
Cisco CCNA-CCNP IP SLA ConfigurationCisco CCNA-CCNP IP SLA Configuration
Cisco CCNA-CCNP IP SLA Configuration
 

Más de NetProtocol Xpert

Basic Cisco ASA 5506-x Configuration (Firepower)
Basic Cisco ASA 5506-x Configuration (Firepower)Basic Cisco ASA 5506-x Configuration (Firepower)
Basic Cisco ASA 5506-x Configuration (Firepower)NetProtocol Xpert
 
Point to-point protocol (ppp), PAP & CHAP
Point to-point protocol (ppp), PAP & CHAPPoint to-point protocol (ppp), PAP & CHAP
Point to-point protocol (ppp), PAP & CHAPNetProtocol Xpert
 
Avoid DNS lookup when mistyping a command
Avoid DNS lookup when mistyping a commandAvoid DNS lookup when mistyping a command
Avoid DNS lookup when mistyping a commandNetProtocol Xpert
 
Eigrp is restricted to stub connections
Eigrp is restricted to stub connections Eigrp is restricted to stub connections
Eigrp is restricted to stub connections NetProtocol Xpert
 
Cisco 2960x switch password recovery
Cisco 2960x switch password recoveryCisco 2960x switch password recovery
Cisco 2960x switch password recoveryNetProtocol Xpert
 
VMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation ProcessVMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation ProcessNetProtocol Xpert
 
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)NetProtocol Xpert
 
OSPF External Route Summarization
OSPF External Route Summarization OSPF External Route Summarization
OSPF External Route Summarization NetProtocol Xpert
 
OSPF Internal Route Summarization
OSPF Internal Route SummarizationOSPF Internal Route Summarization
OSPF Internal Route SummarizationNetProtocol Xpert
 

Más de NetProtocol Xpert (14)

Basic Cisco ASA 5506-x Configuration (Firepower)
Basic Cisco ASA 5506-x Configuration (Firepower)Basic Cisco ASA 5506-x Configuration (Firepower)
Basic Cisco ASA 5506-x Configuration (Firepower)
 
DHCP Snooping
DHCP SnoopingDHCP Snooping
DHCP Snooping
 
Password Recovery
Password RecoveryPassword Recovery
Password Recovery
 
Application & Data Center
Application & Data CenterApplication & Data Center
Application & Data Center
 
Point to-point protocol (ppp), PAP & CHAP
Point to-point protocol (ppp), PAP & CHAPPoint to-point protocol (ppp), PAP & CHAP
Point to-point protocol (ppp), PAP & CHAP
 
Avoid DNS lookup when mistyping a command
Avoid DNS lookup when mistyping a commandAvoid DNS lookup when mistyping a command
Avoid DNS lookup when mistyping a command
 
Eigrp is restricted to stub connections
Eigrp is restricted to stub connections Eigrp is restricted to stub connections
Eigrp is restricted to stub connections
 
Cisco 2960x switch password recovery
Cisco 2960x switch password recoveryCisco 2960x switch password recovery
Cisco 2960x switch password recovery
 
VMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation ProcessVMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation Process
 
EtherChannel Configuration
EtherChannel ConfigurationEtherChannel Configuration
EtherChannel Configuration
 
EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)EIGRP (Enhanced Interior Gateway Routing Protocol)
EIGRP (Enhanced Interior Gateway Routing Protocol)
 
OSPF External Route Summarization
OSPF External Route Summarization OSPF External Route Summarization
OSPF External Route Summarization
 
OSPF Internal Route Summarization
OSPF Internal Route SummarizationOSPF Internal Route Summarization
OSPF Internal Route Summarization
 
Redistribution into OSPF
Redistribution into OSPFRedistribution into OSPF
Redistribution into OSPF
 

Último

Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 

Último (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 

TCLSH and Macro Ping Test on Cisco Routers and Switches

  • 1. TCLSH and Macro Ping Test on Cisco Routers and Switches www.netprotocolxpert.in
  • 2. • When you are studying for CCIE, you will have to check connectivity every time. It’s a good idea to use ping to check if you can reach all IP addresses of the routers and switches in your network. If you have many devices and many IP addresses it will take too much time to ping each IP address manually. • You can use TCLSH (Tool Control Language) on your Cisco routers and devices, a scripting language that is used a lot by Cisco and one of the things it can do is ping IP addresses.
  • 3. • First you should check the active IP addresses on your device using the following command: • Router#show ip alias • Address Type IP Address Port • Interface 192.168.12.1 • Interface 192.168.13.1 • Interface 192.168.1.1 • The show ip alias command will show you all active IP addresses on your device.
  • 4. • You can also use show ip interface brief | exclude unassigned to see all IP addresses of active interfaces: • Router#show ip interface brief | exclude unassigned • Interface IP‐Address OK? Method Status • Protocol • FastEthernet0/0 192.168.12.1 YES manual up • up • Serial0/0.1 192.168.13.1 YES manual up • up • Loopback0 192.168.1.1 YES manual up • up
  • 5. • Now we can use TCLSH to automatically ping all these IP addresses, this is how it works: • Router#tclsh • Router(tcl)#foreach address { • +>1.1.1.1 • +>2.2.2.2 • +>3.3.3.3 • +>150.1.4.4 • +>} { ping $address repeat 3 size 1500 } • Type escape sequence to abort. • Sending 3, 1500‐byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: • !!!
  • 6. • Success rate is 100 percent (3/3), round‐trip min/avg/max = 4/8/12 ms • Type escape sequence to abort. • Sending 3, 1500‐byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: • !!! • Success rate is 100 percent (3/3), round‐trip min/avg/max = 4/4/4 ms • Type escape sequence to abort. • Sending 3, 1500‐byte ICMP Echos to 3.3.3.3, timeout is 2 seconds: • !!!
  • 7. • Success rate is 100 percent (3/3), round‐trip min/avg/max = 1/1/1 ms • Type escape sequence to abort. • Sending 3, 1500‐byte ICMP Echos to 150.1.4.4, timeout is 2 seconds: • !!! • Success rate is 100 percent (3/3), round‐trip min/avg/max = 1/4/8 ms • Router(tcl)#tclquit • The script above will ping all IP addresses 3 times and set the packet size to 1500 bytes. Something you should remember is that you need to type tclquit to exit TCLSH scripting.
  • 8. • We can use TCLSH on routers and most switches. In case our switch doesn’t support TCLSH WE can also create a macro that does a similar job. Here’s how to do it: • Switch#configure terminal • Switch(config)#macro name PING_TEST • Enter macro commands one per line. End with the character '@'. • do ping 192.168.12.1 • do ping 192.168.13.1 • do ping 192.168.1.1 • @
  • 9. • First we will create a macro called PING_TEST. A macro can only be applied from the global configuration so we need to add “do” in front of our ping. The macro is stored in the running configuration as you can see here: • Switch#show run | begin macro • macro name PING_TEST • do ping 192.168.12.1 • do ping 192.168.13.1 • do ping 192.168.1.1 • @
  • 10. • Now we will test our macro: • Switch(config)#macro global apply PING_TEST • Type escape sequence to abort. • Sending 5, 100‐byte ICMP Echos to 192.168.12.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 192.168.13.1, timeout is 2 seconds: • !!!!!
  • 11. • Success rate is 100 percent (5/5), round‐trip min/avg/max = 1/1/1 ms • Type escape sequence to abort. • Sending 5, 100‐byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: • !!!!! • Success rate is 100 percent (5/5), round‐trip min/avg/max = 1/1/4 ms • Switch(config)# • From the global configuration just type macro global apply and the name of your macro. As we can see it pings all our IP addresses.