Describe the importance of a range of protocols
Protocols to know
- HTTP – hypertext transfer protocol. Used for sending web resources/websites.
- HTTPS – HTTP, except it uses TLS (transport layer security) to encrypt transmission for security.
- FTP – file transfer protocol.
- POP3 – post office protocol v3. Downloads an email from a server to a computer, then deletes the email from the server.
- IMAP – internet messaging access protocol. Used for managing emails on a remote server.
- SMTP – simple mail transfer protocol. Used for sending emails.
- SSH – secure shell. Used for remotely accessing computers, like servers.
- TCP – transmission control protocol. Splits data into packets.
- UDP – user datagram protocol. Splits data into packets.
- DHCP - dynamic host configuration protocol. When a device connects to a network, DHCP temporarily leases it an IP address from a pool of unused ones. Once the lease expires, or the device disconnects, the IP address is returned to the pool.
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:
- Reduces complex problems into smaller sub-problems.
- Devices and software can be made to operate at specific layers.
- Allows different products from different vendors to work together.
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:
- Application - An FTP client sends a file.
- Transport – Assembles data into packets, containing the data alongside attached information about the order of packets and port information.
- Network – Attaches source and destination IP addresses to the packets.
- Link – Attaches source and destination MAC addresses of physical NICs to which data will be sent.
We go back up the stack when receiving:
- Link – Strips MAC address from packet.
- Network – Strips IP addresses from packets.
- Transport – Reassembles packets in order (and requests packets to be resent if necessary). Strips port numbers.
- Application – The application accesses the file.