RSRV Configuration Test Plan

From EPICSWIKI
Revision as of 20:53, 23 January 2016 by MichaelDavidsaver (talk | contribs)

Scope

This document describes some of the possible network configurations for RSRV and the expected results with the RSRV interface binding changes https://code.launchpad.net/~epics-core/epics-base/rsrvbindiface.

The expected results are given as the output various IOC shell commands (eg. epicsParamShow/casr/dbcar).

Note that the output of dbcar "" 8 is quite verbose. Searching for the string Search Destination List in the output is suggested.

Preparation

This testing should be done on a computer with more than one physical/virtual network interface in additional to the loopback.

On Linux additional tun/tap virtual interfaces can easily be added. In the following examples the addresses 10.5.1.1 and 10.5.2.1 name two such interfacess. Additional interfaces may be present.

ip tuntap add dev tap0 mode tap
ip addr add 10.5.1.1/24 dev tap0
ip tuntap add dev tap1 mode tap
ip addr add 10.5.2.1/24 dev tap1

These can later be removed

ip tuntap del dev tap0 mode tap
ip tuntap del dev tap1 mode tap

Test IOC

In addition to inspecting the output of the iocsh commands, it is recommended to test a live softIoc.

cat << EOF > test.db
record(calc, "test") {
    field(SCAN, "1 second")
    field(INPA, "test")
    field(CALC, "A+1")
    field(FLNK, "invalid")
}

Each Test section includes an example invokation of softIoc and several caget.

Tests

Test #1 Defaults

The default configuration is for RSRV is to bind to the wildcard interface (0.0.0.0), and for libca to search on all local interfaces.

./bin/linux-x86/softIoc -d test.db

Client gets should work.

./bin/linux-x86/caget test

A warning "Identical process variable names on multiple servers" should be seen.

epicsParamShow

EPICS_CA_ADDR_LIST is undefined
EPICS_CA_AUTO_ADDR_LIST: YES
EPICS_CA_NAME_SERVERS is undefined
EPICS_CAS_INTF_ADDR_LIST is undefined
EPICS_CAS_AUTO_BEACON_ADDR_LIST is undefined
EPICS_CAS_BEACON_ADDR_LIST is undefined


casr 2

Server interface 0.0.0.0:5064
 UDP receiver 1 0.0.0.0:5064
Beacon destination 10.5.1.255:5065
Beacon destination 10.5.2.255:5065
... one for remaining local interfaces
...

dbcar "" 8

...
Search Destination List with 4 items
UDP Search destination "10.5.1.255:5064"
UDP Search destination "10.5.2.255:5064"
... one for remaining local interfaces
...

Test #2 Client address list only

Bind the server to the wildcard address. Client searches only on a sub-set of interfaces.

EPICS_CA_ADDR_LIST=10.5.1.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/softIoc -d test.db

Client gets should work on either interface.

EPICS_CA_ADDR_LIST=10.5.1.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/caget test
EPICS_CA_ADDR_LIST=10.5.2.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/caget test

epicsParamShow

EPICS_CA_ADDR_LIST: 10.5.1.255
EPICS_CA_AUTO_ADDR_LIST: NO
EPICS_CA_NAME_SERVERS is undefined
EPICS_CAS_INTF_ADDR_LIST is undefined
EPICS_CAS_AUTO_BEACON_ADDR_LIST is undefined
EPICS_CAS_BEACON_ADDR_LIST is undefined

casr 2

Server interface 0.0.0.0:5064
 UDP receiver 1 0.0.0.0:5064
Beacon destination 10.5.1.255:5065
... no more destinations
...

dbcar "" 8

...
Search Destination List with 1 items
UDP Search destination "10.5.1.255:5064"
... No more destinations
...

Test #3 Client and Server on a single interface

RSRV binds to a single interface, and libca only searches on this interface.

EPICS_CAS_INTF_ADDR_LIST=10.5.1.1 \
EPICS_CA_ADDR_LIST=10.5.1.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/softIoc -d test.db

Client gets should work only when the 10.5.1.255 interface.

EPICS_CA_ADDR_LIST=10.5.1.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/caget test

and fail on any other interface

EPICS_CA_ADDR_LIST=10.5.2.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/caget test

epicsParamShow

EPICS_CA_ADDR_LIST: 10.5.1.255
EPICS_CA_AUTO_ADDR_LIST: NO
EPICS_CA_NAME_SERVERS is undefined
EPICS_CAS_INTF_ADDR_LIST: 10.5.1.1
EPICS_CAS_AUTO_BEACON_ADDR_LIST is undefined
EPICS_CAS_BEACON_ADDR_LIST is undefined

casr 2

Server interface 10.5.1.1:5064
 UDP receiver 1 10.5.1.1:5064
 UDP receiver 2 10.5.1.255:5064
Beacon destination 10.5.1.255:5065
... no other destinations
...

