Internet Layer
The Internet layer, or network layer in the OSI model, is in charge of transferring variable-length network packets and routing data from a source to a destination through one or more networks.
The predominant protocol in this layer today is the Internet Protocol (IP) on any of its two versions: version 4 (IPv4) and version 6 (IPv6). The Internet layer also includes diagnostic protocols like Internet Control Message Protocol (ICMP), a secure network protocol suite such as Internet Protocol Security (IPsec), and routing protocols including Open Shortest Path First (OSPF).
The Internet Protocol exchanges information via IP datagrams built from a header and a payload, which the link layer then transmits as frames over specific network hardware like Ethernet. The IP header carries the IP source and destination addresses of a packet used to route it through the Internet.
In this section we review:
- How to use the net package to parse and perform common tasks with IP addresses...