The following example shows a standard configuration of the SAProuter for using reverse invoke.
Here both the RI client and the RI server are SAProuters.
The client SAProuter has opened external port 4001. The client SAProuter accepts connection requests through this port, which it then forwards to the server SAProuter. An RI connection should be opened between the two SAProuters.
The table below shows how the two SAProuters have to be configured for this.
Configuration Task |
Client |
Server |
---|---|---|
Start command |
saprouter -i c f1 -S 4001 -R rt1 |
saprouter -i c f2 -S 4002 -R rt2 |
Configuration file name |
cf1 |
cf2 |
Content of the configuration file |
client = true client_service = 5001 |
server = true client_hostname = 10.18.0.1 client_service = 5001 reg_service = 5002 |
Content of the saprouttab (Route Permission Table) |
P * 10.18.0.2 5002 |
P 10.18.0.1 * * |
The following route can be used to connect across the two SAProuters:
/H/10.18.0.1/S/4001/H/10.18.0.2/S/5002/H/<dest host>/S/<dest service>
For more information about the SAProuter status, call saprouter -l. In this example the output from the call would look like:
> saprouter -l -S 4001 ID CLIENT | PARTNER service -----------------------------+--------------------------------- 4 localhost | (no partner) 2 <client host> | 10.18.0.2 5002 RI client hdl 1/sock 5 listen on 5001 exclusive YES srv no 1 (max 1) srv ID 0 connPool 3 ACL size 0 - waiting list (next ID=0001300000000000) first (nil) last (nil) - server [0] sock 6/10.18.0.2 reg port 5002 reg addrs 1 [00] 10.18.0.2 conns 3 (next 1) CONN ID H SOCK 0: 0001204ce19c4d1a 9 10.21.72.60:47053 1: 00010039a6dee4c1 10 10.21.72.60:47049 2: 000110b020d9a160 8 10.21.72.60:47051 |
> saprouter -l -S 4002 ... ID CLIENT | PARTNER service -----------------------------+--------------------------------- 4 localhost | (no partner) 2 10.18.0.1 | <dest host> <dest service> ... RI server hdl 1/sock 5 BUFFERED client 10.18.0.1:5001 registered 0.0.0.0:5002 connPool 3 checks 0 selectSet set0 onDemand NO CONN ID S SOCK 0: 0001204ce19c4d1a C 8 1: 00010039a6dee4c1 C 6 2: 000110b020d9a160 C 7 |
Route String Entry for SAProuter
Option -l / -L