IPv6 is the most recent version of the Internet Protocol, which lives in the Internet Layer of the TCP/IP network stack. It is specified in several IETF RFCs, most notably RFC 8200, “Internet Protocol, Version 6 (IPv6) Specification”, July 2017,
The protocols you are most familiar with live in the Application Layer. These include protocols such as HTTP (web), FTP (file transfer), SMTP, IMAP (E-mail), LDAP (network directory), etc. Application protocols use protocols from the next layer down (Transport Layer) to actually send and receive data (in streams, with TCP, or datagrams with UDP).
TCP and UDP use IP in the next layer down (Internet Layer) to send and receive individual IP packets. TCP and UDP add the concept of ports (like port 25 for SMTP) to the packets. At this layer, on the way out, a TCP or UDP header is added to the packets to help them be delivered to the appropriate application (e.g. an email server) on the destination node. Port numbers are 16 bits long (even in IPv6), so there are 65,536 (2 to the 16th) of them for each node. You might think of the port number as the fractional part of a node address (the email server is at mailserver.00025).
IP uses protocols in the bottom layer (Link Layer) to read and write data on a specific network medium, such as Ethernet or Wi-Fi. IP adds an IPv4 or IPv6 packet header to the packets from the Transport Layer. Each packet has a source and destination port number in the Transport Layer header. These help the packets get delivered to the correct node. The Internet uses DNS to map nodenames onto IP addresses. The packets don’t actually contain the nodenames you think in terms of (like www.thirdinternet.com) – they contain the IP addresses for the sender (source) and recipient (destination) node. Each IP packet has a source and destination IP address, which is kind of like a shipping label, the helps get the packet to its destination. DNS is used in the Application Layer to map nodenames onto IP addresses, which is what actually goes into the packets. For example, the nodename www.thirdinternet.com maps onto a public IPv4 address and an public IPv6 address, so that my site can be accessed from anywhere in the world, over IPv4 or IPv6.
Default Server: ws2008a.hughesnet-sg.org
The Internet Layer performs internetworking. This involves being able to route packets from any node in the global Internet to any other node in the global Internet, possibly crossing many subnets in the process. It uses IP addresses and various routing protocols (such as RIP and ISIS) to decide how to do this. Without IP, all networking would be limited to a single subnet. Every node on the public Internet has a unique IP address. With IPv4 there are a few billion possible public IP addresses. With IPv6 there are about 340 trillion, trillion, trillion possible public IP addresses. One of the main reasons for switching to IPv6 is due to the much larger address space. We have exhausted the IPv4 address space. We will likely never exhaust the IPv6 address space. I know, famous last words, and nobody will ever need more than 640K of RAM.. but 2 to the 128th is a seriously large number.
The Link Layer can only send or receive data within a single network link (subnet or connection between two subnets). It uses Link Layer addresses to do this. With Ethernet and Wi-Fi, these are MAC addresses, which are built into the network interfaces by their vendors. Even on the Third Internet we are still using the same old Link Layer addresses on all nodes. Remember, the Link Layer really doesn’t change with IPv6. We can’t use Link Layer addresses to route packets around – they are effectively randomly distributed all over the world. IP addresses are laid out in a way that you can figure out how to get packets to the destination address.
Another protocol (ARP in IPv4, ND in IPv6) does address resolution, which maps IP addresses onto the appropriate Link Layer addresses for a given transmission between nodes. Ideally the source and destination IP addresses (from the IP header), and the source and destination port numbers (from the Transport header) never change from the original sender to the final recipient. In reality, Network Address Translation (NAT) breaks this rule in a very bad way. A new Link Layer frame is wrapped around the IP packet for each leap to a new subnet, with appropriate source and destination Link Layer addresses.