ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/doc/gvpe.protocol.7
(Generate patch)

Comparing gvpe/doc/gvpe.protocol.7 (file contents):
Revision 1.8 by pcg, Sun Aug 10 23:04:05 2008 UTC vs.
Revision 1.9 by pcg, Mon Aug 11 16:02:16 2008 UTC

305pair). 305pair).
306.Sh "Retrying" 306.Sh "Retrying"
307.IX Subsection "Retrying" 307.IX Subsection "Retrying"
308When there is no response to an auth request, the host will send auth 308When there is no response to an auth request, the host will send auth
309requests in bursts with an exponential backoff. After some time it will 309requests in bursts with an exponential backoff. After some time it will
310resort to \s-1PING\s0 packets, which are very small (8 bytes) and lightweight 310resort to \s-1PING\s0 packets, which are very small (8 bytes + protocol header)
311(no \s-1RSA\s0 operations required). A host that receives ping requests from an 311and lightweight (no \s-1RSA\s0 operations required). A host that receives ping
312unconnected peer will respond by trying to create a connection. 312requests from an unconnected peer will respond by trying to create a
313connection.
313.PP 314.PP
314In addition to the exponential backoff, there is a global rate-limit on 315In addition to the exponential backoff, there is a global rate-limit on
315a per-IP base. It allows long bursts but will limit total packet rate to 316a per-IP base. It allows long bursts but will limit total packet rate to
316something like one control packet every ten seconds, to avoid accidental 317something like one control packet every ten seconds, to avoid accidental
317floods due to protocol problems (like a \s-1RSA\s0 key file mismatch between two 318floods due to protocol problems (like a \s-1RSA\s0 key file mismatch between two
318hosts). 319hosts).
320.PP
321The intervals between retries are limited by the \f(CW\*(C`max\-retry\*(C'\fR
322configuration value. A node with \f(CW\*(C`connect\*(C'\fR = \f(CW\*(C`always\*(C'\fR will always retry,
323a node with \f(CW\*(C`connect\*(C'\fR = \f(CW\*(C`ondemand\*(C'\fR will only try (and re\-try) to connect
324as long as there are packets in the queue, usually this limits the retry
325period to \f(CW\*(C`max\-ttl\*(C'\fR seconds.
326.PP
327Sending packets over the \s-1VPN\s0 will reset the retry intervals as well, which
328means as long as somebody is trying to send packets to a given node, \s-1GVPE\s0
329will try to connect every few seconds.
319.Sh "Routing and Protocol translation" 330.Sh "Routing and Protocol translation"
320.IX Subsection "Routing and Protocol translation" 331.IX Subsection "Routing and Protocol translation"
321The gvpe routing algorithm is easy: there isn't any routing. \s-1GVPE\s0 always 332The \s-1GVPE\s0 routing algorithm is easy: there isn't much routing to speak
322tries to establish direct connections, if the protocol abilities of the 333of: When routing packets to another node, \s-1GVPE\s0 trues the following
323two hosts allow it. 334options, in order:
324.PP 335.IP "If the two hosts should be able to reach each other directly (common protocol, port known), then \s-1GVPE\s0 will send the packet directly to the other node." 4
325If the two hosts should be able to reach each other (common protocol, ip 336.IX Item "If the two hosts should be able to reach each other directly (common protocol, port known), then GVPE will send the packet directly to the other node."
326and port all known), but cannot (network down), then there will be no 337.PD 0
327connection, point. 338.ie n .IP "If this isn't possible (e.g. because the node doesn't have a \*(C`hostname\*(C' or known port), but the nodes speak a common protocol and a router is available, then \s-1GVPE\s0 will ask a router to ""mediate"" between both nodes (see below)." 4
339.el .IP "If this isn't possible (e.g. because the node doesn't have a \f(CW\*(C`hostname\*(C'\fR or known port), but the nodes speak a common protocol and a router is available, then \s-1GVPE\s0 will ask a router to ``mediate'' between both nodes (see below)." 4
340.IX Item "If this isn't possible (e.g. because the node doesn't have a hostname or known port), but the nodes speak a common protocol and a router is available, then GVPE will ask a router to mediate between both nodes (see below)."
341.ie n .IP "If a direct connection isn't possible (no common protocols) or forbidden (\*(C`deny\-direct\*(C'\fR) and there are any routers, then \s-1GVPE\s0 will try to send packets to the router with the highest priority that is connected already \fIand is able (as specified by the config file) to connect directly to the target node." 4
342.el .IP "If a direct connection isn't possible (no common protocols) or forbidden (\f(CW\*(C`deny\-direct\*(C'\fR) and there are any routers, then \s-1GVPE\s0 will try to send packets to the router with the highest priority that is connected already \fIand\fR is able (as specified by the config file) to connect directly to the target node." 4
343.IX Item "If a direct connection isn't possible (no common protocols) or forbidden (deny-direct) and there are any routers, then GVPE will try to send packets to the router with the highest priority that is connected already and is able (as specified by the config file) to connect directly to the target node."
344.IP "If no such router exists, then \s-1GVPE\s0 will simply send the packet to the node with the highest priority available." 4
345.IX Item "If no such router exists, then GVPE will simply send the packet to the node with the highest priority available."
346.IP "Failing all that, the packet will be dropped." 4
347.IX Item "Failing all that, the packet will be dropped."
348.PD
328.PP 349.PP
329A host can usually declare itself unreachable directly by setting it's 350A host can usually declare itself unreachable directly by setting it's
330port number(s) to zero. It can declare other hosts as unreachable by using 351port number(s) to zero. It can declare other hosts as unreachable by using
331a config-file that disables all protocols for these other hosts. 352a config-file that disables all protocols for these other hosts. Another
353option is to disable all protocols on that host in the other config files.
332.PP 354.PP
333If two hosts cannot connect to each other because their \s-1IP\s0 address(es) 355If two hosts cannot connect to each other because their \s-1IP\s0 address(es)
334are not known (such as dialup hosts), one side will send a connection 356are not known (such as dialup hosts), one side will send a \fImediated\fR
335request to a router (routers must be configured to act as routers!), which 357connection request to a router (routers must be configured to act as
336will send both the originating and the destination host a connection info 358routers!), which will send both the originating and the destination host
337request with protocol information and \s-1IP\s0 address of the other host (if 359a connection info request with protocol information and \s-1IP\s0 address of the
338known). Both hosts will then try to establish a connection to the other 360other host (if known). Both hosts will then try to establish a direct
339peer, which is usually possible even when both hosts are behind a \s-1NAT\s0 361connection to the other peer, which is usually possible even when both
340gateway. 362hosts are behind a \s-1NAT\s0 gateway.
341.PP 363.PP
342If the hosts cannot reach each other because they have no common protocol, 364Routing via other nodes works because the \s-1SRCDST\s0 field is not encrypted,
343the originator instead use the router with highest priority and matching
344protocol as peer. Since the \s-1SRCDST\s0 field is not encrypted, the router host
345can just forward the packet to the destination host. Since each host uses 365so the router can just forward the packet to the destination host. Since
346it's own private key, the router will not be able to decrypt or encrypt 366each host uses it's own private key, the router will not be able to
347packets, it will just act as a simple router and protocol translator. 367decrypt or encrypt packets, it will just act as a simple router and
348.PP 368protocol translator.
349When no router is connected, the host will aggressively try to connect to
350all routers, and if a router is asked for an unconnected host it will try
351to ask another router to establish the connection.
352.PP
353\&... more not yet written about the details of the routing, please bug me
354\&...

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines