Routing Raw TCP data has been an arising a question, This article will walk you through the steps to configure RAW TCP Data.
1. Create a Service for RouteTCP
To do that logon to the Policy manager and on the Bottom Left you will see you server name
Right click on your server name and “publish Web API”
2. Under Assertion palette search for “Route via Raw TCP” and drag it to ward the right of the screen
This will open up the properties window
Put in the IP address or FQDN of the back-end that you like the service to forward the packet to.
Put in the port number you like to use (any port number that is not being used by another service, in my example I have used 6500) Click OK.
3. Go to Tasks à Manager Listen Ports and create a new port
Call it RouteTCP
Port : 1036 (you can use any port number above 1025 here)
Click on the Advance Tab
Check the box for “Associate port with published service” and in the drop down menu select the server you just created “RouteTcp”
On the second drop down menu “application/octet-stream”
<Please see attached file for image>src="/servlet/servlet.FileDownload?file=0150c000004AKQrAAO" alt="rawtcp3.png" width="694" height="541">
<Please see attached file for image>src="/servlet/servlet.FileDownload?file=0150c000004AKQsAAO" alt="rawtcp4.png" width="694" height="541">
Configuration is now done on the Policy manager and now you need to test if the routing works.
For the test you can use the “Raw Tcp tester” tool available upon request from support.
1. Unzip the Raw tcp tester and copy the EchoClient.class on the client machine (where you will be sending the message from)
Note: There is a Readme file in there with the instructions that are described in details here as well.
2. Copy the EchoServer.class to the Server machine which will be receiving the message (the same server you have configured in the “Route via Raw TCP” Assertion in the policy manager)
3. Open a Command prompt on both the Client and Server machines and navigate to the folder the EchoClient.class and EchoServer.class files reside.
4. On the server Machine run the command: Java EchoServer PortNumber
Example: Java Echoserver 6500 (now the server is listening on port 6500 for any messages)
<Please see attached file for image>src="/servlet/servlet.FileDownload?file=0150c000004AKQtAAO" alt="rawtcp5.png" width="800" height="576">
5. Go to the client machine and run the command:
Java EchoClient ServerName PortNumber Message
Example: Java EchoClient Machine_Name1 1036 hello
<Please see attached file for image>src="/servlet/servlet.FileDownload?file=0150c000004AKQoAAO" alt="Rawtcp.png" width="547" height="281">
You should be able to see the message received: “Hello”
If you are getting the null message instead please look at the ssg log for further details.