Skip to content

Running XIA

Dan Barrett edited this page Jan 9, 2018 · 27 revisions

Table of Contents

TODOs

TODO: fill in the multihomed and rendezvous sections

TODO: Flesh out the 4ID section (should we expose this right now?)

Online Documentation

This WIKI is the main source of documentation for using XIA.

Research papers related to XIA are available on the XIA home page.

Technical documentation for the XIA APIs is available on the net, but more up-to-date API documents and man pages for the XIA system utilities can be generated locally on XIA nodes. See the Generate Documentation section for instructions.

Build Your Nodes

Build XIA on each of the nodes in your network.

Build Your Network

NOTE: The main XIA source branches do not support multiple routers per AD. See the experimental V2 Routing section for information on using the new code.

Example Network

The network pictured below will be used for this discussion.

NOTE: GENI users can use this prebuilt rspec to create the example network. It uses a preconfigured disk image that contains all of the necessary dependencies to build XIA (libxml2-dev must still be installed).

Network Interfaces

Host0

  • ens33 --- Router0:ens33
Router0
  • ens33 --- Host0:ens33
  • ens34 --- Router1:ens33
Router1
  • ens33 --- Router0:ens34
  • ens34 --- Router2:ens33
Router2
  • ens33 --- Router1:ens33
  • ens34 --- Server0:ens33
  • ens39 --- Server1:ens33
Server0
  • ens33 --- Router2:ens34
Server1
  • ens33 --- Router2:ens39

Initial Setup

The first time the network is run, nodes should be started as described below. After this has been done, nodes can be started and stopped in any order. The XIANET script is used to start and stop XIA on each node in the network. The basic command line options are shown below, but there are a number of more advanced options available. See the Advanced Configurations section or the XIANET man page for more information.

At the completion of these steps a unique AD will be generated for each of the 3 routers/domains. A unique HID will be generated for each of the routers and hosts. And a unique SID will be generated for the name server. Each of these identifiers is a 160 bit hash of a public/private keypair. The associated keys are stored in the keys directory. These IDs will persist across reboots unless xianet is run with the clean command. Network interface configurations also persist, and the node must be cleaned and restarted to generate new configuration files matching the new interfaces.

1. Select a router to host the XIA nameserver. There can be only one name server on the network. For this example we will use Router1.

2. Start XIA and associated daemons on Router1 with the following command.

bin/xianet -r -n start
Router1 generates local configuration files including etc/resolv.conf and starts click, the name server, a routing daemon, and a network joining daemon.
3. Copy the file xia-core/etc/resolv.conf to Router0 and Router2.
NOTE: If xianet clean is run on the router hosting the name server, once it has been restarted the resolv.conf file must be copied to the other routers again. This is due to the fact that the keys have been deleted, and new keys and thus a new AD and HID will be generated for this node.
4. Start XIA on Router0 and Router2.
bin/xianet -r start
Router0 and Router2 do the same things as Router1 except that they do not run an instance of the name server and must have a copy of resolv.conf in order to start.
5. Start XIA on Host0, Server0, and Server1.
bin/xianet -t start
Host0, Server0, and Server1 generate local configuration files and are started as host nodes, with click and a network joining daemon active.
6. Create etc/hosts.xia. (optional) Although not needed for normal XIA network operation, it can be useful to create hosts.xia. It is mainly used with the xping and xtraceroute utilities.
  • Manual Method
    • Run the command xdag on each node. Output similar to the following will be generated.
host0 RE AD:376218ce2fd1179004ce04d76c4eedc3cf7b7f0d HID:ea9e1196d2aa8d0c2984602ff50dbebf7908e4d0
    • Copy and paste the output from each node into etc/hosts.xia and distribute it across the network.
  • Automated Method
    • Requirements
      • XIA is installed in the same location on each node
      • There is normal IP connectivity between all nodes
      • hostnames must be resolvable unless IP addresses are used
    • Run the command xmakehosts on one of the machines in the network as follows.
