]> secure anycast tunneling protocol (satp)
Sporgasse 6 Graz 8010 AT otti@wirdorange.org http://anytun.org/
General satp Internet-Draft secure anycast tunneling protocol anycast tunnel secure protocol The secure anycast tunneling protocol (satp) defines a protocol used for communication between any combination of unicast and anycast tunnel endpoints. It has less protocol overhead than IPSec in Tunnel mode and allows tunneling of every ETHER TYPE protocol (e.g. ethernet, ip, arp ...). satp directly includes cryptography and message authentication based on the methodes used by SRTP. It is intended to deliver a generic, scaleable and secure solution for tunneling and relaying of packets of any protocol.
anytun defines a Host Anycast Service as defined in rfc1546. RFC3068 DTD.
This section gives an overview of possible operation modes und usage scenarios. Please note, that the protocols used in the figures are only examples and that SATP itself does not care about either transport protocols or encapsulated protocols. Routing is not done by SATP and each implemetation MAY choose it's own way of doing this task (e.g. using functions provided by the operating system). SATP is used only to encapsulate and encrypt data.
An example of SATP used to tunnel in a unicast client - anycast server model ----------- ----------- | RTP | ---------- | RTP | ----------- -> |router 1| -> ----------- | UDP | ---------- | UDP | ----------- ----------- ----- | IPv6 | ---------- | IPv6 | ----- | | -> ----------- -> |router 2| -> ----------- -> | | ----- | SATP | ---------- | SATP | ----- ##### ----------- ----------- ##### | UDP | ---------- | UDP | unicast ----------- -> |router 3| -> ----------- unicast host 1 | IPv4 | ---------- | IPv4 | host 2 ----------- anycast ----------- | ... | hosts | ... |
In this scenario the payload of a SATP packet is transmitted from one unicast host to one of the anycast routers. This router makes a routing descision based on the underlying protocol and transmits a new SATP package to one or more unicast hosts depending on the routing descition.
An example of anytun used in open tunnel mode ----------- | DNS | ---------- ----------- -> |router 1| -> -> DNS server | UDP | ---------- ----------- ----------- | DNS | ----- | IPv6 | ---------- ----------- | | -> ----------- -> |router 2| -> | UDP | -> DNS server ----- | SATP | ---------- ----------- ##### ----------- | IPv6 | | UDP | ---------- ----------- unicast ----------- -> |router 3| -> | ... | -> DNS server host | IPv4 | ---------- ----------- | ... | anycast
When a client using the anytun protocol wants to tunnel data, it is building a connection to the anycast servers using the anytun protocol. The anycast servers relay the encapsulated packages directly to the destination without using the anytun protocol. The source address of the datagramm HAS TO be changed to the anycast address of the server. The anytun servers act like a source NAT router, therefor for the destination it saems that it is talking to the client directly.
An example of anytun used in open tunnel mode Router ----------- ---------------Router / \ / \ Network - Router ------------x Network A \ / \ / B Router ----------- ---------------Router | packets | packets | packets | plaintext | get | take a | get | plaintext packets | de/encrypted | random | de/encrypted | packets |de/encapsulated| path |de/encapsulated|
Network A has multible routers, that act as gateway/tunnel endpoint to another network B. This is done to build e redundant encrpted tunnel connection between the to networks. All tunnel endpoints of network A share the same anycast address and all tunnel endpoints of network B share another anycast address.
Anytun does not define wich lower layer protocols HAVE TO be used, but it's most likely used on top of udp. This section should only discuss some issues on udp in combination with anycasting and tunnels.
An example of anytun used with udp as transport ----------- ----------- | RTP | ---------- | RTP | ----------- -> |server 1| -> ----------- | UDP | ---------- | UDP | ----------- ----------- ----- | IPv6 | ---------- | IPv6 | ----- | | -> ----------- -> |server 2| -> ----------- -> | | ----- | anytun | ---------- | anytun | ----- ##### ----------- ----------- ##### | UDP | ---------- | UDP | client 1 ----------- -> |server 3| -> ----------- client 2 | IPv4 | ---------- | IPv4 | ----------- ----------- | ... | anycast | ... |
When using UDP no flow controll or retransmission is done, neigther by UDP nor anytun. The encapsulated protocol HAS TO take care of this tasks if needed. UDP however has a checksum of the complete udp datagram, so a packet gets discarded if there is a biterror in the payload
An example of anytun used with udp transport ----------- ----------- | RTP | ---------- | RTP | ----------- -> |server 1| -> ----------- | UDP | ---------- | UDP | ----------- ----------- ----- | IPv6 | ---------- | IPv6 | ----- | | -> ----------- -> |server 2| -> ----------- -> | | ----- | anytun | ---------- | anytun | ----- ##### ----------- ----------- ##### |lightUDP | ---------- |lightUDP | client 1 ----------- -> |server 3| -> ----------- client 2 | IPv4 | ---------- | IPv4 | ----------- ----------- | ... | anycast | ... |
The difference between normal UDP and lightUDP is, that the udp size is not set to the length of the full packet, but to the lenght of the data used for the checksum and therefor the checksum is only calculated for that part. When using lightUDP, the lenght HAS tO be set to the udp header length + the anytun header lenght. So there is no error correction or detection done on the payload. This can be usefull if realtime data is beeing transimittet or the tunneled protocol does error correction/detection by itself.
The only way of fully supporting fragmentation would be to syncronise fragments between all anycast servers. This is considered to be to much overhead, so there are two non perfect solutions for this problems. Either fragmentation HAS TO be disabled or if not all fragments arrive at the same server the ip datagramm HAS TO be discarded. As routing changes are not expected to occure very frequently, the encapsulated protocol can do a retransmission and all fragments will arrive at the new server.
Protocol Format 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | sender ID | sequence number | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | .... payload ... | | | |-------------------------------+-------------------------------+ | | | padding (OPT) | pad count(OPT)| payload type | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ~ MKI (OPTIONAL) ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | : authentication tag (RECOMMENDED) : | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | +- Encrypted Portion* Authenticated Portion ---+
The sender ID is a 16bit unsigned integer in network byte order. It HAS TO be unique for every sender sharing the same anycast address
The sequenze number is a 16bit unsigned integer in network byte order. It starts with a random value and is increased by 1 for every sent packet. After the maximum value, it starts over from 0. This overrun causes the ROC to be increased.
A packet of the type payload type (e.g. an IP packet).
Padding of max 255 ocitets. None of the pre-defined encryption transforms uses any padding; for these, the plaintext and encrypted payload sizes match exactly. Transforms are based on transforms of the SRTP protocol and these transforms might use the RTP padding format, so a RTP like padding is supported. If padding field is present, than the padding count field MUST be set to the padding lenght.
The number of octets of the padding field. This field is optional. It's presents is signaled by the key management and not by this protocol. If this field isn't present, the padding field MUST NOT be present as well.
The payload type field defines the payload protocol. ETHER TYPE protocol numerbers are used. http://www.iana.org/assignments/ethernet-numbers . The values 0000-05DC are reserverd and MUST NOT be used.
Some examples for protocol types HEX 0000 Reserved .... Reserved 05DC Reserved 0800 Internet IP (IPv4) 6558 transparent ethernet bridging 86DD IPv6
&rfc3068; An Anycast Prefix for 6to4 Relay Routers