3
<title>Notes on IPv6 Handling in Rsyslog</title>
6
<h1>Notes on IPv6 Handling in Rsyslog</h1>
7
<p><b>Rsyslog fully* supports sending and receiving syslog messages via both
8
IPv4 and IPv6.</b> IPv6 is natively supported for both UDP and TCP. However,
9
there are some options that control handling of IPv6 operations. I thought it is
10
is a good idea to elaborate a little about them, so that you can probably find
11
your way somewhat easier.</p>
12
<p>First of all, you can restrict rsyslog to using IPv4 or IPv6 addresses only
13
by specifying the -4 or -6 command line option (now guess which one does
14
what...). If you do not provide any command line option, rsyslog uses IPv4 and
15
IPv6 addresses concurrently. In practice, that means the listener binds to both
16
addresses (provided they are configured). When sending syslog messages, rsyslog
17
uses IPv4 addresses when the receiver can be reached via IPv4 and IPv6 addresses
18
if it can be reached via IPv6. If it can be reached on either IPv4 and v6,
19
rsyslog leaves the choice to the socket layer. The important point to know is
20
that it uses whatever connectivity is available to reach the destination.</p>
21
<p><b>There is one subtle difference between UDP and TCP.</b> With the new
22
IPv4/v6 ignorant code, rsyslog has potentially different ways to reach
23
destinations. The socket layer returns all of these paths in a sorted array.
24
For TCP, rsyslog loops through this array until a successful TCP connect can be
25
made. If that happens, the other addresses are ignored and messages are sent via
26
the successfully-connected socket.</p>
27
<p>For UDP, there is no such definite success indicator. Sure, the socket layer
28
may detect some errors, but it may not notice other errors (due to the
29
unreliable nature of UDP). By default, the UDP sender also tries one entry after
30
the other in the sorted array of destination addresses. When a send fails, the
31
next address is tried. When the send function finally succeeds, rsyslogd assumes
32
the UDP packet has reached its final destination. However, if rsyslogd is
33
started with the "-A" (capital A!) was given on the command line, rsyslogd will
34
continue to send messages until the end of the destination address array is
35
reached. This may result in duplicate messages, but it also provides some
36
additional reliability in case a message could not be received. You need to be
37
sure about the implications before applying this option. In general, it is NOT
38
recommended to use the -A option.</p>
39
<p><i><b>*</b>rsyslog does not support RFC 3195 over IPv6. The reason is that
40
the RFC 3195 library, <a href="http://www.liblogging.org/">liblogging</a>,
41
supports IPv4, only. Currently, there are no plans to update either rsyslog to
42
another RFC 3195 stack or update liblogging. There is simply no demand for 3195
44
<p><font size="2">Last Updated: 2007-07-02<br>
45
Copyright © 2007 by Rainer Gerhards, released under the GNU GPL V2 or later.</font></p>