cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1011
Views
0
Helpful
2
Comments
Jason Pfeifer
Cisco Employee
Cisco Employee

osted By:

jclarke

Posted Date:

Jul 11, 2008

Category:

Network Management

Version:

1.0

License:

Cisco-Style BSD

Summary:

Tclsh script to do DNS lookups on IOS.

Script Modified Date:

Jul 11, 2008

Cisco IOS Version tested:

12.4T

Cisco Products Tested:

7206

Environment Variables used:

Rating Count:

0

Average Rating:

0

File Size:

3 KB

Script Info URL:

This tclsh script implements the UNIX host command on IOS.  The  host.tcl script is currently limited to IPv4 A and PTR lookups only.  It  can also dynamically determine the DNS server by looking at the running  config.  However, if you want to specify a DNS server to use, that is  also possible.  To use the script, do the following:    tclsh host.tcl  HOST [DNS SERVER]    Where HOST is the hostname or IP address to lookup,  and DNS SERVER is an optional DNS server name or IP address.  For  example:    Router#tclsh flash:host.tcl www.cisco.com  www.cisco.com has  address 198.133.219.25    Router#tclsh flash:host.tcl 198.133.219.25  10.1.1.1  25.219.133.198.in-addr.arpa domain name pointer www.cisco.com

Comments
chris.moody
Level 1
Level 1

I could use some help trying to figure out why this utility doesn't output anything on either of the Cisco devices I try it from.  If I execute this utility from say, a linux host, and it executes properly and returns a valid lookup.

I run it from a 2621 and only get back an empty line as a result.  I run it from a 2811 and only get back the string 'ERROR' followed by an empty line.

any thoughts as to how to debug further to determine what in IOS is preventing this from working?

-Chris

Joe Clarke
Cisco Employee
Cisco Employee

There is a newer version of this script at https://supportforums.cisco.com/docs/DOC-19590 that might help.  Else, what version of code are you running on these devices?  Do you use command authorization?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: