2.3. Quick Start and Test of the Message Switch

To quickly get the Message Switch software running and tested, perform the following steps:

Note: You need a Freeway server and another test machine (referred to as Machine "A") which is connected to the same IP network as Freeway. Machine "A" must be capable of compiling and running the apinull.c test program, which uses sockets to read and write packets to the IP network.

Note: At any time, executing the "switchLogOn" command at the Freeway command shell turns on logging of all messages switched by the Message Switch. The "switchLogOff" command turns the logging off.

  1. Copy the three Message Switch object files (sw486.o, sw68k.o, and swppc.o) to your Freeway boot directory.

  2. Copy the example Message Switch configuration files (bootcfg.sw, switch.cfg, swdcfg, and swtcfg) to your Freeway boot directory.

  3. Change each occurrence of the string "192.168.135.22" in the file bootcfg.sw to the IP address of machine "A".

  4. Add a default route line to the bootcfg.sw file. For example:

                  route_add = 0.0.0.0 192.168.135.22
               
    
  5. Boot the Freeway, being sure that the boot parameters in your Freeway boot directory specify

                  Configuration File Name : bootcfg.sw
               
    
  6. Notice a lot of configuration and status messages produced by the Message Switch immediately after the "FREEWAY SYSTEM ONLINE" message appears. The final message should say:

             "STATUS:  All Message Switch sessions ready."
               
    
  7. Copy the Message Switch test program and build script to machine "A". These are the two files "makeapi" and "apinull.c", in the freeway/client/test/switch/ directory.

  8. Change each occurrence of the string "192.168.135.1" in the file apinull.c to the IP address of your Freeway.

  9. Execute the test program build script on the test machine (machine "A"). For example, if it is a UNIX machine, type "./makeapi". This builds four programs: "apinull0", "apinull1", "apinull2", and "apinull3", which will send/receive packets to the Freeway icp1port0 through icp1port3.

  10. On machine "A", run the apinull0 program. This sends a small packet to the icp1port0 device on the Freeway, which the Message Switch receives and returns (via icp1port0) directly back to the apinull0 program. Section A.8.1 shows the switch.cfg file specifications.

  11. On machine "A", run the apinull1 program. This sends a small packet to the icp1port1 device on Freeway, which the Message Switch receives and sends to several other places (as specified in the switch.cfg file), in addition to returning it (via icp1port1) directly back to the apinull1 program. Section A.8.2 shows the switch.cfg file specifications.

  12. On machine "A", run the apinull2 program. This sends a small packet to the icp1port2 device on Freeway, which the Message Switch receives and sends through the icp2/icp3 connection (as specified in the bootcfg.sw and the switch.cfg files). When it receives the message packet (from icp3), it sends it (via icp1port2) to the apinull2 program. Section A.8.3 shows the switch.cfg file specifications.

To test the TCP/IP listening capabilities of the Message Switch and Freeway (see also Section A.8.5):

  1. Open three separate terminal (xterm) windows.

  2. In the first window, telnet to port 13824 of Freeway. For example, "telnet freeway0 13824". If you have previously run the apinull1 test program, this telnet window will immediately receive the string "abcdefghijklmnopqrstuvwxyz".

  3. In the second window, telnet to port 13825 of Freeway. For example, "telnet freeway0 13825". If you have previously run the apinull1 test program, this telnet window will immediately receive the string "abcdefghijklmnopqrstuvwxyz".

  4. In the third window, telnet to port 13826 of Freeway. For example, "telnet freeway0 13826". This telnet window will not receive data immediately, unless you have typed any characters in the first or second telnet sessions.

  5. Type "telnet 1" in the first telnet window, followed by a carriage return. This string should be received by both of the other two telnet sessions.

  6. Type "telnet 2" in the second telnet window, followed by a carriage return. This string should be received only by the telnet session in the first window.

