SlideShare a Scribd company logo
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.

More Related Content

What's hot

A History of Linux
A History of LinuxA History of Linux
A History of Linux
Damian T. Gordon
 
Virtual Machine Forensics
Virtual Machine ForensicsVirtual Machine Forensics
Virtual Machine Forensics
primeteacher32
 
Cybersecurity
Cybersecurity Cybersecurity
Cybersecurity
DakshPratapSingh1
 
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
Dmitry Vyukov
 
CCNA Discovery 2 - Chapter 1
CCNA Discovery 2 - Chapter 1CCNA Discovery 2 - Chapter 1
CCNA Discovery 2 - Chapter 1Irsandi Hasan
 
Comparative Analysis of Windows and Linux System
Comparative Analysis of Windows and Linux SystemComparative Analysis of Windows and Linux System
Comparative Analysis of Windows and Linux System
Kazi Emad
 
Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panic
Joseph Lu
 
Threats to information security
Threats to information securityThreats to information security
Threats to information securityswapneel07
 
5.5.1.2 packet tracer configure ios intrusion prevention system (ips) using...
5.5.1.2 packet tracer   configure ios intrusion prevention system (ips) using...5.5.1.2 packet tracer   configure ios intrusion prevention system (ips) using...
5.5.1.2 packet tracer configure ios intrusion prevention system (ips) using...
Salem Trabelsi
 
Kernel module programming
Kernel module programmingKernel module programming
Kernel module programming
Vandana Salve
 
Tools and methods used in cyber crime
Tools and methods used in cyber crimeTools and methods used in cyber crime
Tools and methods used in cyber crime
shubhravrat Deshpande
 
Uccn1003 -may09_-_lect09_-_access_control_list_acl_
Uccn1003  -may09_-_lect09_-_access_control_list_acl_Uccn1003  -may09_-_lect09_-_access_control_list_acl_
Uccn1003 -may09_-_lect09_-_access_control_list_acl_Shu Shin
 
Uses,mis uses and risk of software
Uses,mis uses and risk of softwareUses,mis uses and risk of software
Uses,mis uses and risk of software
AHSSAN AKHTAR
 
Linux Security Scanning with Lynis
Linux Security Scanning with LynisLinux Security Scanning with Lynis
Linux Security Scanning with Lynis
Michael Boelen
 
Stuxnet
StuxnetStuxnet
Stuxnet
Shishir Aryal
 
Switch configuration
Switch configurationSwitch configuration
Switch configurationMuuluu
 
Presentation aix performance updates & issues
Presentation   aix performance updates & issuesPresentation   aix performance updates & issues
Presentation aix performance updates & issues
xKinAnx
 
Intrusion Detection Systems and Intrusion Prevention Systems
Intrusion Detection Systems  and Intrusion Prevention Systems Intrusion Detection Systems  and Intrusion Prevention Systems
Intrusion Detection Systems and Intrusion Prevention Systems
Cleverence Kombe
 

What's hot (20)

A History of Linux
A History of LinuxA History of Linux
A History of Linux
 
Virtual Machine Forensics
Virtual Machine ForensicsVirtual Machine Forensics
Virtual Machine Forensics
 
Cybersecurity
Cybersecurity Cybersecurity
Cybersecurity
 
syzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzersyzkaller: the next gen kernel fuzzer
syzkaller: the next gen kernel fuzzer
 
CCNA Discovery 2 - Chapter 1
CCNA Discovery 2 - Chapter 1CCNA Discovery 2 - Chapter 1
CCNA Discovery 2 - Chapter 1
 
Comparative Analysis of Windows and Linux System
Comparative Analysis of Windows and Linux SystemComparative Analysis of Windows and Linux System
Comparative Analysis of Windows and Linux System
 
Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panic
 
Threats to information security
Threats to information securityThreats to information security
Threats to information security
 
IP Routing
IP RoutingIP Routing
IP Routing
 
5.5.1.2 packet tracer configure ios intrusion prevention system (ips) using...
5.5.1.2 packet tracer   configure ios intrusion prevention system (ips) using...5.5.1.2 packet tracer   configure ios intrusion prevention system (ips) using...
5.5.1.2 packet tracer configure ios intrusion prevention system (ips) using...
 
Kernel module programming
Kernel module programmingKernel module programming
Kernel module programming
 
Tools and methods used in cyber crime
Tools and methods used in cyber crimeTools and methods used in cyber crime
Tools and methods used in cyber crime
 
Uccn1003 -may09_-_lect09_-_access_control_list_acl_
Uccn1003  -may09_-_lect09_-_access_control_list_acl_Uccn1003  -may09_-_lect09_-_access_control_list_acl_
Uccn1003 -may09_-_lect09_-_access_control_list_acl_
 
Uses,mis uses and risk of software
Uses,mis uses and risk of softwareUses,mis uses and risk of software
Uses,mis uses and risk of software
 
Linux Security Scanning with Lynis
Linux Security Scanning with LynisLinux Security Scanning with Lynis
Linux Security Scanning with Lynis
 
Stuxnet
StuxnetStuxnet
Stuxnet
 
Switch configuration
Switch configurationSwitch configuration
Switch configuration
 
Presentation aix performance updates & issues
Presentation   aix performance updates & issuesPresentation   aix performance updates & issues
Presentation aix performance updates & issues
 
Intrusion Detection Systems and Intrusion Prevention Systems
Intrusion Detection Systems  and Intrusion Prevention Systems Intrusion Detection Systems  and Intrusion Prevention Systems
Intrusion Detection Systems and Intrusion Prevention Systems
 
