Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 208adf5864f5be8a4a18edacf652b05e > files > 3

ipxping-0.0-3mdv2010.0.i586.rpm


Program: IPXPING
Authors: Stephen Clover and Justin Hoon
Purpose: Ping a node on a Novell network from a Sun machine.


Notes: IPXPING uses a Novell IPX Configuration Request packet to prompt a
response from a connected workstation. It uses the NIT (device /dev/nit)
interface to write and read packets directly to and from the ethernet. 

The software creates an IPX Send packet of ConfigReq type, and frames it
with an ethernet header. In this way, the package is capable of pinging a
machine that is on a separate arm of the network, by framing the packet
(addressed to the destination node) with an ethernet header addressed
to an intermediary router.

On receiving the ConfigReq packet, a net-aware machine will respond with 
an IPX Configuration Reply Packet, containing a list of the software
components that reside at the responding node, and indicating to the
source of the 'ping' that the machine is 'alive'.

The ping attempt will either time out if no response has been received
within 500 milliseconds of sending the ConfigReq packet, or return the ping
response time and the software component information, returned in the IPX
ConfigReply packet datafield. This information is a field of varying
length, made up of a number of values, each of which give specific
information about the responding node:

 00     IPX/SPX
 01     Bridge Driver
 02     Shell Driver
 03     Shell
 04     VAP Shell
 05     External Bridge
 06     Internal Bridge
 07     Nondedicated File Server
 08     Star 68000 (IPX only)
 09     ODI driver (?)

(information from NetWare System Calls (DOS) section Diagnostic Services
pages 6-1 to 6-7)




Compilation: The source (ipxping.c) is compiled using the GNU C compiler
GCC (version 2.5.6), in the following way:

% gcc -o ipxping ipxping.c


To include debugging information, include a -g option in the command line:

% gcc -g -o ipxping ipxping.c



Execution: The IPXPING software is used in the following manner:

Prior to execution, the modes of the executable file ipxping must be set
such that it has a user-id of root upon execution. This requires the
following one (or two) steps:

% chown root ipxping    (not necessary if root already is owner)
% chmod 4555 ipxping

This requires superuser rights to perform, and must be done by root.

If this is not done before execution, a permission error will result in
attempting to gain access to the /dev/nit device.


Calling IPXPING with no (or an incorrect number of) parameters will display a
list of parameters and their function, ie:

% ipxping
ipxping <host network> <router/dest machine> <dest network> <dest machine>


All parameters are entered as 4 or 6-byte addresses, entered as
hex pairs (case insensitive) separated with colons. The usage of the
parameters is as follows:

<host network>: 4-byte network address of host machine (ie. 00:00:0E:E4)

<router/dest machine>: 6-byte ethernet address of destination machine OR
                       intermediary router (ie. 08:00:20:0F:BE:78)

<dest network>: 4-byte network address of dest machine (ie. 00:00:01:C4)

<dest machine>: 6-byte ethernet address of destination machine
                       (ie. 00:00:C0:01:06:84)



Examples:

1. Host machine and destination machine are on the same segment arm of the 
   network:

 % ipxping 00:00:0E:E4 00:00:C0:01:06:84 00:00:0E:E4 00:00:C0:01:06:84


2. Host machine and destination machine reside on different segment arms of 
   the network, hence the host network address refers to the arm the host
   machine is on, and the destination network address refers to the arm the
   destination machine is on. The ethernet frame must be addressed to an 
   intermediary router, and the IPX packet to the destination machine itself:

 % ipxping 00:00:0E:E4 00:00:1B:42:62:69 9C:3B:19:00 00:20:AF:19:32:BD



NOTES: 

The network and ethernet address of any node can be found by using the
NetWare 'userlist' feature, with the /a command-line switch. It would
be necessary to run the command on a machine on both segment arms in 
question.

An example of the output of this feature is (the spaces in the Network and
Node Address fields translate to zeros):

User Information for Server <FileServer>
Connection  User Name        Network    Node Address   Login Time
----------  --------------   --------   ------------   -------------------
     8      POWLESMA        [     EE4] [    E2005C34]   5-06-1994  7:58 am
    10      HAWESDA         [     EE4] [    C0010838]   5-06-1994  7:59 am
    13      ROBSONDE        [9C3B1900] [  20AF1932BD]   5-06-1994  8:00 am



The ethernet address of a router may be found in one of the following ways,
depending if it is IP-capable or not. 

If the router is IP capable, then the address may be found from the unix-
host, by pinging the router, and then using 'arp' with the -a command-line 
switch to obtain the address. For example:

 % ping router
 router.ee.cit.ac.nz is alive.
 % arp -a
 router.ee.cit.ac.nz (156.59.209.3) at 0:0:1b:42:62:c9


If the router is a NetWare file server, and IPX-only, the address can be 
found at the router's console. At the console prompt, type 'load monitor'.
This will bring up the file server information. From the menu, select 
"LAN Information". A list of interfaces, one for each routed segment arm, 
will be presented to you; from this list, select the correct interface 
(this may, unfortunately, involve some degree of trial and error) and
you will be shown the network and IPX (ie: ethernet) addresses.





Distribution: The distribution of the IPXPING package contains the
following files:

   ipxping.c       (c source file)
   README          (information)
   ipxping.1       (man page)

For more information on the operation of the software, refer to the man
pages on nit, nit_if, nit_buf, nit_pf, and read.





Problems: The IPXPING software appears to kill a diskless machine if it is
attempting to boot up when it gets pinged.

The only kind of machine that can use this software is a Sun, as other Unix
hosts do not allow access to the ethernet in this way.

The package will only run correctly over an ethernet network running the 
IEEE 802.3 standard, not Ethernet-II. This may be able to be fixed in the 
source code, by changing the #define PROTOCOL to be 0x8137 (to indicate
the ethernet frame is to carry Netware data), rather than 0x0064 (a length
value for the ethernet frame around the IPX ConfigReq packet). This however
has not been tested, and cannot be verified.


           --------------------------------------------------------


The IPXPING package was created by Stephen Clover <cloverst@kai.ee.cit.ac.nz>
and Justin Hoon <hoonju@kai.ee.cit.ac.nz> for the class Advanced Programming
Studies, as part of the National Diploma in Electronic and Software
Engineering we are studying towards at the Central Institute of Technology, 
Heretaunga, Wellington, New Zealand.

The package is hereby placed in the public domain, and may be used for any
purposes as long as the header information in the source file is retained.