[bind10-dev] Convention when specifying address and port
Shane Kerr
shane at isc.org
Wed Jul 6 09:36:34 UTC 2011
Stephen,
On Wed, 2011-07-06 at 10:12 +0100, Stephen Morris wrote:
> Two forms currently in use in BIND 10 are:
>
> address#port 192.0.2.1#53 2001:db8::1#53
> address(port) 192.0.2.1(53) 2001:db8::1(53)
>
> Also suggested is
>
> [address]:port [192.0.2.1]:53 [2001:db8::1]:53
For the record, my own preference is to use the same style as URLs:
192.0.2.1:53
[2001:db8::1]:53
It is slightly inconsistent, but it follows a standard.
This is from RFC 2396:
http://www.ietf.org/rfc/rfc2396.txt
hostport = host [ ":" port ]
host = hostname | IPv4address
...
IPv4address = 1*digit "." 1*digit "." 1*digit "." 1*digit
port = *digit
And from RFC 2732:
http://www.ietf.org/rfc/rfc2732.txt
To use a literal IPv6 address in a URL, the literal address should be
enclosed in "[" and "]" characters
--
Shane
More information about the bind10-dev
mailing list