IP datagrams are forwarded across the internet through a process of encapsulation and forwarding. Routers along the path encapsulate each IP datagram within a link layer frame and forward it based on the destination address. If a datagram is larger than the maximum transmission unit of the outgoing link, routers fragment it into smaller pieces that are reassembled by the destination host. Forwarding tables allow routers to determine the next hop for each datagram using longest prefix matching.