EPICS Controls 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  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Accessing IOC on different subnet
From: "Bhavna N. Merh via Tech-talk" <[email protected]>
To: "Johnson, Andrew N." <[email protected]>
Cc: [email protected]
Date: Thu, 28 Nov 2019 17:22:41 +0530

Hi,

The reply to casr 1 is:

Channel Access Server V4.13
No clients connected.


Nothing beyond that.

-Bhavna


On 28-11-2019 00:01, Johnson, Andrew N. wrote:

Hi,

On 11/27/19 3:59 AM, Bhavna N. Merh via Tech-talk wrote:
For windows PC-

EPICS_CA_ADDR_LIST=192.168.1.25
EPICS_CA_AUTO_ADDR_LIST=NO
Is the IP address of the Windows PC 192.168.1.25 or 192.168.1.23? Your earlier email said:
B and C are on another subnet (IP addr: 192.168.1.23 and 192.168.1.25)
which I take to mean that B is 192.168.1.23 and C is 192.168.1.25. If that is the case, setting EPICS_CA_ADDR_LIST=192.168.1.25 on C tells it "only look for PVs on IOCs that are running on this PC". If the addresses of B and C on that subnet are actually the other way around, my addresses below are similarly wrong.

For CentOS PC-
EPICS_CA_ADDR_LIST: localhost
EPICS_CA_AUTO_ADDR_LIST: NO
EPICS_CAS_INTF_ADDR_LIST: localhost
EPICS_CAS_IGNORE_ADDR_LIST is undefined
An IOC running on the CentOS PC ("B") that has EPICS_CAS_INTF_ADDR_LIST set to localhost will only listen to CA clients also running on localhost (i.e. on the same machine). You can run the following command on the IOC to see what addresses the server is using. Your output probably looks like this, which is what I get by copying your setting:
epics> casr 1
Channel Access Server V4.13
No clients connected.
CAS-TCP server on 127.0.0.1:5064 with
    CAS-UDP unicast name server on 127.0.0.1:5064
    CAS-UDP broadcast name server on 127.0.0.1:5064
Sending CAS-beacons to 1 address:
    127.0.0.1:5065
That shows the CA server is only listening for PV searches on the internal-only network interface.

For the IOC to be accessible from other machines, it would need to look like this (by setting EPICS_CAS_INTF_ADDR_LIST="192.168.1.23"):
epics> casr 1
Channel Access Server V4.13
No clients connected.
CAS-TCP server on 192.168.1.23:5064 with
    CAS-UDP unicast name server on 192.168.1.23:5064
    CAS-UDP broadcast name server on 192.168.1.255:5064
Sending CAS-beacons to 1 address:
    192.168.1.255:5065

or this (by setting EPICS_CAS_INTF_ADDR_LIST="localhost 192.168.1.23"):
epics> casr 1
Channel Access Server V4.13
No clients connected.
CAS-TCP server on 127.0.0.1:5064 with
    CAS-UDP unicast name server on 127.0.0.1:5064
    CAS-UDP broadcast name server on 127.0.0.1:5064
CAS-TCP server on 192.168.1.23:5064 with
    CAS-UDP unicast name server on 192.168.1.23:5064
    CAS-UDP broadcast name server on 192.168.1.255:5064
Sending CAS-beacons to 2 addresses:
    127.0.0.1:5065
    192.168.1.255:5065

but with the simplest configuration (don't set EPICS_CAS_INTF_ADDR_LIST at all) it would look like this:
epics> casr 1
Channel Access Server V4.13
No clients connected.
CAS-TCP server on 0.0.0.0:5064 with
    CAS-UDP name server on 0.0.0.0:5064
Sending CAS-beacons to 2 addresses:
    192.168.1.255:5065
    192.168.0.255:5065
In this case it will listen for connections from every subnet that B has an interface to and will accept connections from clients running on any other machine in any of those subnets, as long as those clients actually send it search requests.

The simplest way to configure your client machines is to not set any of the EPICS_CA environment variables at all, in which case they will be able to connect to any IOC on their own subnet. If they need to connect to an IOC that is in a different subnet you would have to set EPICS_CA_ADDR_LIST to the IP address of that IOC, but I don't recommend setting EPICS_CA_AUTO_ADDR_LIST=NO as this prevents the Channel Access client library from using its interface discovery mechanism to find IOCs on the local subnets. You're telling it "I know exactly how my network is configured, follow my instructions exactly and don't try to be smart." If you don't really understand how to configure the settings properly it's much better to not set anything, just let the discovery mechanism work them out for you.

- Andrew

-Bhavna

On 27-11-2019 10:27, Mark Rivers wrote:
Hi Bhavna,

It seems to me that the setup you describe should work without setting
the EPICS environment variables at all. The IOC on B should make its
PVs available on both subnets.

At the IOC prompt on B type epicsPrtEnvParams and send the output. On
C type "set" and send the results for any environment variables
starting with EPICS.

Are the subnet masks all set correctly? It looks like they should be
255.255.255.0.

Mark


Sent from my iPhone

On Nov 26, 2019, at 9:22 PM, Bhavna N. Merh via Tech-talk <[email protected]> wrote:

I have a device (say A) and 2 PCs (B and C)

B a CentOS 7 PC  has 2 NICs. C is a windows 10 PC.

A and B are  on one subnet (IP addr of both respectively: 192.168.0.2 and 192.168.0.1)

B and C are on another subnet (IP addr: 192.168.1.23 and 192.168.1.25)

The IOC runs on B and gathers data from device A.

I am unable to access the PVs from C. caget says channel connection timeout. (All firewalls are disabled)

Suggest what to write in EPICS_CA_ADDR_LIST and where.


Bhavna N. Merh
Scientific Officer, Accelerator Control Systems Division
Raja Ramanna Centre for Advanced Technology
Indore, Madhya Pradesh, India -452013
Ph:(0731)248-8055
"Complexity comes for free, Simplicity you have to work for."

-- 
"

Replies:
Re: Accessing IOC on different subnet Mark Rivers via Tech-talk
Re: Accessing IOC on different subnet Johnson, Andrew N. via Tech-talk
References:
Accessing IOC on different subnet Bhavna N. Merh via Tech-talk
Re: Accessing IOC on different subnet Mark Rivers via Tech-talk
Re: Accessing IOC on different subnet Bhavna N. Merh via Tech-talk
Re: Accessing IOC on different subnet Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Re: Accessing IOC on different subnet Johnson, Andrew N. via Tech-talk
Next: pvaClientCPP Release 4.5.0 access to a single sub field that has the correct type Heinz Junkes via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Accessing IOC on different subnet Johnson, Andrew N. via Tech-talk
Next: Re: Accessing IOC on different subnet Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  2021  2022  2023  2024 
ANJ, 28 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·