To test the TCP/IP connecting capabilities of the Message Switch and Freeway (see also Section A.8.6):

  1. Copy the ICP_IP loopback test program and build script to a separate directory in machine "A". These are the two files "makeloop" and "loopback.c" in the freeway/client/test/iploop directory.

  2. Execute the loopback program build script on machine "A". For example, if it is a UNIX machine, type "./makeloop". This builds 12 programs:

                     tcploop2110    tcploop2112    tcploop2114 
                     tcploop2120    tcploop2122    tcploop2124 
                     udploop2130    udploop2132    udploop2134 
                     mcastloop2140  mcastloop2142  mcastloop2144
            

  3. On machine "A", run the tcploop2120 program. This opens two listening TCP sockets to which Freeway can connect. After a minute or two (you must wait until Freeway retries to connect), you should see the tcploop2120 program report "sockA and sockB ready".

  4. Open two separate terminal (xterm) windows.

  5. In the first window, telnet to port 13828 of Freeway. For example, "telnet freeway0 13828".

  6. In the second window, telnet to port 13829 of Freeway. For example, "telnet freeway0 13829". If you have previously run the "apinull1" test program, this telnet window may immediately receive the string "abcdefghijklmnopqrstuvwxyz".

  7. Type "telnet 3" in the first telnet window, followed by a carriage return. This string should be received by the telnet session in the second window.

  8. Type "telnet 4" in the second telnet window, followed by a carriage return. This string should be received by the telnet session in the first window.

If you have an ICP board in your Freeway, and can load it with a protocol, you can also:

  1. Uncomment (and modify, if necessary) the lines in bootcfg.sw which define icp0 (Figure B-1).

  2. Uncomment the lines at the end of switch.cfg which specify a switch connection between icp1port3 and icp0port2/3 (Section A.8.4).

  3. Install a loopback cable between port2 and port3 of icp0.

  4. If necessary, modify the definitions of the icp0port2 and icp0port3 sections of the swdcfg configuration file to match the protocol and type of loopback cable you have (internal/external clocking, etc.).

  5. Reboot your Freeway.

  6. On machine "A", run the apinull3 program. This will send a small packet to the icp1port3 device on Freeway, which the Message Switch receives and sends to icp0port2. The loopback cable causes the message to arrive at icp0port3, where the Message Switch receives it and sends it (via icp1port3) back to the apinull3 program. Section A.8.4 shows the switch.cfg file specifications.

If you have an ICP_IP protocol module [such as Simpact's Translator for FMP (TFM) product] you can also:

  1. Uncomment (and modify, if necessary) the line toward the end of bootcfg.sw which loads your protocol translator module (see Figure B-1). For example,

                  "sra_module = ipfmp486.o"
               
    
  2. Change the lines which specify ipnull in the bootcfg.sw file to specify your protocol module for icp2 and icp3, and/or in icp4 and icp5 (see Figure B-1). If you have the TFM product you would change the lines to (for example):

             "internal_protocol = ipfmp"
               
    
  3. Reboot Freeway.

  4. Test with the appropriate protocol loopback program (for example, for the ipfmp protocol module you could test loopbacks on icp2port0 and icp2port1 with the fmpalp test program).

To test sending and receiving of multicast packets, you can also:

  1. If your Freeway has more than one ethernet interface (you have uncommented and modified the "added_interface_xxx" lines at the end of bootcfg.sw), you may also have to add a "route_add" line to the bootcfg.sw file, to specify which interface the multicast packets should be sent through (as in the commented-out route_add example toward the end of bootcfg.sw). See Figure B-1.

  2. Uncomment the two lines in switch.cfg which specify a link between icp5port0 and icp5port1 (see Section A.8.2).

  3. Change the three lines in switch.cfg which specify the link between icp1port2 and the icp2/icp3 connection to use the icp4/icp5 connection instead (a commented-out example is shown in that file; you can simply comment-out the icp2/icp3 lines, and uncomment the icp4/icp5 lines). (see Section A.8.3).

  4. Reboot Freeway.

  5. On machine "A", run the apinull2 test program to test the icp4/icp5 connection (which uses multicast). Section A.8.3 shows the switch.cfg file specifications.

  6. If you are using a protocol module other than ipnull, you can also test with the appropriate protocol loopback program on icp4port0 and icp4port1, as in test step 36 above. It may be necessary to modify the loopback test program to allow use of icp4, and to add definitions for icp4port0 and icp4port1 to the loopback test program's DLI configuration file.