The Transfer Control Protocol/ Internet Protocol are split into four different layers, with the complete model being referred to as the stack. The layers consist of the application, transport, network and link layers. When data needs to be sent, it is passed down the stack from the application layer to the link layer. When data is received, it is passed up the stack from the link layer to the network (also known as the internet) layer, where the data’s destination can be discovered and either further passed up the layers if it has reached its destination or passed down and along to its destination. This is a part of the packet switching method of data transferral, which will be expanded on later.
|Application Layer||The application layer is responsible for encoding the data that is to be sent. It includes the protocols used for providing services and passing application data along the network. Protocols in this layer include the Hypertext Transfer Protocol (HTTP), the File Transfer Protocol (FTP), the Simple Mail Transfer Protocol (SMTP), etc. These protocols use lower level protocols for data transfer. Many of these protocols have reserved ports for data transfer, such as 80 and 8080 for HTTP.|
|Transport Layer||The transport layer receives the data from the application layer and splits it into separate packets, with an order number and port number. It is also responsible for error control, flow and congestion control.|
|Network/ Internet Layer||The network layer is responsible for attaching the sender and destination IP address. The IP addresses combined with the ports create sender and receiver sockets. It is also responsible for packet routing, forwarding the data packets to the next router towards their destination.|
|Link Layer||The lowest layer in the TCP/IP stack. The link layer is the direct physical link between the networks, and is responsible for data transfer. The link layer adds the MAC address, which identifies the hardware devices the data is being sent to and from.|