TCP/IP

What is TCP/IP

These two protocols are used to send data across the internet.

There are 4 layers to the TCP/IP model: application, transport, internet and link.

The application layer

Protocols at this layer: HTTP, HTTPS, FTP, SMTP, IMAP

This is where applications operate. This might be your email client, web browser, ftp client etc. They send requests which are passed to the transport layer.

At the receiving end they receive the data and display it whether that is a webpage or an email or something else.

The transport layer

Protocols at this layer: TCP, UDP

This layer sets up the communication between the two hosts and agrees settings such as the size of packets and language to use.

The transport layer accepts requests from the application layer and packages them up ready to send and passes them to the internet layer.

At the receiving end the transport layer receives data from the internet layer and puts packets back into order and rerequests any missing packets. Once it has all the packets it passes them back to the application.

The internet layer

Protocols at this layer: IP

The internet layer adds the source and destination IP addresses.

The internet layer receives packaged data from the transport layer and it passes it to the link layer.

When receiving data the internet layer checks if it is at its destination. If it is then it passes the data to the transport layer. If not it checks what the next router it should send it to is and passes it back to the link layer.

The link layer

The link layer is where MAC addresses operate

The link layer receives labelled packets from the internet layer. It then adds the MAC address of the sending and receiving devices. If it were going from a terminal on a network to the company email server on the same network then the middle section of the diagram above would not be needed. That represents a version of the path if data is on another network.

When receiving data the link layer removes the MAC addresses and passes the data to the internet layer.

When the data goes between networks

Lets say instead it was a request for a webpage. The first time it reaches the link layer the MAC address of the device and our network router will be added. When it reaches the router the MAC addresses will be removed and the data passed to the internet layer. Upon realising it is not at its destination IP address it will find the best router to pass it to in the right direction and pass it back to the link layer where the MAC address of the current router and the next router are added. This process would likely happen many times before it reaches the correct address.

Knowledge check


Questions:
Correct:

Question text


© All materials created by and copyright S.Goff