Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: TCP and UDP port numbers fr multiple IOCs
From: Hovanes Egiyan <hovanes.egiyan@gmail.com>
To: Andrew Johnson <anj@aps.anl.gov>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Wed, 21 May 2014 18:19:40 -0400
Hi Andrew,

Thanks for the response, using the network broadcast address for UDP works fine for our IOCs.

The PVs from these softIOCs need to be accessed from another network in our lab that
happens to be behind a firewall for security reasons. If we can assign
the TCP address manually then the network administrator only needs to open
a dozen (or two) predefined port #s between the two different firewalled networks, otherwise we apparently need to have the whole ephemeral port # range open between the networks , which is a possibility too. There was a similar question back in 2008 according to techtalk, and it seemed that such a thing might get implemented, but I do not
think the EPICS base version we are using has that capability yet.

Hovanes.


On 05/21/2014 05:51 PM, Andrew Johnson wrote:
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


Replies:
Re: TCP and UDP port numbers fr multiple IOCs Andrew Johnson
References:
TCP and UDP port numbers fr multiple IOCs Hovanes Egiyan
Re: TCP and UDP port numbers fr multiple IOCs Andrew Johnson

Navigate by Date:
Prev: Re: TCP and UDP port numbers fr multiple IOCs Andrew Johnson
Next: Re: TCP and UDP port numbers fr multiple IOCs Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: TCP and UDP port numbers fr multiple IOCs Andrew Johnson
Next: Re: TCP and UDP port numbers fr multiple IOCs Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·