You can enclose the address in square brackets as is done with URLs [see RFC2732]. This example shows the use of brackets: http://[2001:db8::1]:80.
If brackets are used, the prefix length must be inserted outside of the square brackets as follows:
-
Correct usage: [2001:db8::]/64
-
Do not use the following format: [2001:db8::/64]
The prefix/length notation is syntactically indistinguishable from a valid URL. For that reason, the prefix/length notation must be used only from within a context where it cannot be mistaken for something else, such as a URL.
In some specific cases, it might be necessary to give a zone identifier as part of the address, as is shown in the following example: fe80::1%eth0. In general, applications should not need to parse these identifiers.
-
Some applications might also represent IPv6 address literals differently; for example, SMTP [see RFC 2821] uses [IPv6:2001:db8::1].
-
The use of address literals is strongly discouraged for general-purpose direct input to the applications. Host names and DNS should be used instead.