Overview | Download | Publications | Documentation | Contact |
SatelliteLab: Protocol specificationEach satellite communicates via UDP with exactly two other nodes: the sun, which keeps track of the available satellites and assigns them to experiments, and, at any given time, exactly one planet. The satellite responds to any probe messages that are sent by the planet, and it periodically sends a heartbeat message to both the sun and the planet. Each satellite maintains the following internal state:
Satellites accept messages on a single UDP port. Any port may be used, but port 30000 should be chosen if available. Sun heartbeat messageThe satellite MUST send this message to the sun once in every sun heartbeat interval. uint32 magic // 0x5341544C 'SATL' uint16 softwareVersion // MSB: 1=Unix, 2=Java, 3=MacOS, 4=Windows byte[8] sunPassword uint16 sunHeartbeatInterval uint16 planetHeartbeatInterval in_addr_t planetIP uint16 planetPort uint32 bytesSent uint32 bytesReceived char[] email byte zero1 char[] identifier byte zero2 byte[] planetPassword Planet heartbeat messageUnless the planet IP is zero, the satellite MUST send this message to the planet once in every planet heartbeat interval. uint16 magic1 // 0xFFFE uint32 magic2 // 0x5341544C 'SATL' uint16 softwareVersion // MSB: 1=Unix, 2=Java, 3=MacOS, 4=Windows byte[] planetPassword Since heartbeat messages and response messages are sent to the same port on the planet, the heartbeat message carries the pattern 0xFFFE in the first two bytes, which can never appear in a valid response message. Configuration messageThe sun MAY send this message to the satellite in response to a sun heartbeat message. The satellite MUST ignore any configuration message whose source IP address and/or source port is different from the preconfigured values for the sun, or whose sunPassword field does not match the satellite's current sun password. uint32 magic // 0x5341544C 'SATL' uint16 softwareVersion byte[8] sunPassword // must match sunPassword from most recent heartbeat uint16 sunHeartbeatInterval // in seconds; minimum is 1 uint16 planetHeartbeatInterval // in seconds; minimum is 1 in_addr_t planetIP // zero to disable planet communication uint16 planetPort byte[] planetPassword // up to 100 bytes; may be empty When a satellite accepts a configuration message, it MUST perform the following three steps: It must 1) update its state with the specified values for the sun heartbeat interval, the planet heartbeat interval, the planet IP, the planetPort, and the planetPassword; it must 2) reset both heartbeat timers; and it must 3) immediately send both a sun heartbeat and a planet heartbeat message. Probe and response messagesThe planet MAY send messages of this type to the satellite at any time. The satellite MUST send a response if the source IP and port number of the probe match the current planet IP and planet port; otherwise it MUST ignore the message. Satellites MUST support probe and response packets of at least 9216 bytes (with IP fragmentation); they MAY support larger packets. When a satellite receives a probe message, it performs the following steps:
Here is an example interaction between a planet and its satellite (the numbers represent 16-bit values): Planet: FFFE 1234 1234 1234 1234 1234 1234 1234 // clear history; set template Satellite: (no response) Planet: 0001 0010 0000 4444 4444 4444 // ID 1; request 16-byte response Satellite: 0001 0001 0000 <rcvtime> <sndtime> 1234 // probe history is still empty Planet: 0001 0010 // ID 1 again (duplicate) Satellite: (no response) // ID is already in history Planet: 0003 000C 0002 0008 0001 0014 0000 // IDs 3 and 2 are new Satellite: 0003 0003 0001 0000 <rcvtime> // Response for ID 3 (12 bytes) 0003 0002 0003 0001 // Response for ID 2 (8 bytes) Planet: FFFF 000A // Check history Satellite: FFFF FFFF 0002 0003 0001 // Response Planet: FFFF 0006 // Check does not change history Satellite: FFFF FFFF 0002 // Response In the above example, the packet template simply consists of 1234 (upstream) and 4444 (downstream). SatelliteLab uses a more complicated template, which contains a plain-text message that describes the experiment. This is to avoid problems in case the packets are logged by a firewall or examined by an administrator. |