Hi Hovanes,
On 05/21/2014 02:34 PM, Hovanes Egiyan wrote:
we are running multiple soft IOC-s on the same Linux host.
Right now each IOC is assigned a TCP port automatically since we do not set
the EPICS_CA_SERVER_PORT and EPICS_CAS_SERVER_PORT variables.
All these IOC-s are listening to UDP port 5064 and now we setup CA
clients to
look for CA channels using 5064 port and the the network broadcast address.
Another option, according to the manual, is to manually set the server
port #
using EPICS_CAS_SERVER_PORT variable, but that also seems change the
UDP port # for the name resolution for that IOC, which means that the
clients
will need to be setup to use UDP port # different from default. Looking
at the CA manual at
http://www.aps.anl.gov/epics/base/R3-14/8-docs/CAref.html
I did not find a way to set the TCP port manually using
EPICS_CAS_SERVER_PORT or
EPICS_CA_SERVER_PORT but keeping the UDP port number at 5064, similar to
what happens
when the TCP address is assigned automatically. But before giving up on
that idea, I would like to get confirmation from EPICS experts that I
did not miss it and such flexibility does not exist now.
We are using R3-14-12-3 EPICS base.
Why do you want to configure the server's TCP port number manually?
You are correct that for IOCs after the first one the TCP port numbers
used get assigned automatically, but the CA protocol is designed so the
clients don't need to know the TCP port number to be able to connect to
a server. The client is told which TCP port to connect to during the PV
search process when a server replies to a client's search request (which
normally goes through UDP).
There are situations where the fact that the server's UDP port number is
shared amongst all the IOCs on a host becomes a problem, and we have
workarounds for that on the wiki page at
https://wiki-ext.aps.anl.gov/epics/index.php/How_to_Configure_Channel_Access
If the issue is that you need to identify which IOC is using a
particular port number, there are various standard tools on Linux that
can do this for you. fuser is probably the simplest, but netstat and its
replacement ss can also do it.
Hope this helps,
- Andrew