hit counter script

Echo Keepalive - Cisco 11503 - CSS Content Services Switch Administration Manual

Content services switch
Hide thumbs Also See for 11503 - CSS Content Services Switch:
Table of Contents

Advertisement

Script Keepalive Examples

Echo Keepalive

Cisco Content Services Switch Administration Guide
8-60
! This may require a little explanation.
! if the DNS server is alive we will send a simple DNS Query.
! query is hard coded in hexadecimal and sent raw to the DNS server.
! The DNS request has a 12 byte header (as seen for the first 12 bytes
! of hex) and then a DNS name (ie. www.cisco.com).
! with some null termination and a few bytes representing query type.
! See RFC-1035 for more.
set EXIT_MSG "Send: failure"
socket send ${SOCKET}
"0002010000010000000000000377777705636973636f03636f6d0000010001" raw
! Receive some unexplained response.
! an unstable DNS server or a non-existent one would probably not send
! us any data back at all.
set EXIT_MSG "Receive: Failed to receive data"
socket receive ${SOCKET}
no set EXIT_MSG
socket disconnect ${SOCKET}
exit script 0
!no echo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Filename: ap-kal-echo
! Parameters: HostName [ udp | tcp ]
!
! Description:
!
This script will send a TCP or UDP echo (depending on what the
!
user has passed to us) that will echo "Hello Cisco" to the
!
remote host, and expect it to come back.
!
is TCP.
!
! Failure Upon:
!
1. Not establishing a connection with the host (TCP Only).
!
2. Not being able to retrieve an echoed message back
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Make sure the user has a qualified number of arguments
if ${ARGS}[#] "NEQ" "2"
if ${ARGS}[#] "NEQ" "1"
echo "Usage: ap-kal-echo \'Hostname [ udp | tcp ]\'"
exit script 1
endbranch
endbranch
Chapter 8
Using the CSS Scripting Language
Since we just want to see
Lastly it follows
We don't care what it is because
The default protocol
This
OL-5647-02

Advertisement

Table of Contents
loading

This manual is also suitable for:

11500 series

Table of Contents