How do ports work with IPv6


Conventional IPv4 dotted quad notation separates the address from the port with a colon, as in this example of a webserver on the loopback interface:

but with IPv6 notation the address itself can contain colons. For example, this is the short form of the loopback address:


How are ports (or their functional equivalent) expressed in a textual representation of an IPv6 address/port endpoint?

Best Solution

They work almost the same as today. However, be sure you include [] around your IP.

For example : http://[1fff:0:a88:85a3::ac1f]:8001/index.html

Wikipedia has a pretty good article about IPv6:

Related Question