| 1 | = Controlled eXternal Access = |
| 2 | |
| 3 | This note attempts to give some information for using |
| 4 | the new Controlled eXternal Access sytem (CXA). |
| 5 | |
| 6 | CXA attempts to be backwards compatible with experiments created under |
| 7 | the previous Risky Experiment mechanism, but gives some additional capabilites. |
| 8 | |
| 9 | == Dynamic modification/access == |
| 10 | |
| 11 | If you have an an existing experiment, and you want to grant it external access, you can do so , even if it is already swapped in, without restarting the experiment. |
| 12 | |
| 13 | You use a web page {{{https://<testbed>/expcxa.php?pid=<pid>&eid=<eid>}}} and fill out the same form that is used by the "Make Experiment Risky" page, parsed with almost the same rules. |
| 14 | |
| 15 | For '''Outside nodes''' - triples <dotted quad>/<port>/<proto>, |
| 16 | It is now permitted to specify a host of 0.0.0.0 (meaning any IP address), |
| 17 | and/or a port number of 0, (meaning any port). |
| 18 | |
| 19 | In the future, but not now, we would like to have the host part be |
| 20 | regular DNS names, or to allow the use of commas as separators instead |
| 21 | of slashes so that the hostpart could be an IP subnet. |
| 22 | |
| 23 | There is also a bug that you have to click the check the box |
| 24 | for "Experiment need outside connetctivity" even if you've already |
| 25 | granted it. |
| 26 | |
| 27 | If your experiment already has specified nodes with external |
| 28 | connectivity in its ns file, it will issue commands to reconfigure |
| 29 | the '''LAST''' external node in your nsfile, instead of the shared gateway, |
| 30 | if the node is running some flavor of BSD; otherwise it just |
| 31 | modifies the risky experiment tables in the database. |
| 32 | |
| 33 | == NS file extensions for shared external access == |
| 34 | |
| 35 | We have made a minor change to the parsing of the ns extension |
| 36 | |
| 37 | {{{ |
| 38 | tb-allow-external $node [<cookietype> [key1 value1] [key 2 value2] .... ] |
| 39 | }}} |
| 40 | |
| 41 | if the cookieype is "shared", then only the keyN valueN pairs will |
| 42 | be entered in virt parameters table, and no pseudonode with vname |
| 43 | external_ipaddr<N> will be requested by the experiment. |
| 44 | |
| 45 | The CXA backend will examine the virtual parameters whenever an |
| 46 | an ns file is (re-)parsed and will (re-)initialize the risky experiment |
| 47 | table entries for the experiment based on the values for two |
| 48 | keys, namely "nat" and "rdr". |
| 49 | |
| 50 | The values are a quoted string of whitespace separated targets, |
| 51 | such as the slash delimited triples that can be entered in section 1 |
| 52 | above. |
| 53 | |
| 54 | Alterations made by the webpage above persist only until |
| 55 | modifyexp or endexp is run on the testbed. |
| 56 | |
| 57 | We allow some abbreviations for convience. |
| 58 | |
| 59 | For "rdr" targets, one may use triples as in the web page. |
| 60 | |
| 61 | For pairs, the target is interpreted as be <port>/<proto>, |
| 62 | and the node part is assumed to be the node specified |
| 63 | in the tb-allow-external call. |
| 64 | |
| 65 | For singletons, it is assumed to be <port> which the <proto> |
| 66 | defaulting to tcp. |
| 67 | |
| 68 | For "nat" targets, one may use triples as in the web page. |
| 69 | |
| 70 | Pairs are interpreted as <host>/<port>, the proto defaulted to tcp. |
| 71 | and singletons, it is assumed to be <host> which the <proto> |
| 72 | defaulting to tcp and the <port> default to 0 meaning all ports. |
| 73 | |
| 74 | == DNS stuff == |
| 75 | |
| 76 | In the interest of backwards compatibility, even when using "shared" |
| 77 | external access there will still be a CNAME created for each |
| 78 | node named with a tb-allow-external call. The value will be the |
| 79 | IP address of the shared NAT box. |
| 80 | |
| 81 | Additionally, any nodes designated as targets of inbound |
| 82 | redirects will also have CNAMEs created for them, whether or not |
| 83 | the targets were created dynamically via a web page, or statically |
| 84 | in the NS file. If all targets for a node specified in the NS file |
| 85 | were removed via the web, then no CNAME will be generated. |