Network layers, TCP/IP stack & packet switching
Computer Science · Networking
Question 1 of 10
0Which protocol do web browsers use to request and load web pages?
Stuck? Read the explanation
Unlocks at a streak of 5 correct answers in a row.
Embed this practice on your site or class page
Paste this HTML into your page. Students practise right there; it is free and needs no account.
Network layers, TCP/IP stack & packet switching explained
A computer network is a set of devices connected so that they can exchange data. To keep this manageable, communication is split into layers, each of which deals with one job and relies on the layer below. The TCP/IP model has four layers: the application layer, which holds programs' data, such as web pages sent by HTTP; the transport layer, which provides the connection between two programs; the internet layer, which moves packets between networks using IP addresses; and the network access layer, which sends data across the physical link using frames and MAC addresses.
Two transport protocols are common. TCP is connection-oriented, so it sets up a connection, checks that data arrives, puts it back in order, and resends anything lost. UDP is connectionless and faster, with no such checks, which suits video calls and games.
Packet switching divides a message into small packets. Each packet carries a header with the source and destination addresses and a sequence number, and each packet can take a different route through the network. The receiver uses the sequence numbers to reassemble the message. Packet switching shares network links efficiently, whereas circuit switching, as used by the old telephone network, reserves a full path for the whole call.
Worked example
A web page is requested. Which layer adds the port number that identifies the web browser's connection, and which layer adds the destination IP address?
- The port number identifies the program on each end, so it belongs to the transport layer, which uses TCP here.
- The destination IP address is added by the internet layer, so the packets can be routed to the server.
What you will practise
123 multiple-choice questions (Easy, Medium, Hard). Each answer is followed by an explanation.
Example questions
- In the TCP/IP model, which layer carries protocols such as HTTP and SMTP that give programs their network services?
- What is the main job of the internet layer, which uses IP, in the TCP/IP model?
- A user sends a large file over the internet. In packet switching, what is the file divided into before it is sent?
- Which protocol do web browsers use to request and load web pages?
- Which transport-layer protocol delivers data reliably, resending lost packets and putting packets back in order?
- In packet switching, what kind of information does each packet’s header contain?
- Which device forwards packets between different networks, such as a home network and the internet?
- What does the abbreviation IP stand for in TCP/IP?
…and 115 more.