The network layer
Data structures for networking
The IP suite nests data structures. Each nesting is called a layer. Each layer is used to handle a unique and well defined part of the process of transmitting information from sender to receiver. This means that in addition to a formatted structure at each layer, operations for software to process that layer have to be defined.
In the 70's, when the IP was invented, it was thought that five layers could be distinguised. In the 80's, the ISO worked out that seven were required to describe a network completely.
Original five layers
Seven layer model
IPv4 address classes
Initially classes were introduced to assist routing. Today routing has moved to be classless - CIDR and VLSM. However, classes are still used in networking
Unicasting is when one computer talks to another one. EG, a web browser -> server. This is enabled with TCP or UDP at layer 4.
Multicasting is when one computer sends the same message to several computers. EG, a stock exchange -> brokers. This is done with UDP multicast.
Broadcasting is a a mechanism of a copmuter sending a message to all computers on its own network.
Certain addresses in the IPv4 protocol are reserved for private use. They should never be routed onto the public Internet.
A private network may be built and then connected to the public Internet using a technique known as Network/Port Address Translation (NAT/PAT).
127.0.0.1 is a special IPv4 address. This is the loopback within the computer. IP packets are sent from the Transmit (Tx) to the Receive (Rx) within the same computer. This allows for testing of the software layers but not the physical layers. This is a good way to test a new piece of client/server software without setting up or configuring a network.