Networking

Describe the importance of a range of protocols

Protocols to know

Transferring files with FTP

FTP (file transfer protocol) is used to move files across a network. It operates on two different ports. The first is for data transfer. The second is where commands to the server are sent through.

FTP uses the client-server model.

Usernames and passwords are typically used to protect access to files and to identify users.

Sending and receiving email

Mail servers are specialised servers responsible for storing emails, providing access to clients and providing services to send emails.

Uses the protocols POP3, IMAP and SMTP.

Web pages and web servers

Web pages are written in HTML, CSS and Javascript.

Web servers are dedicated servers that host websites and resources on request, such as HTML, CSS and Javascript files, images, videos, etc.

Difference between TCP and UDP

You need to be able to describe the differences between TCP and UDP, which both split data into packets.
TCP UDP
Requires established connection before transmission begins, which is closed when transmission is complete. Does not require an established connection.
Retransmits lost packets. Lost packets are skipped.
Has more extensive error checking and acknowledgement of data. Has only basic error checking using checksums.
Cannot be used for broadcasting. Can be used for broadcasting.
Is slower, but needed for applications where data needs to arrive intact, like websites. Is less reliable, but needed for applications like video and music streaming, as its superior speed is required and new packets need to be sent rather than retransmitting corrupted ones.

Layers

Networking is highly complex, so layering is used to divide it into smaller, simpler tasks that link together.

Each layer and its relevant hardware/software has a specific role and provides service to the layer above it.

Advantages:

TCP/IP

Refers to a set of networking protocols. Made out of four layers (that you need to know for A-level).

Incoming and outgoing data packets pass up and down the layers.

Here are the layers, top to bottom:

Layer Description
Application For networking applications, like web browsers, which use the data. Includes FTP, HTTP(S), SMTP and IMAP.
Transport Splits data into packets. Packets are numbered sequentially. On the receiving end, this allows it to verify that all packets have been received. Adds port number (more on this later). Includes TCP (transmission control protocol) and UDP (universal datagram protocol).
Network Addresses packets with the source and destination IP addresses. A router forwards each packet towards an endpoint called a socket, a combination of an IP address and a port number from the transport layer. Each router uses a routing table to figure out where data should hop next. Includes IP.
Link Layer Network hardware. Uses the MAC addresses of the NICs that packets should be sent to based on the destination IP address. MAC addresses change with each hop. Includes fibre optic cables, Wi-Fi and copper twisted pair cables.

Port numbers

Protocols use port numbers to specify what type of data is being sent.

IP address + port number = socket.

Example: 192.168.23.433:80 is a socket, where 192.168.23.443 is the IP address, and 80 is the port.

Ports alert a specific application to deal with data sent to a computer.

Port numbers to know

Port Description
20 FTP DATA.
21 FTP CONTROL.
22 SSH login.
23 Telnet login.
25 SMTP
80/8080 HTTP.
110 POP3.
143 IMAP.
443 HTTPS.

Sending and receiving data with TCP/IP

Example: a file is being transmitted across an Ethernet network using FTP and TCP/IP.

We go down the stack when sending:

We go back up the stack when receiving: