Fixed a stx err
[6bed4] / 6bed4router.man
1 .TH 6BED4 8 "Februari 1, 2011"
2 .\" Please adjust this date whenever revising the manpage.
3 .\"
4 .\" Some roff macros, for reference:
5 .\" .nh        disable hyphenation
6 .\" .hy        enable hyphenation
7 .\" .ad l      left justify
8 .\" .ad b      justify to both left and right margins
9 .\" .nf        disable filling
10 .\" .fi        enable filling
11 .\" .br        insert line break
12 .\" .sp <n>    insert n+1 empty lines
13 .\" for manpage-specific macros, see man(7)
14 .SH NAME
15 6bed4router \- server-side daemon for 6bed4 service
16 .SH SYNOPSYS
17 .B 6bed4router
18 [\fB\-t\fR \fI/dev/tunX\fR] \fB\-l\fR \fIv4addr\fR \fB\-L\fR \fIv6prefix/64\fR
19 .PP
20 .B 6bed4router
21 [\fB\-h\fR]
22 .SH DESCRIPTION
23 .PP
24 Through a \fB6bed4router\fR daemon, it is possible to make a small range of IPv6
25 addresses available to IPv4-only users.  This means that even an IPv4-only
26 network can host IPv6-only applications, as long as they can fall back on
27 a tunnel based on this profile.
28 .PP
29 These tunnels are primarily intended for embedded devices, to assist them
30 in instant changeover from being IPv4-only to being IPv6-only.  Given the
31 restricted resources in embedded applications, this is likely to improve
32 the speed of transitioning to IPv6.  To avoid cluttered access, these
33 tunnels should be reserved for resource-hampered devices.  For routers,
34 transitioning mechanisms like 6to4 and 6in4 are more suitable.  For
35 desktops, tunnelling routers or a direct link to a subscription tunnel
36 service is a better solution.
37 .PP
38 The NAT traversing aspect of this profile is needed to support the normal
39 openness of IPv6 connections.  This is achieved by packing IPv6 into UDP
40 and then into IPv4.  This is a guaranteed manner of traversing NAT,
41 provided that this daemon listens to a public IPv4 address.  The daemon
42 currently does not support any other modes of operation.
43 .PP
44 The public-use aspect of this profile means that there is no requirement for
45 clients to register.  However, this does not mean that the use of \fB6bed4router\fR
46 makes it possible to browse IPv6 networks anonymously; in order to
47 ensure traceability of abusive behaviour, the IPv4 address and UDP port
48 of the tunnel client are mentioned in the IPv6 address.  See ADDRESS FORMAT
49 below for details, and SECURITY CHECKS for further precautions against abuse.
50 .PP
51 The intended application of clients under this transitionary mechanism are
52 IPv6-only devices that need a transport over an IPv4-only network.  The
53 reason for defining IPv6-only device can be simplicity, or making IPv6
54 more efficient and/or more useful.  To avoid making IPv6 a breaking
55 requirement in roll-outs, devices for such an IPv6-only service could
56 implement this mechanism to provide a simple backward-compatible mode for
57 IPv4-only network nodes, without impairing all advantages of being IPv6-only.
58 .PP
59 This daemon is in fact a stateless translation between an IPv4 client
60 and the general IPv6 world; to configure an IPv6 address on the tunnel
61 client side it will perform autoconfiguration over the tunnel.  The
62 assigned prefix will be a /112, with 16 bits of interface identifiers
63 to fill in.  The interface identifier 0 is reserved for the router,
64 or in other words, the tunnel server.
65 .PP
66 The tunnel server implementation listens to a UDP socket on port 3653
67 on the IPv4 side, and to a
68 tunnel endpoint to capture all traffic matching an IPv6 /64 prefix.
69 It basically tosses traffic back and forth between these interfaces,
70 but not without performing the SECURITY CHECKS desribed below
71 on what is tossed at it.
72 .SH OPTIONS
73 .TP
74 \fB\-t\fR \fI/dev/tunX\fR
75 .TP
76 \fB\-\-tundev\fR \fI/dev/tunX\fR
77 Instead of creating a tunnel for the duration that \fB6bed4router\fR runs,
78 use one that already exists and that has already been setup with
79 the proper IPv6 prefix.  This option makes it possible for
80 non-root users to run \fB6bed4router\fR.  All that is required is acccess to
81 the tunnel device by the user that runs \fB6bed4router\fR.  Optional on Linux.
82 .TP
83 \fB\-l\fR \fIv4addr\fR
84 .TP
85 \fB\-\-v4listen\fR \fIv4addr\fR
86 Bind to the given local IPv4 address and listen for incoming IPv6
87 neighbour discovery packages as well as general IPv6 traffic.  Required.
88 .TP
89 \fB\-L\fR \fIv6prefix/64\fR
90 .TP
91 \fB\-\-v6prefix\fR \fIv6prefix/64\fR
92 Bind to the given IPv6 address range through a tunnel device, and
93 forward incoming IPv6 messages to IPv4-based UDP tunnel endpoints.
94 See ADDRESS FORMAT below for an explanation of the lower half of
95 the IPv6 addresses.  Required.
96 .IP
97 If no \fB\-t\fR option is given, a tunnel will be created for the time that
98 \fB6bed4router\fR is running, and the \fIv6prefix/64\fR is used as a router address
99 on that interface.  Routing table entries will not be setup by \fB6bed4router\fR,
100 nor will the general ablity to forward IPv6 traffic.
101 .TP
102 \fB\-h\fR
103 .TP
104 \fB\-\-help\fR
105 Print usage information and exit.
106 .SH ADDRESS FORMAT
107 .PP
108 An IPv6 address used from \fB6bed4router\fR reveals the IPv4 address and UDP port
109 used by the tunnel endpoint.  This format is checked on sending from
110 the IPv4 tunnel to IPv6, and used to reconstruct the IPv4 tunnel access
111 information for traffic from IPv6 to the IPv4 tunnel.
112 .PP
113 The format of the IPv6 addresses managed by \fB6bed4router\fR are:
114 .PP
115 \fIv6prefix\fR + \fIv4addr\fR + \fIudp-port\fR + \fIinterfaceidentifier\fR
116 .PP
117 In this format, the \fIv6prefix\fR is configured with the \fB\-L\fR option,
118 and the \fIv4addr\fR with the \fB\-l\fR option.  The \fIudp-port\fR is noted on
119 arrival of a packet on the IPv4 tunnel side of \fB6bed4router\fR.
120 .PP
121 The \fIinterfaceidentifier\fR is always 0 on the router side, and may be set
122 to other values to distinguish 65,535 different client addresses.  As
123 the main application foreseen for \fB6bed4router\fR is to get IPv6-only tools and
124 devices working on an IPv4-only network, it is very likely that the clients
125 will pick a fixed \fIinterfaceidentifier\fR such as 1 and hard-code it.
126 .PP
127 Due to the IPv6 practice of assigning link-local names composed of \fBfe80::\fR
128 and the \fIinterfaceidentifier\fR, the router-side of a tunnel can always
129 be addressed as \fBfe80::0\fR and clients can be found at addresses ranging
130 from \fBfe80::1\fR to \fBfe80::ffff\fR.
131 .PP
132 Incoming IPv6 traffic destined for a serviced address is first checked
133 as specified under SECURITY CHECKS, and then forwarded to \fIudp-port\fR at
134 \fIv4addr\fR.  In doing so, the IPv6 packet is embedded in whole inside
135 the UDP packet.  The IPv6 addresses are not altered, but only used
136 to derive IPv4 contact information.
137 .PP
138 Outgoing IPv6 traffic arriving on the IPv4 tunnel side of \fB6bed4router\fR will
139 be checked to have been sent from the right \fIv6prefix\fR and mention
140 the \fIv4addr\fR and \fIudp-port\fR matching the client's public side.  That
141 is, NAT may translate the IPv4 address and UDP port used, but these
142 parts of the IPv6 address should show how it is forwarded to \fB6bed4router\fR.
143 Note that autonegotiation protocol provides this necessary information at the
144 time the \fB6bed4router\fR daemon starts.  If the NAT mapping changes during the uptime
145 of the tunnel, a new Router Advertisement is sent from tunnel server to
146 client, to notify it of the new prefix to use.  The original message is
147 then discarded.
148 .PP
149 If it is desired to keep the same IPv6 address for longer periods, it
150 is recommended that the client keeps NAT state intact by regularly
151 sending over the UDP port to the tunnel endpoint.  For example, a regular
152 ping could do that.  Alternatively, a client-mode only daemon could
153 ensure that it is sending regularly during the times that an outside
154 party might wish to send to it.  This is under the assumption that no
155 explicit mapping in NAT overtakes this responsibility of an active
156 mapping between the internal and external address space.
157 .SH SECURITY CHECKS
158 .PP
159 Not everything will be passed through \fB6bed4router\fR, even if this would be
160 technically possible.  A few security checks are applied to silently
161 drop traffic that looks evil.
162 .PP
163 Packets should be long enough to at least contain the IPv6 traffic
164 and a minimal payload size.  Also, it should not exceed a predefined
165 MTU of 1280 bytes for IPv6.
166 .PP
167 IPv6 traffic uploaded through the IPv4 side should reveal the proper
168 IPv4 settings in the IPv6 source address, as specified under
169 ADDRESS FORMAT above.  This is basically the tunnel aspect of egress
170 filtering.
171 .PP
172 Tunnel commands should adhere to the format of RFC 5722 and may not
173 contain any NUL characters.
174 .SH BUGS
175 Currently, \fB6bed4router\fR does not use ICMP notifications at the IPv4
176 level to provide smart feedback to an IPv6 client.  It is undecided
177 at this point if this would add value.
178 .PP
179 To be able to fallback to this TSP profile, an IPv6-only application
180 needs to find a \fB6bed4router\fR or similar service.  A general naming
181 or numbering scheme is needed to make that straightforward.  The
182 \fB6bed4router\fR service could be setup privately and configured in
183 individual IPv6-only nodes, but it could accelerate the introduction
184 of IPv6-only nodes if this were organised by network providers.
185 .PP
186 Ideally, \fB6bed4router\fR would be near all heavily connected nodes
187 of the Internet.  There, they would improve connectivity without
188 being a detour for the traffic.  Alternatively, it would be located
189 in various uplinks.  To optimise routing, it is possible to assign
190 a fixed IPv4 address and IPv6 prefix for \fB6bed4router\fR running
191 anywhere; its stateless operation means that traffic going back and
192 forth can go through different instances of \fB6bed4router\fR without
193 posing problems.
194 .PP
195 The \fB6bed4router\fR daemon is a piece of highly efficient code,
196 and it should be able to handle very high bandwidths.  A stress
197 test has not been conducted yet.
198 .PP
199 This daemon does not pass on QoS headers as it should according to the
200 specification.
201 .SH LICENSE
202 Released under a BSD-style license without advertisement clause.
203 .SH SEE ALSO
204 The 0cpm project is an example of an IPv6-only SIP application
205 that can use \fB6bed4router\fR and comparable TSP tunnel services to
206 demonstrate the advantages of IPv6 to end users.  It is also
207 a typical example of a transitionary need for something like
208 \fB6bed4router\fR.
209 .PP
210 http://0cpm.org/ \- the homepage of the 0cpm project.
211 .PP
212 http://devel.0cpm.org/6bed4/ \- the homepage of \fB6bed4\fR.
213 .PP
214 RFC 5722 \- the authoritative description of TSP, of which \fB6bed4\fR
215 implements a specific profile for public service under NAT traversal.
216 .SH AUTHOR
217 \fB6bed4router\fR was written by Rick van Rein from OpenFortress.
218 It was created to support the 0cpm project.