CA API Management: How to Route Data Via Raw TCP

Document ID : KB000004884
Last Modified Date : 14/02/2018
Show Technical Document Details

Routing Raw TCP data has been an arising a question, This article will walk you through the steps to configure RAW TCP Data.



Gateway is installed on the Linux / Unix serverPolicy Manager is installed on the Windows machine.The RAW TCP Tester (client and server) both can be installed on the window machine.

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

Protocol: l7.raw.tcp

Port : 1036 (you can use any port number above 1025 here)

Interface: All

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”




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)


5. Go to the client machine and run the command:

Java EchoClient ServerName PortNumber Message

Example: Java EchoClient Machine_Name1 1036 hello



 You should be able to see the message received: “Hello”



Additional Information:

If you are getting the null message instead please look at the ssg log for further details.