Questions?

Call us Monday through Friday, 6AM - 4:30 PM (GMT -7) or by email and a CCIE Training Advisor will respond within 2 business hours.

 
Testimonials

I passed the CCIE Routing and Switching lab on August 1st in RTP! It was my first attempt. I used the ATC and 5-day Bootcamp on-demand videos, in addition to the Vol I and Vol II workbooks in the month leading up to my exam. I felt incredibly prepared and confident going in to the exam thanks to the expert training by Brian McGahan and Brian Dennis. I knew as soon as I walked out of the lab that I had passed. Please keep up the great work, and I look forward to choosing Internetwork Expert again when I start the CCIE Security track!

Jason Alert
CCIE #21656

Read More Testimonials

 
Why Choose Internetwork Expert For ccie Training?
It's simple. You are trying to obtain your CCIE number and Internetwork Expert is all about CCIE numbers. Internetwork Expert has the fastest growing list of candidates that have used our products and services to pass the Cisco CCIE Lab Exam. So when you are looking for the true industry leader in CCIE preparation, our numbers speak for themselves. More...
 

CCIE Lab Preparation Resources

Using TCLSH and RSH to Ensure Full Reachability

Introduction:

The following document describes how to use the TCL shell and RSH to ensure full reachability of all IP addresses in a lab. The TCL shell (TCLSH) is found in IOS feature sets that support VoIP. The 2500 and 4000 series routers are not supported along with the Cataylst 3550 switches. RSH is available on IOS based router and switch platforms.

Overview:

TCL (Tool Control Language) is a scripting language used extensiviely by Cisco Systems to facilited the testing of various router and switch platform. More information on TCL can be found at http://www.tcl.tk.

RSH (Remote SHell) is used to execute commands on a remote device. RSH was originally developed for use in a UNIX enviroment to ease the management of multiple machines. RSH is extremely insecure and in turn is not commonly used anymore. RSH is found in the Cisco IOS and in nearly all Linux/UNIX distributions.

Hardware Used:

  • 2 Cisco Routers connected by Ethernet
  • IOS version 12.2T

Configurations:

R1:

version 12.2
!
hostname Rack1R1
!
no ip domain lookup
!
interface Loopback0
 ip address 150.1.1.1 255.255.255.0
!
interface Ethernet0/0
 ip address 10.1.1.1 255.255.255.0
!
router rip
 version 2
 network 10.0.0.0
 network 150.1.0.0
 no auto-summary
!
line con 0
line aux 0
line vty 0 4
 password cisco
 login

!
end

R2:
version 12.2
!
hostname Rack1R2
!
ip rcmd rsh-enable
ip rcmd remote-host Rack1R1 10.1.1.1 Rack1R1 enable
!
no ip domain lookup
!
interface Loopback0
 ip address 150.1.2.2 255.255.255.0
!
interface Ethernet0/0
 ip address 10.1.1.2 255.255.255.0
!
router rip
 version 2
 network 10.0.0.0
 network 150.1.0.0
 no auto-summary
!
line con 0
line aux 0
line vty 0 4
 password cisco
 login
!
!
end

TCL Script:
proc ping_all {ip} {
if {[regexp "(!!)" [exec "ping $ip"]]} {

set counter 0
exec "term len 0"
set hostname [lindex [exec rsh $ip "sho run | include hostname"] 1]
set int [exec rsh $ip "show ip int brief"]
set length [llength $int]

while {$counter<=$length} {
 set tmp [lindex $int $counter]

if {[regexp "(^\[0-9]+\.\[0-9]+\.\[0-9]+\.\[0-9]+)" $tmp ]} {
  puts "\n"
  puts "**********************************"
  puts "* Ping $hostname [lindex $int [expr $counter - 1]]"
  puts "**********************************"
  exec "ping $tmp"
  }
 incr counter
 }
 } else {
  puts "\n\n"
  puts "IP address $ip is not reachable\n"
  set route [exec "show ip route $ip"]
  puts "Output from the show ip route command\n"
  puts "[exec "show ip route $ip"]"
 }
}

Script Breakdown :
The script reads in the IP address of the device you want to 
test reachability to. The script then tests to ensure that is 
can reach that particular IP address by trying to ping the IP 
address. If the ping is unsucessfull an error message is 
displayed like below:

Rack1R1#ping_all 150.1.4.4


IP address 150.1.4.4 is not reachable

Output from the show ip route command

% Subnet not in table

Rack1R1#

If the ping is sucessful the script RSH's to the remote device 
and discovers it's hostname along with all the IP addresses that 
are assigned to the interfaces of the remote device. Next the 
script attempts to ping the IP addresses of the remote router from 
the local router.

Implementation:

Rack1R1#tclsh
Rack1R1(tcl)#
Rack1R1(tcl)#proc ping_all {ip} {
+>
+> if {[regexp "(!!)" [exec "ping $ip"]]} {
+> 
+>   set counter 0
+>   exec "term len 0"
+>   set hostname [lindex [exec rsh $ip "sho run | include hostname"] 1]
+>   set int [exec rsh $ip "show ip int brief"]
+>   set length [llength $int]
+>  
+>   while {$counter<=$length} {
+>     set tmp [lindex $int $counter]
+> 
+>     if {[regexp "(^\[0-9]+\.\[0-9]+\.\[0-9]+\.\[0-9]+)" $tmp ]} {
+>       puts "\n\n"
+>       puts "**********************************"
+>       puts "*  Ping $hostname [lindex $int [expr $counter - 1]]"
+>       puts "**********************************"
+>       exec "ping $tmp"
+>     }
+>     incr counter
+>   }
+> } else {
+>          puts "\n"  
+>          puts "IP address $ip is not reachable\n"
+>          set route [exec "show ip route $ip"]
+>          puts "Output from the show ip route command\n"
+>          puts "[exec "show ip route $ip"]"
+> }
+>}

Rack1R1(tcl)#ping_all 150.1.2.2



**********************************
*  Ping Rack1R2 Ethernet0/0
**********************************

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms


**********************************
*  Ping Rack1R2 Loopback0
**********************************

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 150.1.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
Rack1R1(tcl)#

© 2004 Internetwork Expert, Inc.

Contact Us

Toll Free (US & Canada):
(877) 224.8987 x1

International:
+1.775.826.4344 x1

Fax:
+1.775.826.4344

Email:
Sales
Support
Customer Service
Shipping

Main Sales Office (US):
10627 Professional Circle
Reno, NV 89521