summaryrefslogtreecommitdiff
path: root/internet-draft-anytun.xml
blob: 07eeae7be0ccccfcb23fc99873049013ba7b6ec2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<?xml version='1.0'?>
    <!DOCTYPE rfc SYSTEM 'rfcXXXX.dtd' [
    
    <!ENTITY rfc3068 PUBLIC '' 'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3068.xml'>

]>
    <rfc ipr='full3978' docName='draft-gsenger-anycast-relay-00'>
    <front>
        <title>Anycast stream relaying</title>

        <author initials='O.G.' surname='Gsenger'
                fullname='Othmar Gsenger'>
            <organization></organization>

            <address>
                <postal>
                    <street>Sporgasse 6</street>
                    <city>Graz</city>
                    <code>8010</code>
                    <country>AT</country>
                </postal>

                <phone></phone>
                <email>otti@wirdorange.org</email>
                <uri>http://anytun.org/</uri>
            </address>
        </author>

        <date month='March' year='2007' />

        <area>General</area>
        <workgroup></workgroup>
        <keyword>anytun</keyword>
        <keyword>Internet-Draft</keyword>
        <keyword>Anycast tunneling / relaying</keyword>
        <abstract>
            <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.
            </t>
        </abstract>
    </front>
    <middle>
    <section title='Introduction'>
        <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>
         <t><xref target="RFC3068">RFC3068</xref> DTD.</t>
    </section> 
    <section title="Operation modes">
       <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>
       <section title="Tunnel modes">
    
            <section title='Tunneling Mode'>
              <figure anchor="tunnel_mode">
                 <preamble>An example of anytun used in tunnel mode</preamble>
                 <artwork>
          -----------                      ----------- 
          |   RTP   |      ----------      |   RTP   |
          -----------  ->  |server 1|  ->  -----------
          |   UDP   |      ----------      |   UDP   |
          -----------                      -----------
-----     |   IPv6  |      ----------      |   IPv6  |     -----
|   |  -> -----------  ->  |server 2|  ->  -----------  -> |   |
-----     |  anytun |      ----------      |  anytun |     -----
#####     -----------                      -----------     #####
          |   UDP   |      ----------      |   UDP   |
client 1  -----------  ->  |server 3|  ->  -----------     client 2
          |   IPv4  |      ----------      |   IPv4  |
          -----------                      -----------
          |   ...   |       anycast        |   ...   |
                 </artwork>
       </figure>
	      <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> 
	    </section>

	    <section title='Open tunnel mode'>
              <figure anchor="open_tunnel_mode">
                 <preamble>An example of anytun used in open tunnel mode</preamble>
                 <artwork>
          -----------                                 
          |   RTP   |      ----------                 
          -----------  ->  |server 1|  ->             
          |   UDP   |      ----------      -----------
          -----------                      |   RTP   |
-----     |   IPv6  |      ----------      -----------     -----
|   |  -> -----------  ->  |server 2|  ->  |   UDP*  |  -> |   |
-----     |  anytun |      ----------      -----------     -----
#####     -----------                      |   IPv6* |     #####
          |   UDP   |      ----------      -----------
client 1  -----------  ->  |server 3|  ->  |   ...   |    host
          |   IPv4  |      ----------                     not using
          -----------                                     anytun
          |   ...   |       anycast        
                                           *changed source address
                                            or port   
                 </artwork>
       </figure>

               <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>
	    </section>
	    <section title='relay mode'>
              <figure anchor="relay_mode">
                 <preamble>An example of anytun used in relay mode</preamble>
                 <artwork>
          -----------
-----     |   RTP   |      ----------
|   |  -> -----------  ->  |server 1|  ->
-----     |   UDP** |      ----------      -----------
#####     -----------                      |   RTP   |
          |   IPv6**|      ----------      -----------     -----
host      -----------  ->  |server 2|  ->  |   UDP*  |  -> |   |
not using |   ...   |      ----------      -----------     -----
anytun                                     |   IPv6* |     #####
                           ----------      -----------
          -----------  ->  |server 3|      |   ...   |    host
-----     |  anytun |      ----------                     not using
|   |  -> -----------                                     anytun
-----     |   IPv4  |       anycast
#####     -----------
connection|   ...   |
controller

 *changed source address or port
 **changed destination address or port
                 </artwork>
       </figure>
	       <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> 
	    </section>
	</section>
	<section title="Transport modes">
	  <section title="anycast udp mode">
              <figure anchor="transtort_udp">
                 <preamble>An example of anytun used with udp transport</preamble>
                 <artwork>
          -----------                      -----------
          |   RTP   |      ----------      |   RTP   |
          -----------  ->  |server 1|  ->  -----------
          |   UDP   |      ----------      |   UDP   |
          -----------                      -----------
-----     |   IPv6  |      ----------      |   IPv6  |     -----
|   |  -> -----------  ->  |server 2|  ->  -----------  -> |   |
-----     |  anytun |      ----------      |  anytun |     -----
#####     -----------                      -----------     #####
          |   UDP   |      ----------      |   UDP   |
client 1  -----------  ->  |server 3|  ->  -----------     client 2
          |   IPv4  |      ----------      |   IPv4  |
          -----------                      -----------
          |   ...   |       anycast        |   ...   |
                 </artwork>
       </figure>
      <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>
	  </section>
	  <section title="anycast light udp mode">
              <figure anchor="transport_lightudp">
                 <preamble>An example of anytun used with udp transport</preamble>
                 <artwork>
          -----------                      -----------
          |   RTP   |      ----------      |   RTP   |
          -----------  ->  |server 1|  ->  -----------
          |   UDP   |      ----------      |   UDP   |
          -----------                      -----------
-----     |   IPv6  |      ----------      |   IPv6  |     -----
|   |  -> -----------  ->  |server 2|  ->  -----------  -> |   |
-----     |  anytun |      ----------      |  anytun |     -----
#####     -----------                      -----------     #####
          |lightUDP |      ----------      |lightUDP |
client 1  -----------  ->  |server 3|  ->  -----------     client 2
          |   IPv4  |      ----------      |   IPv4  |
          -----------                      -----------
          |   ...   |       anycast        |   ...   |
                 </artwork>
       </figure>

      <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>
	  </section>
	  <section title="unicast tcp with anycast initialisation">
	  </section>
	  <section title="full anycast tcp">
	     <section title="keep alive message request">
	     <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>
	     </section>
	  </section>
	</section>
     </section>
     <section title="Protocol specification">
       <section title="Header format">
       </section>
       <section title="Protocol field">
         <t>The protocol field defines the payload protocol. ETHER TYPE protocol numerbers are used. http://www.iana.org/assignments/ethernet-numbers . The values 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/>
            <figure anchor="prot_type_table">
               <preamble>Protocol Types</preamble>
                 <artwork>
HEX
0000 Reserved
0001 Raw Ethernet - both IEEE 802.3 and DIX Etherernet 
                    without preamble,SFD, PAD and FCS
0002 Raw Ethernet with FCS
0003-05DC Reserved
05DD and above as in http://www.iana.org/assignments/ethernet-numbers
0800  Internet IP (IPv4)
86DD  IPv6
</artwork>
</figure>
</t>
       </section>
     </section>
        <appendix title='The appan'></appendix>
    </middle>
    <back>
    <references>
        &rfc3068; An Anycast Prefix for 6to4 Relay Routers
    </references>
    </back>
    </rfc>