Note that "UDP receiver 2" will not be present for Windows targets as it is *nix specific.

dbcar "" 8

...
Search Destination List with 1 items
UDP Search destination "10.5.1.255:5064"
... No more destinations
...

Test #4 Client and Server on a multiple interfaces

RSRV binds to two interfaces, and libca only searches on these interfaces.

EPICS_CAS_INTF_ADDR_LIST="10.5.1.1 10.5.2.1" \
EPICS_CA_ADDR_LIST="10.5.1.255 10.5.2.255" \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/softIoc -d test.db

Client gets should work only when the 10.5.1.255 and 10.5.2.255 interfaces, and fail on any others.

EPICS_CA_ADDR_LIST=10.5.1.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/caget test
EPICS_CA_ADDR_LIST=10.5.2.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/caget test

epicsParamShow

EPICS_CA_ADDR_LIST: 10.5.1.255 10.5.2.255
EPICS_CA_AUTO_ADDR_LIST: NO
EPICS_CA_NAME_SERVERS is undefined
EPICS_CAS_INTF_ADDR_LIST: 10.5.1.1 10.5.2.1
EPICS_CAS_AUTO_BEACON_ADDR_LIST is undefined
EPICS_CAS_BEACON_ADDR_LIST is undefined

casr 2

Server interface 10.5.1.1:5064
 UDP receiver 1 10.5.1.1:5064
 UDP receiver 2 10.5.1.255:5064
Server interface 10.5.2.1:5064
 UDP receiver 1 10.5.2.1:5064
 UDP receiver 2 10.5.2.255:5064
Beacon destination 10.5.1.255:5065
Beacon destination 10.5.2.255:5065
... no other destinations
...

Note that "UDP receiver 2" will not be present for Windows targets as it is *nix specific.

dbcar "" 8

...
Search Destination List with 2 items
UDP Search destination "10.5.1.255:5064"
UDP Search destination "10.5.2.255:5064"
... No more destinations
...

Test #5 Client and Server on different, single, interfaces

RSRV binds to one interface, and libca only searches on another interface. This is a "gateway"-like situation.

EPICS_CAS_INTF_ADDR_LIST=10.5.1.1 \
EPICS_CA_ADDR_LIST=10.5.2.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/softIoc -d test.db

Client gets should work only when the 10.5.1.255 interface.

EPICS_CA_ADDR_LIST=10.5.1.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/caget test

and fail on any other interface

EPICS_CA_ADDR_LIST=10.5.2.255 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/caget test

Additionally, the IOC's CA client will only search on 10.5.2.255.

epicsParamShow

EPICS_CA_ADDR_LIST: 10.5.2.255
EPICS_CA_AUTO_ADDR_LIST: NO
EPICS_CA_NAME_SERVERS is undefined
EPICS_CAS_INTF_ADDR_LIST: 10.5.1.1
EPICS_CAS_AUTO_BEACON_ADDR_LIST is undefined
EPICS_CAS_BEACON_ADDR_LIST is undefined

casr 2

Server interface 10.5.1.1:5064
 UDP receiver 1 10.5.1.1:5064
 UDP receiver 2 10.5.1.255:5064
Beacon destination 10.5.2.255:5065
... no other destinations
...

Note that "UDP receiver 2" will not be present for Windows targets as it is *nix specific.

dbcar "" 8

...
Search Destination List with 1 items
UDP Search destination "10.5.2.255:5064"
... No more destinations
...

Test #6 IPv4 Multicast for search and beacons

Server bound to wildcard, and client searches only with multicast. In addtional a multicast address is specified for name search and beacon messages.

EPICS_CAS_INTF_ADDR_LIST=224.0.2.9 \
EPICS_CA_ADDR_LIST=224.0.2.9 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/softIoc -d test.db

Client searches using multicast will succeed.

EPICS_CA_ADDR_LIST=224.0.2.9 \
EPICS_CA_AUTO_ADDR_LIST=NO \
./bin/linux-x86/caget test

Searches not using multicast will fail.

./bin/linux-x86/caget test

epicsParamShow

EPICS_CA_ADDR_LIST: 224.0.2.9
EPICS_CA_AUTO_ADDR_LIST: NO
EPICS_CA_NAME_SERVERS is undefined
EPICS_CAS_INTF_ADDR_LIST: 224.0.2.9
EPICS_CAS_AUTO_BEACON_ADDR_LIST is undefined
EPICS_CAS_BEACON_ADDR_LIST is undefined


casr 2

Server interface 0.0.0.0:5064
 UDP receiver 1 0.0.0.0:5064
MCast destination 224.0.2.9:5064
Beacon destination 224.0.2.9:5065
... no destinations for local interfaces
...

dbcar "" 8

...
Search Destination List with 1 items
... no destinations for local interfaces
UDP Search destination "224.0.2.9:5064"
...