Skip to content

XIA Routing

Dan Barrett edited this page Feb 17, 2017 · 4 revisions

Table of Contents

Route Table Description

FIXME: add images for the DAGs in the example section

The following route table was generated with the XROUTE command on a router running the nameserver and was connected to a host in it's AD as well as to a router in another AD.

TYPE  XID                                           PORT          FLAGS    NEXT HOP
------------------------------------------------------------------------------------------------------------------------
AD    (default)                                     -7 (fallback) 00000000 
AD    AD:8e16665fff15fec231d9cbe7e8a527932d3be390   -2 (self)     00000000 
AD    AD:b321eb2790fa9a7236e92ce647aa91334ee404b5    1            0000ffff HID:be60f08317c2f15cfbaa72d76ffbcc9cbb596444
HID   (default)                                     -7 (fallback) 00000000 
HID   HID:ea9e1196d2aa8d0c2984602ff50dbebf7908e4d0   0            0000ffff HID:ea9e1196d2aa8d0c2984602ff50dbebf7908e4d0
HID   HID:d3040bd3012f24cbbd87af057abc133b5bc4b98e  -2 (self)     00000000 
HID   HID:be60f08317c2f15cfbaa72d76ffbcc9cbb596444   1            0000ffff HID:be60f08317c2f15cfbaa72d76ffbcc9cbb596444
FID   (default)                                     -4 (bcast)    00000000 
FID   FID:d3040bd3012f24cbbd87af057abc133b5bc4b98e  -2 (self)     00000000 
FID   FID:5f063e66838822cb244bd8f417e21aa01f0c484c  -2 (self)     00000000 
SID   (default)                                     -7 (fallback) 00000000 
SID   SID:1110000000000000000000000000000000001113  -2 (self)     00000000 
SID   SID:1110000000000000000000000000000000001112  -2 (self)     00000000 
SID   SID:f04654f3d0b391c8ebd79e32835cf86f4c47038c  -2 (self)     00000000 
CID   (default)                                     -7 (fallback) 00000000 
IP    (default)                                     -7 (fallback) 00000000 

TYPE

Although the XROUTE command shows everything in one list, each principal type has it's own routing table inside the prototype. There will always be a default route for each type.

XID

All XIDs are generated cryptographically. The 2 obviously non-cryptographic SIDs show above are hold overs from the name server and routing daemon. They are in the process of being updated and replaced.

PORT

Positive values indicate the click 'port' to send the traffic to. A router configured to use ETH0, ETH2, and ETH3 would use ports 0, 1, and 2 respectively.

Negative ports are used internally in the forwarding code.

  • -1 (discard) silently discard the packet
  • -2 (self) the XID can be further processed on the local machine. Advance the pointer into the DAG and feed the packet back into the forwarding engine.
  • -4 (bcast) broadcast packets are only used when a FID is in the DAG. It instructs the forwarding engine to send the packet out on all interfaces other than the one it arrived on. The FID forwarding engine also does further processing to discard packets that it has already seen.
  • -7 (fallback) the XID does not appear in the forwarding table, check to see if there is a fallback path not yet taken in the DAG and if so feed the packet back into the forwarding engine for further processing. Otherwise discard the packet.

Flags

Not currently used, but will likely contain useful information in the new routing daemons.

Next Hop

Indicates the HID of the node to send the packet to so that it continues to move toward it's ultimate destination.

Examples

See the DAG section for more detailed descriptions of how DAGs in XIA work.

These examples use the routing table above.

Simple No Fallback DAG

Host and service in a different AD

AD:[...04b5] --- HID:[...hhhh] --- SID:[...ssss]
Router0 receives a packet with this DAG and feeds it into the forwarding engine. It finds a route for the AD on port 0, and sends the packet to HID:...6444 which is the next hop. Because the router is not part of the AD in the destination, it does not increment the next pointer into the destination DAG.

Host in the same AD

AD:[...e390] --- HID:[...e4d0] --- SID:[...ssss]
The router finds the AD in the forwarding tables and sees that it can handle that AD itself. It advances the pointer in the DAG to the next XID which in this case is a HID. The packet is fed back into the forwarding engine and the entry for the HID is found on port 0. The packet is sent out to the next hop host (the same as the destination in this case) for further processing.

Packet received from a host in the same AD

Host0 sends a nameserver query to router0 with the following DAG. Because host0 is inside the AD it was able to advance the pointer into the DAG and router0 receives it with the pointer on the HID.

AD:[...e390] --- HID:[...b98e] --- SID:[...1113]
The router finds it's own HID in the forwarding engine and advances the pointer and feeds the packet back in. It also finds the entry for the SID. Because the SID is the final intent of the DAG, the packet is then sent up the stack to the nameserver daemon.

DAG with fallback

Packet originating on router0 destined for a service on host0.

----------------------------------------- SID:[...ssss]
 \---AD:[...e390] --- HID:[...e4d0] ---/
  \--- HID:[...9999] -----------------/

Router0 looks at the packet in the forwarding engine using the 1st path in the DAG which points directly to the SID. No entry is found in the forwarding tables, so the fallback port is returned. The packet is then fed back into the forwarding engine and the second edge pointing to the AD is tried. Router0 knows what to do with this and advances the pointer to the HID. It now finds a route to the HID and sends the packet out port 0 to host0.

DAG processing at host0 proceeds normally on the fallback path. If for some reason the SID is not present on host0, the packet will be discarded. The final fallback path can't be used once the next pointer into the DAG has been advanced to the AD or HID in the first fallback path. Fallback paths can only be taken when the first element on the current path is not resolvable.

Clone this wiki locally