TCP/IP

TCP/IP

TCP/IP is the most common method for transmitting data packets over the internet. It is made up of the transmission control protocol and internet protocol. It operates across 4 connected layers: Application; Transport; Internet; Link.

TCP/IP stack

It is often referred to as the TCP/IP stack because data moves down the stack at the sending end to become packaged and up the stack at the receiving end to be reassembled.



Application layer

The application layer is where applications reside. The kind of application used determines the protocol used e.g. html to retrieve web pages or smtp to send an email.



Transport layer

This is where TCP operates. It establishes an end to end connection with the receiving computer. It splits the data into packets and labels them with the packet number and total number of packets in the transmission and the port number.
At the receiving end it uses the numbers to reassemble the message and identifies and re-requests any missing packets.



Internet layer

The internet layer is sometimes called the network layer or IP layer. This is where source and destination IP addresses are added. Routers operate at this layer.
At the receiving end IP addresses are stripped from packets before they are passed to the transport layer.



Link layer

This is the physical connection. This is where MAC addresses operate. MAC addresses are unique hard-coded 12 hex digit identifiers for network interface cards. These identify a specific individual device connected to the internet. The MAC address of our router and the next router in the chain are added to the packets.
At the other end these are stripped off again and packets are passed to the internet layer.



Hops between routers

Each time our packet arrives at a new router the link layer removes the MAC addresses and passes the packet to the internet layer. If the destination IP address doesn't match the IP address of this router it finds the next best router to pass the data on to and adds the MAC address of the current router and next router in the sequence so it can be sent on again.



Sockets

A socket is a combination of an IP address and a port number e.g. 163.234.123.23:25. A socket tells us what device data is going to, based on the IP address and what application on that device requires it based on the port it used.

Client ports

When a client on a network requests a web page. The request is made by the router and the data that is returned, is returned to a temporary arbitrary port number. This is a security measure to try to avoid revealing to hackers which ports may be open.

Knowledge check


Questions:
Correct:

Question text


© All materials created by and copyright S.Goff