xmakehosts Router0 Router1 Router2 Server0 Server1
The hosts.xia file will be created on each of the specified nodes containing DAGs for all of the nodes specified. See the XMAKEHOSTS man page for additional details.

Verify the Network

Check service status

The command xianet check will display a system status similar to the output below. This example was generated on router1 which is running the nameserver. The 2 stats related processes in stopped state are normal.

click:                   running
xrouted:                 running
xnetjd:                  running
xcache:                  running
xnameservice:            running
statsserver:             stopped
xstats:                  stopped

Check the routing table

Run the XROUTE command to get a table similar to one of the following. See the XIA Routing section for information on what the route table contains.

Router

TYPE  XID                                           PORT          FLAGS    NEXT HOP
------------------------------------------------------------------------------------------------------------------------
AD    (default)                                     -7 (fallback) 00000000
AD    ad:0c79f164ff86c43eb05c0fa5cebe0e8ba9faec9f   -2 (self)     00000000
AD    ad:06dc5ffb814f68aecbc05ef34a577d3ac5d0f9a2    1            0000ffff hid:96de81aa31291577053eb44df2f7df27cca2ae0f
AD    ad:19493c8866920b9d122eb09e94f24a501b22ae8f    0            0000ffff hid:3a6438d7ffbebb2d4ac19893cf88de5bcf51d4fc
HID   (default)                                     -7 (fallback) 00000000
HID   hid:3a6438d7ffbebb2d4ac19893cf88de5bcf51d4fc   0            0000ffff hid:3a6438d7ffbebb2d4ac19893cf88de5bcf51d4fc
HID   hid:96de81aa31291577053eb44df2f7df27cca2ae0f   1            0000ffff hid:96de81aa31291577053eb44df2f7df27cca2ae0f
HID   hid:f822c4f447ab7e4094d98ec2e030088f2a383adc  -2 (self)     00000000
FID   (default)                                     -4 (bcast)    00000000
FID   fid:993a4a4d934e1113e1b0cbbda12240535dba9f6c  -2 (self)     00000000
FID   fid:f822c4f447ab7e4094d98ec2e030088f2a383adc  -2 (self)     00000000
SID   (default)                                     -7 (fallback) 00000000
SID   SID_NS                                        -2 (self)     00000000
SID   SID_XROUTE                                    -2 (self)     00000000
SID   sid:f1e82e1c6df4d1a2db0f94626c944cbbb6b90d2e  -2 (self)     00000000
CID   (default)                                     -7 (fallback) 00000000
IP    (default)                                     -7 (fallback) 00000000

Host

TYPE  XID                                           PORT          FLAGS    NEXT HOP
------------------------------------------------------------------------------------------------------------------------
AD    (default)                                      0            0000ffff hid:3a6438d7ffbebb2d4ac19893cf88de5bcf51d4fc
AD    ad:19493c8866920b9d122eb09e94f24a501b22ae8f   -2 (self)     00000000
HID   (default)                                      0            0000ffff hid:3a6438d7ffbebb2d4ac19893cf88de5bcf51d4fc
HID   hid:2bf9e559e776ffdf893d0948298b0a8df4029a95  -2 (self)     00000000
HID   hid:3a6438d7ffbebb2d4ac19893cf88de5bcf51d4fc   0            0000ffff hid:3a6438d7ffbebb2d4ac19893cf88de5bcf51d4fc
FID   (default)                                     -4 (bcast)    00000000
FID   fid:2bf9e559e776ffdf893d0948298b0a8df4029a95  -2 (self)     00000000
SID   (default)                                     -7 (fallback) 00000000
SID   sid:dfd4a013e7b4d8059722a20d82a4d1b2966a26e3  -2 (self)     00000000
CID   (default)                                     -7 (fallback) 00000000
IP    (default)                                      0            0000ffff hid:3a6438d7ffbebb2d4ac19893cf88de5bcf51d4fc

Run the echo apps

