enriched in subsequent versions of IP; in particular, IPv6 introduces more complexity in the protocol, always maintaining its nature of pure datagram-oriented transport layer protocol. 3.2.3.3 Internet Layer: Internet Protocol The IP is the main protocol for data transmission in the Internet layer. The principle of IP working relies on the segmentation and encapsulation of segments coming from the upper layer. In particular, each segment is divided, if necessary, in datagrams, whose maximum length is 65,535 bytes and encapsulated into an IP envelop; the IP header contains, among other information, the sender and the destination IP address, and in case of IPv4, also a checksum is calculated to provide protection from errors. When IPv6 was defined, the checksum was eliminated in favor of faster routing, since the checksum is calculated every time an IP datagram is processed by a network router. The encapsulation provides complete abstraction from the content of datagrams: every service related issue has to be solved by other layers. From the moment in which they are created, datagrams travel independently through the network, routed on the ground of the destination address. Since IP does not establish any connection between the source and the destination of a message (it is a connectionless protocol), different datagrams, even constructed starting Networks Fundamentals and Present Architectures from parts of the same upper layer segments, can arrive in the wrong order at destination, and datagram loss or duplication can happen without any IP control. The message integ- rity is all responsibility of upper layer protocols. The key of IP addressing is constituted by the fact that all addressable network entities are labeled with an IP address that is used by the different routing algorithms to route datagrams through the network. As a matter of fact, when an IP datagram is received and stored in the inner queue of a router input port, its IP address is read and constitutes the input to the routing table, whose output 