Difference between revisions of "RSRV Configuration Test Plan"
(Update for improved casr output.) |
(fix usage of 'ip addr' to set the broadcast address) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
In the following examples the addresses ''10.5.1.1'' and ''10.5.2.1'' name two such interfacess. | In the following examples the addresses ''10.5.1.1'' and ''10.5.2.1'' name two such interfacess. | ||
Additional interfaces may be present. | Additional interfaces may be present. | ||
Using tunctl/ifconfig | |||
<pre>tunctl -t tap0 | |||
ifconfig tap0 10.5.1.1/24 up | |||
tunctl -t tap1 | |||
ifconfig tap1 10.5.2.1/24 up</pre> | |||
or using 'ip' | |||
<pre>ip tuntap add dev tap0 mode tap | <pre>ip tuntap add dev tap0 mode tap | ||
ip addr add 10.5.1.1/24 dev tap0 | ip addr add 10.5.1.1/24 broadcast 10.5.1.255 dev tap0 | ||
ip tuntap add dev tap1 mode tap | ip tuntap add dev tap1 mode tap | ||
ip addr add 10.5.2.1/24 dev tap1</pre> | ip addr add 10.5.2.1/24 broadcast 10.5.2.255 dev tap1</pre> | ||
These can later be removed | These can later be removed | ||
<pre>tunctl -d tap0 | |||
tunctl -d tap1</pre> | |||
or | |||
<pre>ip tuntap del dev tap0 mode tap | <pre>ip tuntap del dev tap0 mode tap | ||
Line 121: | Line 135: | ||
CAS-TCP server on 0.0.0.0:5064 with | CAS-TCP server on 0.0.0.0:5064 with | ||
CAS-UDP name server on 0.0.0.0:5064 | CAS-UDP name server on 0.0.0.0:5064 | ||
Sending CAS-beacons to | Sending CAS-beacons to 4 addresses: | ||
10.5.1.255:5065 | 10.5.1.255:5065 | ||
10.5.2.255:5065 | |||
127.255.255.255:5065 | |||
<local address>:5065 | |||
</pre> | </pre> | ||
=== dbcar "" 8 === | === dbcar "" 8 === | ||
Line 300: | Line 316: | ||
./bin/linux-x86/softIoc -d test.db</pre> | ./bin/linux-x86/softIoc -d test.db</pre> | ||
Client searches using multicast will succeed. | Client searches using the specified multicast address will succeed. | ||
<pre>EPICS_CA_ADDR_LIST=224.0.2.9 \ | <pre>EPICS_CA_ADDR_LIST=224.0.2.9 \ | ||
Line 306: | Line 322: | ||
./bin/linux-x86/caget test</pre> | ./bin/linux-x86/caget test</pre> | ||
Searches | Searches using other multicast addresses will fail. | ||
<pre>./bin/linux-x86/caget test</pre> | <pre>EPICS_CA_ADDR_LIST=224.0.2.10 \ | ||
EPICS_CA_AUTO_ADDR_LIST=NO \ | |||
./bin/linux-x86/caget test</pre> | |||
=== epicsParamShow === | === epicsParamShow === | ||
Line 328: | Line 345: | ||
Monitoring 1 multicast address: | Monitoring 1 multicast address: | ||
224.0.2.9:5064 | 224.0.2.9:5064 | ||
Sending CAS-beacons to 1 | Sending CAS-beacons to 4 addresses: | ||
10.5.1.255:5065 | |||
10.5.2.255:5065 | |||
127.255.255.255:5065 | |||
<local address>:5065 | |||
</pre> | </pre> | ||
Latest revision as of 20:44, 16 February 2016
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.
Using tunctl/ifconfig
tunctl -t tap0 ifconfig tap0 10.5.1.1/24 up tunctl -t tap1 ifconfig tap1 10.5.2.1/24 up
or using 'ip'
ip tuntap add dev tap0 mode tap ip addr add 10.5.1.1/24 broadcast 10.5.1.255 dev tap0 ip tuntap add dev tap1 mode tap ip addr add 10.5.2.1/24 broadcast 10.5.2.255 dev tap1
These can later be removed
tunctl -d tap0 tunctl -d tap1
or
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(CALC, "VAL+1") field(FLNK, "invalid") } EOF
Each Test section includes an example invocation 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 1
... CAS-TCP server on 0.0.0.0:5064 with CAS-UDP name server on 0.0.0.0:5064 Sending CAS-beacons to 4 addresses: 10.5.1.255:5065 10.5.2.255:5065 127.255.255.255:5065 <local address>:5065
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 1
... CAS-TCP server on 0.0.0.0:5064 with CAS-UDP name server on 0.0.0.0:5064 Sending CAS-beacons to 4 addresses: 10.5.1.255:5065 10.5.2.255:5065 127.255.255.255:5065 <local address>:5065
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 1
... CAS-TCP server on 10.5.1.1:5064 with CAS-UDP unicast name server on 10.5.1.1:5064 CAS-UDP broadcast name server on 10.5.1.255:5064 Sending CAS-beacons to 1 address: 10.5.1.255:5065
Note that on Windows targets only one CAS-UDP name server address will be listed.
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 1
... CAS-TCP server on 10.5.1.1:5064 with CAS-UDP unicast name server on 10.5.1.1:5064 CAS-UDP broadcast name server on 10.5.1.255:5064 CAS-TCP server on 10.5.2.1:5064 with CAS-UDP unicast name server on 10.5.2.1:5064 CAS-UDP broadcast name server on 10.5.2.255:5064 Sending CAS-beacons to 2 addresses: 10.5.1.255:5065 10.5.2.255:5065
Note that on Windows targets only one CAS-UDP name server address will be listed.
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 1
... CAS-TCP server on 10.5.1.1:5064 with CAS-UDP unicast name server on 10.5.1.1:5064 CAS-UDP broadcast name server on 10.5.1.255:5064 Sending CAS-beacons to 1 address: 10.5.1.255:5065
Note that on Windows targets only one CAS-UDP name server address will be listed.
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. Searches and beacons 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 the specified multicast address will succeed.
EPICS_CA_ADDR_LIST=224.0.2.9 \ EPICS_CA_AUTO_ADDR_LIST=NO \ ./bin/linux-x86/caget test
Searches using other multicast addresses will fail.
EPICS_CA_ADDR_LIST=224.0.2.10 \ EPICS_CA_AUTO_ADDR_LIST=NO \ ./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 1
... CAS-TCP server on 0.0.0.0:5064 with CAS-UDP name server on 0.0.0.0:5064 Monitoring 1 multicast address: 224.0.2.9:5064 Sending CAS-beacons to 4 addresses: 10.5.1.255:5065 10.5.2.255:5065 127.255.255.255:5065 <local address>:5065
dbcar "" 8
... Search Destination List with 1 items ... no destinations for local interfaces UDP Search destination "224.0.2.9:5064" ...