Computing - TCP/IP Stack
AQA Computer Science 2022
The TCP/IP stack and its layers
What is the TCP/IP stack?
A set of rules to format a message so it can be sent over a network.
What does each layer do in the TCP/IP stack?
Wraps a packet with header data.
The Application layer
What is the Application layer used for?
Providing services for applications that want to communicate across a network.
Instead of determining how the data will be sent, what does the Application layer do?
Specifies rules of what should be sent.
What is an example of Application layer protocols?
- HTTP
- HTTPS
- SMTP
- FTP
The Transport layer
What is the Transport layer used for?
Establishing an end-to-end connection with a recipient computer.
What does TCP do to data in order to send it over the network?
Splits it into packets and numbers them sequentially.
At the receiving end of the TCP protocol, what will the client do?
Confirms the packets have been received and requests any missing packets.
The Internet layer and sockets
Why does a router send a packet to a socket rather than an IP address?
Because the socket contains both the IP address and the port number.
What does the IP do to packets?
Adds source and destination IP addresses.
The Link layer
What does the Link layer add to packets?
The MAC address of the destination.
Unwrapping at the receiving end
What does the Link layer on the receiving end do to each packet?
Removes the MAC address and passes it to the Network layer.
What does the Network layer on the receiving end do to each packet?
Removes the IP address from each packet and passes it to the Transport layer.
What 2 things does the Transport layer on the receiving end do to each packet?
Removes the port number from each packet and reassembles the packets in the correct order before passing it to the Application layer.
SSH tunnelling and email protocols
What is SSH tunnelling used for?
Securely passing data through a network that might otherwise be blocked.
What is POP3?
An old email protocol that removed emails from the server after they’d been seen.
IP addresses and special ranges
What is an IP addresses?
A unique identifier given to a computer or network node.
What does a $x.y.z.0$ IP address represent?
The gateway to the network, such as the router.
What does a $x.y.z.255$ IP address represent?
A broadcast address that will send data simultaneously to all hosts on a network.
What is a loopback address?
Where outgoing data sent to that address is treated as incoming.
How many chunks of 4 hexadecimal characters are there in an IPv6 address?
Network and host identifiers
What are the two parts of an IP address?
- A network identifier
- A host identifier
What is the difference between an network identifier and a host identifier in an IP address?
Network identifiers identify the network as a whole, host identifiers identify a specific device on a network.
\[142.67.57.253\]
What is the network ID of this IP address?
Classful and classless addressing
What are the two types of IP addressing (not versions)?
- Classful
- Classless
Why do we use classless suffixes like $/24$ in IP addresses?
Because it enables IP addresses with varying proportions of Network IDs and Host IDs.
How does a computer know what is the Network ID when using classless addressing?
It uses a subnet mask.
How does a subnet mask work?
It has all Network ID bits set to $1$ so that when it is ANDed with the IP it leaves only the Network ID.
If a network has a subnet mask $11111111.11111111.11111111.11110000$, how many hosts can operate on the network?
Subnetting
Why might an organisation want to use subnetting?
- It reduces the broadcast domain
- It reduces data collisions
- It improves security
What is subnetting?
Where an organisation decides to further subdivide the number of host IDs within a network in order to create individual subnetworks.
DHCP
What is the purpose of DHCP?
To provide a host with an IP address and other information on a network.
What examples of information does DHCP provide?
- IP address
- Subnet mask
- Default gateway
What does this diagram show?