]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: Clarify IPv4 address / mask notation rules
authorDaniel Schneller <ds@danielschneller.de>
Tue, 12 Apr 2016 22:26:52 +0000 (00:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 13 Apr 2016 05:20:46 +0000 (07:20 +0200)
Adds some examples regarding shorthand IPv4 address notation which might
be confused with RFC 4632 CIDR notation, leading to different than
expected results.

doc/configuration.txt

index 9602b37bdd453c1dd6e5c28ec3ed362d2a38fdd8..7a3fff174f12c386aa72ef4b8a6e668fa8549a2f 100644 (file)
@@ -11473,6 +11473,21 @@ at least ensure that they are present in /etc/hosts so that the configuration
 does not depend on any random DNS match at the moment the configuration is
 parsed.
 
+The dotted IPv4 address notation is supported in both regular as well as the
+abbreviated form with all-0-octets omitted:
+
+    +------------------+------------------+------------------+
+    |   Example 1      |     Example 2    |     Example 3    |
+    +------------------+------------------+------------------+
+    |  192.168.0.1     |   10.0.0.12      |   127.0.0.1      |
+    |  192.168.1       |   10.12          |   127.1          |
+    |  192.168.0.1/22  |   10.0.0.12/8    |   127.0.0.1/8    |
+    |  192.168.1/22    |   10.12/8        |   127.1/8        |
+    +------------------+------------------+------------------+
+
+Notice that this is different from RFC 4632 CIDR address notation in which
+192.168.42/24 would be equivalent to 192.168.42.0/24.
+
 IPv6 may be entered in their usual form, with or without a netmask appended.
 Only bit counts are accepted for IPv6 netmasks. In order to avoid any risk of
 trouble with randomly resolved IP addresses, host names are never allowed in