Cisco 11503 Administration Guide - Page 317
NetBIOS Name Query (Microsoft Networking), Cisco Content Services Switch Administration Guide
UPC - 746320664958
View all Cisco 11503 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 317 highlights
Chapter 8 Using the CSS Scripting Language Script Keepalive Examples NetBIOS Name Query (Microsoft Networking) !no echo Filename: ap-kal-netbios ! Parameters: Hostname ! ! Description: ! We will make a netbios name query that we know will be ! a "negative" response. RFC-1002 NETBIOS states that a hex ! value of: ! 0x81 Session Request ! 0x82 Positive Session Response ! 0x83 Negative Session Response ! We will key off of 0x83 which states we failed, but which ! also means that the service was stable enough to know that ! we are not a valid machine on the network. ! This script will send an encoded message for Session Request ! (0x81) and will invent a CALLER and a CALLED machine name ! (Caller = this script and CALLED = Server) ! ! Failure Upon: ! 1. Not establishing a connection with the host. ! 2. Not receiving a status code 0x83 (negative response if ${ARGS}[#] "NEQ" "1" echo "Usage: ap-kal-pop3 \'Hostname\'" exit script 1 endbranch ! Defines: set HostName "${ARGS}[1]" ! Connect to the remote host (default timeout) set EXIT_MSG "Connection failure" socket connect host ${HostName} port 139 tcp ! Send a Netbios Session Request (0x81) and its required encoded !values. ! This value will be sent in RAW Hex set EXIT_MSG "Send: Failure" socket send ${SOCKET} 810000442045454550454d454d464a4341434143414341434143414341434143414341 434100" raw ! Wait for a response code of 0x83 set EXIT_MSG "Waitfor: Failure" socket waitfor ${SOCKET} "83" raw OL-5647-02 Cisco Content Services Switch Administration Guide 8-49