Communication is organized as a stack of layers, each build upon the one below it. The
purpose of each layer is to offer certain services to the higher layer. A particular layer
communicates with the same layer on another machine by a protocol.
The internet protocol stack consists of the following five layers:
Physical Layer moves bits from one machine to the
Data Link Layer moves packets (frames) from one node to the next one
Network Layer provides end-to-end transport of packets (datagrams) between hosts
Transport Layer transports application layer messages – either reliable with TCP or unreliable with UDP
Application Layer includes many protocols, such as HTTP for web document transfer, FTP for file transfer or SMTP for emails
The application shows the internet protocol stack with protocols for each layer. In reality,
no data is directly transferred from layer x on one machine to layer x on another machine. Instead
each layer passes data to the layer below, until the lowest layer is reached. In the physical layer
bits are transferred to the other side and data moves all way up to the application layer.