How do ports work with IPv6?

Viewed 149135

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:

127.0.0.1:80

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

::1

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

6 Answers

The protocols used in IPv6 are the same as the protocols in IPv4. The only thing that changed between the two versions is the addressing scheme, DHCP [DHCPv6] and ICMP [ICMPv6]. So basically, anything TCP/UDP related, including the port range (0-65535) remains unchanged.

Edit: Port 0 is a reserved port in TCP but it does exist. See RFC793

They're the same, aren't they? Now I'm losing confidence in myself but I really thought IPv6 was just an addressing change. TCP and UDP are still addressed as they are under IPv4.

I'm pretty certain that ports only have a part in tcp and udp. So it's exactly the same even if you use a new IP protocol

Related