Protocol type
[anytun.git] / internet-draft-anytun.xml
blobe4679df290e089a6e14c05c7878a2eece63d9c4b
1 <?xml version='1.0'?>
2     <!DOCTYPE rfc SYSTEM 'rfcXXXX.dtd' [
3     
4     <!ENTITY rfc3068 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3068.xml'>
6 ]>
7     <rfc ipr='full3978' docName='draft-gsenger-anycast-relay-00'>
8     <front>
9         <title>Anycast stream relaying</title>
11         <author initials='O.G.' surname='Gsenger'
12                 fullname='Othmar Gsenger'>
13             <organization></organization>
15             <address>
16                 <postal>
17                     <street>Sporgasse 6</street>
18                     <city>Graz</city>
19                     <code>8010</code>
20                     <country>AT</country>
21                 </postal>
23                 <phone></phone>
24                 <email>otti@wirdorange.org</email>
25                 <uri>http://anytun.org/</uri>
26             </address>
27         </author>
29         <date month='March' year='2007' />
31         <area>General</area>
32         <workgroup></workgroup>
33         <keyword>anytun</keyword>
34         <keyword>Internet-Draft</keyword>
35         <keyword>Anycast tunneling / relaying</keyword>
36         <abstract>
37             <t>The anycast tunneling (anytun) protocol defines a protocol used for communication between unicast clients and anycast servers. It can be used for tunneling information between 2 clients over the servers or in relay mode to transmit data form the client over the servers to a third party not using the protocol and vice versa.
38             </t>
39         </abstract>
40     </front>
41     <middle>
42     <section title='Introduction'>
43         <t>anytun defines a Host Anycast Service as defined in rfc1546. It can be used to build high scalable and redundant tunnel services. It supports both UDP and TCP connections. Additionally to the possibility of establashing an unicast TCP connection over an anycast address as suggested in rfc1546, it supports real anycast TCP connections with state syncronisation and heuristic state forecast. It also has a relay mode, that makes it possible, that only one of the connection endpoints has to use the anytun protocol. This can be used to make connections through Firewalls or behind a NAT Router</t>
44          <t><xref target="RFC3068">RFC3068</xref> DTD.</t>
45     </section> 
46     <section title="Operation modes">
47        <t>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 anytun itself does not care about either transport protocols or encapsulated protocols. Routing and network address translation is not done by anytun. Each implemetation MAY choose it's own way of doing this task (e.g. using functions provided by the operating system). Anytun is used to establish and controll tunnnels, to encapsulate and encrypt data.</t>
48        <section title="Tunnel modes">
49     
50             <section title='Tunneling Mode'>
51               <figure anchor="tunnel_mode">
52                  <preamble>An example of anytun used in tunnel mode</preamble>
53                  <artwork>
54           -----------                      ----------- 
55           |   RTP   |      ----------      |   RTP   |
56           -----------  ->  |server 1|  ->  -----------
57           |   UDP   |      ----------      |   UDP   |
58           -----------                      -----------
59 -----     |   IPv6  |      ----------      |   IPv6  |     -----
60 |   |  -> -----------  ->  |server 2|  ->  -----------  -> |   |
61 -----     |  anytun |      ----------      |  anytun |     -----
62 #####     -----------                      -----------     #####
63           |   UDP   |      ----------      |   UDP   |
64 client 1  -----------  ->  |server 3|  ->  -----------     client 2
65           |   IPv4  |      ----------      |   IPv4  |
66           -----------                      -----------
67           |   ...   |       anycast        |   ...   |
68                  </artwork>
69        </figure>
70               <t>In tunneling mode the payload of the anytun packet is transmitted from one unicast host to the anycast server. This server makes a routing descision based on the underlying protocol and transmits a new anytun package to one or more clients depending on the routing descition. The server MAY also route the packet to a directly connected network or a service running on the server, but please note, that this is only usefull for anycast host services like DNS and that the services HAVE TO be running on all servers in order to work.</t> 
71             </section>
73             <section title='Open tunnel mode'>
74               <figure anchor="open_tunnel_mode">
75                  <preamble>An example of anytun used in open tunnel mode</preamble>
76                  <artwork>
77           -----------                                 
78           |   RTP   |      ----------                 
79           -----------  ->  |server 1|  ->             
80           |   UDP   |      ----------      -----------
81           -----------                      |   RTP   |
82 -----     |   IPv6  |      ----------      -----------     -----
83 |   |  -> -----------  ->  |server 2|  ->  |   UDP*  |  -> |   |
84 -----     |  anytun |      ----------      -----------     -----
85 #####     -----------                      |   IPv6* |     #####
86           |   UDP   |      ----------      -----------
87 client 1  -----------  ->  |server 3|  ->  |   ...   |    host
88           |   IPv4  |      ----------                     not using
89           -----------                                     anytun
90           |   ...   |       anycast        
91                                            *changed source address
92                                             or port   
93                  </artwork>
94        </figure>
96                <t>In open tunnel mode only one of two clients talking to each other over the servers MUST use the anytun protocol. 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.</t>
97             </section>
98             <section title='relay mode'>
99               <figure anchor="relay_mode">
100                  <preamble>An example of anytun used in relay mode</preamble>
101                  <artwork>
102           -----------
103 -----     |   RTP   |      ----------
104 |   |  -> -----------  ->  |server 1|  ->
105 -----     |   UDP** |      ----------      -----------
106 #####     -----------                      |   RTP   |
107           |   IPv6**|      ----------      -----------     -----
108 host      -----------  ->  |server 2|  ->  |   UDP*  |  -> |   |
109 not using |   ...   |      ----------      -----------     -----
110 anytun                                     |   IPv6* |     #####
111                            ----------      -----------
112           -----------  ->  |server 3|      |   ...   |    host
113 -----     |  anytun |      ----------                     not using
114 |   |  -> -----------                                     anytun
115 -----     |   IPv4  |       anycast
116 #####     -----------
117 connection|   ...   |
118 controller
120  *changed source address or port
121  **changed destination address or port
122                  </artwork>
123        </figure>
124                <t>In relay mode the anycast serveres directly repaet the packetes of clients, only the source and destination addresses are changed. The anytun protocol is only used for controll messages, but not fr encapsulation.</t> 
125             </section>
126         </section>
127         <section title="Transport modes">
128           <section title="anycast udp mode">
129               <figure anchor="transtort_udp">
130                  <preamble>An example of anytun used with udp transport</preamble>
131                  <artwork>
132           -----------                      -----------
133           |   RTP   |      ----------      |   RTP   |
134           -----------  ->  |server 1|  ->  -----------
135           |   UDP   |      ----------      |   UDP   |
136           -----------                      -----------
137 -----     |   IPv6  |      ----------      |   IPv6  |     -----
138 |   |  -> -----------  ->  |server 2|  ->  -----------  -> |   |
139 -----     |  anytun |      ----------      |  anytun |     -----
140 #####     -----------                      -----------     #####
141           |   UDP   |      ----------      |   UDP   |
142 client 1  -----------  ->  |server 3|  ->  -----------     client 2
143           |   IPv4  |      ----------      |   IPv4  |
144           -----------                      -----------
145           |   ...   |       anycast        |   ...   |
146                  </artwork>
147        </figure>
148       <t>In anycast udp mode the data between clients and anycast serveres is carried by udp packets. Packets are routed by the serveres from one client to another. Because udp is stateless no inforamtion has to be syncronised</t>
149           </section>
150           <section title="anycast light udp mode">
151               <figure anchor="transport_lightudp">
152                  <preamble>An example of anytun used with udp transport</preamble>
153                  <artwork>
154           -----------                      -----------
155           |   RTP   |      ----------      |   RTP   |
156           -----------  ->  |server 1|  ->  -----------
157           |   UDP   |      ----------      |   UDP   |
158           -----------                      -----------
159 -----     |   IPv6  |      ----------      |   IPv6  |     -----
160 |   |  -> -----------  ->  |server 2|  ->  -----------  -> |   |
161 -----     |  anytun |      ----------      |  anytun |     -----
162 #####     -----------                      -----------     #####
163           |lightUDP |      ----------      |lightUDP |
164 client 1  -----------  ->  |server 3|  ->  -----------     client 2
165           |   IPv4  |      ----------      |   IPv4  |
166           -----------                      -----------
167           |   ...   |       anycast        |   ...   |
168                  </artwork>
169        </figure>
171       <t>The light UDP mode is neerly the same as the normal UDP mode, the only difference is, that the udp size is set to the udp header lenght and not to the length of the full packet and therefor the checksum is only calculated for the udo header itself. 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.</t>
172           </section>
173           <section title="unicast tcp with anycast initialisation">
174           </section>
175           <section title="full anycast tcp">
176              <section title="keep alive message request">
177              <t>Most NAT routers need a tcp connection to transmit some packets once in while to stay open. In full anycast tcp mode anytun hast to predict the tcp state including the sequence number. Synconisation of the sequence number would be to much overhead, so a keep alive intervall is agreed. This interval is used to calculate the sequemce number.</t>
178              </section>
179           </section>
180         </section>
181      </section>
182      <section title="Protocol specification">
183        <section title="Header format">
184        </section>
185        <section title="Protocol field">
186          <t>The protocol field defines the payload protocol. ETHER TYPE protocol numerbers are used. http://www.iana.org/assignments/ethernet-numbers Values from 0 to 0000-05DC are not used for DIX ethernet lenght, but are reservered for special purposes. As the definition of transparent ethernet bridging is very unclear 2 special types are added for ethernet frames<br/>
187 HEX<br/>
188 0001 Raw Ethernet - both IEEE 802.3 and DIX Etherernet without preamble,SFD, PAD and FCS<br/>
189 0002 Raw Ethernet with FCS<br/>
190 further special types MAY be added in the furture.<br/>
191 <br/>Most important ETHER TYPEs<br/>
192 0800  Internet IP (IPv4)<br/>
193 86DD  IPv6<br/>
194 </t>
195        </section>
196      </section>
197         <appendix title='The appan'></appendix>
198     </middle>
199     <back>
200     <references>
201         &rfc3068; An Anycast Prefix for 6to4 Relay Routers
202     </references>
203     </back>
204     </rfc>