The echoserver and echoclient applications are a simple way to check to see that the network is operating correctly.

  • On server0
cd xia-core/applications/examples
./echoserver
  • On host0
cd xia-core/applications/examples
./echoclient

Example Output

barrettd@host0:~/xia-core/applications/example$ ./echoclient

XIA Echo Client (v1.0): started

DAG 0 -
AD:06dc5ffb814f68aecbc05ef34a577d3ac5d0f9a2 1 -
HID:8c112ca51f64e86e9ea33fdb432750d6402bbdc6 2 -
SID:f31bab1cc2fff7622d2ead1f409781916a2e0b5e
Xsock    3 created
Xsock    3 connected
Xsock    3 sent 512 of 512 bytes
Xsock    3 received 512 bytes in total
Xsock    3 closed

Ping another node

If the hosts.xia file was created when building the network:

xping server0

If the hosts.xia file does not exist

  • ssh to server0
cd xia-core
xdag
  • output will look like server0 RE AD:8e16665fff15fec231d9cbe7e8a527932d3be390 HID:ea9e1196d2aa8d0c2984602ff50dbebf7908e4d0
  • copy everything from RE to the end of the line
  • ssh to host0
cd xia-core
# be sure to put the RE string inside quotes in the following command
xping "RE ............"

Example Output

barrettd@host0:~/xia-core$ xping server0
PING DAG 0 -
AD:06dc5ffb814f68aecbc05ef34a577d3ac5d0f9a2 1 -
HID:8c112ca51f64e86e9ea33fdb432750d6402bbdc6: 56 data bytes

bytes=64 icmp_seq=0 time=10 ms
from DAG 0 -
AD:06dc5ffb814f68aecbc05ef34a577d3ac5d0f9a2 1 -
HID:8c112ca51f64e86e9ea33fdb432750d6402bbdc6

bytes=64 icmp_seq=1 time=9 ms
from DAG 0 -
AD:06dc5ffb814f68aecbc05ef34a577d3ac5d0f9a2 1 -
HID:8c112ca51f64e86e9ea33fdb432750d6402bbdc6

^C

----(null) PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 9/9/10

Advanced Configurations

See the XIANET man page for additional details.

Ignore interfaces

Add the -f flag to the xianet command to ignore one or more interfaces. This will cause the XIA host to ignore interfaces eth 0 and eth1. NOTE: This switch is only effective when xianet is run for the first time on a node. If a configuration already exists it will be ignored.

xianet -t -feth0,eth1 start

Enable Logging

By default click and the XIA daemons log to /var/log/syslog at LOG_ERR level.

  • -v tells click to log to stdout as well as to syslog.
  • -V tells click and the daemons to log to stdout.
  • -l LEVEL tells click and the daemons to log at a different severity level. Allowable levels are: 0=LOG_EMERG, 1=LOG_ALERT, 2=LOG_CRIT, 3=LOG_ERR, 4=LOG_WARNING, 5=LOG_NOTICE, 6=LOG_INFO, 7=LOG_DEBUG
These switches can be used whenever xianet is run. They are not configuration time only options.


The XLOG utility can be used while XIA is running to adjust the -v and -l flags for click. It has no effect on the daemons.

Multi-homed Hosts

TODO: write this

Enable the Rendezvous Daemon

TODO: write this

Connecting Disjoint XIA Nodes/Networks through IP

TODO: Finish

XIA nodes can tunnel traffic through IP using the 4ID principal type when there is no end-to-end XIA connectivity. This is accomplished by using the Dual Stack (XIA & IP) Click configuration files.

DUAL STACK HOST:

xianet -4t -I <IP interface> start
(If behind a NAT, add
-m <external IP>
and make sure port forwarding is set up on UDP port 1001)

DUAL STACK ROUTER:

xianet -4r -I <IP interface> start
If behind a NAT, use the -m flag as above.

OTHER PURE XIA ROUTERS IN CLOUD:

xianet -r -m <IP of cloud's dual stack router> start

Tools

Applications