Mac os casestudy
Mac os casestudyMac os casestudy
Mac os casestudy
 

Viewers also liked

OTV Configuration
OTV ConfigurationOTV Configuration
OTV Configuration
NetProtocol Xpert
 
IP Source Guard
IP Source Guard IP Source Guard
IP Source Guard
NetProtocol Xpert
 
MPLS Layer 3 VPN
MPLS Layer 3 VPN MPLS Layer 3 VPN
MPLS Layer 3 VPN
NetProtocol Xpert
 
Reflexive Access List
Reflexive Access ListReflexive Access List
Reflexive Access List
NetProtocol Xpert
 
Cisco OTV 
Cisco OTV Cisco OTV 
Cisco OTV 
NetProtocol Xpert
 
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
NetProtocol Xpert
 
OTV(Overlay Transport Virtualization)
OTV(Overlay  Transport  Virtualization)OTV(Overlay  Transport  Virtualization)
OTV(Overlay Transport Virtualization)
NetProtocol Xpert
 
Private VLANs
Private VLANsPrivate VLANs
Private VLANs
NetProtocol Xpert
 
Regular expression examples
Regular expression examplesRegular expression examples
Regular expression examples
NetProtocol Xpert
 
Securing management, control & data plane
Securing management, control & data planeSecuring management, control & data plane
Securing management, control & data plane
NetProtocol 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
 
Cisco ISR 4351 Router
Cisco ISR 4351 RouterCisco ISR 4351 Router
Cisco ISR 4351 Router
NetProtocol Xpert
 
Dynamic ARP Inspection (DAI)
Dynamic ARP Inspection (DAI)Dynamic ARP Inspection (DAI)
Dynamic ARP Inspection (DAI)
NetProtocol Xpert
 
Common Layer 2 Threats, Attacks & Mitigation
Common Layer 2 Threats, Attacks & MitigationCommon Layer 2 Threats, Attacks & Mitigation
Common Layer 2 Threats, Attacks & Mitigation
NetProtocol Xpert
 
Networking
NetworkingNetworking
Networking
Pravesh Hidko
 
introducing PING comand
introducing PING comandintroducing PING comand
introducing PING comand
ali torabi
 
Cisco ASR 1001-X Router
Cisco ASR 1001-X RouterCisco ASR 1001-X Router
Cisco ASR 1001-X Router
NetProtocol Xpert
 
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
NetProtocol Xpert
 

Viewers also liked (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
 
Dynamic ARP Inspection (DAI)
Dynamic ARP Inspection (DAI)Dynamic ARP Inspection (DAI)
Dynamic ARP Inspection (DAI)
 
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
 

Similar to 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 Microbenchmark
Azul 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 configuration
sayedatif
 
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
support58
 
Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1Begin with c++ Fekra Course #1
Begin with c++ Fekra Course #1
Amr 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 note
R.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/sgi
Takuya ASADA
 
SPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic librarySPARKNaCl: A verified, fast cryptographic library
SPARKNaCl: A verified, fast cryptographic library
AdaCore
 
Cooking a rabbit pie
Cooking a rabbit pieCooking a rabbit pie
Cooking a rabbit pieTomas Doran
 
QSpiders - Upper layer-protocols
QSpiders - Upper layer-protocolsQSpiders - Upper layer-protocols
QSpiders - Upper layer-protocols
Qspiders - Software Testing Training Institute
 
Gre tunnel pdf
Gre tunnel pdfGre tunnel pdf
Gre tunnel pdf
Rajesh Porwal
 
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
Yutaka Yasuda
 
Cisco CCNA-CCNP IP SLA Configuration
Cisco CCNA-CCNP IP SLA ConfigurationCisco CCNA-CCNP IP SLA Configuration
Cisco CCNA-CCNP IP SLA Configuration
Hamed Moghaddam
 

Similar to 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
 

More from 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
 
Storm-Control
Storm-ControlStorm-Control
Storm-Control
NetProtocol Xpert
 
DHCP Snooping
DHCP SnoopingDHCP Snooping
DHCP Snooping
NetProtocol Xpert
 
Password Recovery
Password RecoveryPassword Recovery
Password Recovery
NetProtocol Xpert
 
Application & Data Center
Application & Data CenterApplication & Data Center
Application & Data Center
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 & CHAP
NetProtocol 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 command
NetProtocol 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
 
Password recovery cisco catalyst 3850
Password recovery cisco catalyst 3850Password recovery cisco catalyst 3850
Password recovery cisco catalyst 3850
NetProtocol Xpert
 
Cisco 2960x switch password recovery
Cisco 2960x switch password recoveryCisco 2960x switch password recovery
Cisco 2960x switch password recovery
NetProtocol Xpert
 
VMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation ProcessVMware ESXi 6.0 Installation Process
VMware ESXi 6.0 Installation Process
NetProtocol Xpert
 
EtherChannel Configuration
EtherChannel ConfigurationEtherChannel Configuration
EtherChannel Configuration
NetProtocol 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 Summarization
NetProtocol Xpert
 
Redistribution into OSPF
Redistribution into OSPFRedistribution into OSPF
Redistribution into OSPF
NetProtocol Xpert
 

More from NetProtocol Xpert (16)

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)
 
Storm-Control
Storm-ControlStorm-Control
Storm-Control
 
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
 
Password recovery cisco catalyst 3850
Password recovery cisco catalyst 3850Password recovery cisco catalyst 3850
Password recovery cisco catalyst 3850
 
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
 

Recently uploaded

Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 

Recently uploaded (20)

Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 

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.