From eba5634f2c6d0eced75aacd28a5ae5e5d0613911 Mon Sep 17 00:00:00 2001 From: Daniel Schneller Date: Wed, 13 Apr 2016 00:26:52 +0200 Subject: [PATCH] DOC: Clarify IPv4 address / mask notation rules 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 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/configuration.txt b/doc/configuration.txt index 9602b37bd..7a3fff174 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -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