OSI Model and TCP/IP Model Notes for SSC Exams
Rahul Kumar
SSC Exam Expert & Content Editor
In this note
- 1.What Is a Network Model and Why Do We Need It?
- 2.The Seven Layers of the OSI Model
- 3.Layer-wise Details You Must Remember
- 4.Network Devices and the Layers They Work At
- 5.The TCP/IP Model and Its Layers
- 6.TCP vs UDP
- 7.Well-known Port Numbers
- 8.IP Address and Its Classes
- 9.Encapsulation: How the Data Travels
- 10.Important Questions Explained
- 11.Quick Tips to Remember
- 12.Common Mistakes to Avoid
- 13.Quick Revision Points
- 14.Practice Questions With Answers
- 15.How to Practise This Topic
- 16.Related Notes and Practice
- 17.Frequently Asked Questions
PDF Notes: OSI Model and TCP/IP Model Notes for SSC Exams
Premium PDF · one-time payment of ₹5 · instant access
The OSI model and the TCP/IP model are the favourite topics of the networking section of SSC Computer Knowledge. The questions are direct: how many layers are there, which layer does routing, which device works at which layer and which protocol belongs to which layer. These OSI model and TCP/IP model notes for SSC explain every layer with its function, the devices, the protocols, the port numbers and the IP address classes in simple tables, followed by 20 practice questions. Read them with the Computer Network Notes, Internet Protocols Notes and Internet and Networking Notes notes.
What Is a Network Model and Why Do We Need It?
When two computers talk to each other, many things have to be decided: how the signals travel on the cable, how the data is divided into pieces, how the errors are found, how the right computer is reached and how the user sees the data. A network model divides this big job into small layers, and every layer does one job and talks only to the layer above and the layer below it. This makes the network easy to design, to understand and to repair.
- The OSI model (Open Systems Interconnection) is a reference model made by the ISO (International Organization for Standardization) in 1984. It has 7 layers.
- The TCP/IP model is the practical model on which the internet works. It was developed by the US Department of Defense (ARPANET) and has 4 layers (some books show 5 layers).
- OSI is a theoretical guide, while TCP/IP is the model that is actually used.
- Every layer adds its own header to the data while sending (encapsulation) and removes it while receiving (de-encapsulation).
The Seven Layers of the OSI Model
| Layer no. | Layer name | Main function | Data unit (PDU) | Protocols and examples |
|---|---|---|---|---|
| 7 | Application | Gives network services directly to the user programs such as the browser and the email | Data | HTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS, Telnet, SNMP |
| 6 | Presentation | Translation, encryption and decryption, and compression of the data | Data | SSL/TLS, JPEG, MPEG, ASCII |
| 5 | Session | Starts, manages and ends the sessions (connections) between the applications | Data | NetBIOS, RPC, session control |
| 4 | Transport | End-to-end delivery, dividing the data into segments, error control, flow control | Segment (TCP) or Datagram (UDP) | TCP, UDP |
| 3 | Network | Logical addressing (IP address) and routing of the packets from the source to the destination | Packet | IP, ICMP, ARP, routers |
| 2 | Data Link | Physical addressing (MAC address), framing, error detection and access to the medium | Frame | Ethernet, PPP, switch, bridge, NIC |
| 1 | Physical | Sends the raw bits as electrical, light or radio signals over the medium | Bits | Cables, hub, repeater, connectors, Wi-Fi radio |
- Memory trick (top to bottom): "All People Seem To Need Data Processing" = Application, Presentation, Session, Transport, Network, Data Link, Physical.
- Memory trick (bottom to top): "Please Do Not Throw Sausage Pizza Away" = Physical, Data Link, Network, Transport, Session, Presentation, Application.
- The upper layers (5, 6, 7) are about the user and the data; the lower layers (1, 2, 3, 4) are about the delivery of the data.
- The Transport layer is the layer that connects the upper layers with the lower layers.
Layer-wise Details You Must Remember
| Layer | Important points |
|---|---|
| Application (7) | The layer closest to the user. The browser, the email program and the file transfer program use it. It is not the application software itself; it gives the services to it. |
| Presentation (6) | Called the "translator" layer. It changes the data into a common format, so that two different systems can understand each other, and it also does the encryption. |
| Session (5) | Controls the dialogue. It sets checkpoints (synchronisation) so that a big transfer can restart from the checkpoint after a failure. |
| Transport (4) | Uses port numbers to deliver the data to the right program. TCP is reliable and connection-oriented; UDP is fast and connectionless. |
| Network (3) | Uses IP addresses and decides the best path (routing). The device is the router. |
| Data Link (2) | Uses MAC addresses. It has two sub-layers: LLC (Logical Link Control) and MAC (Media Access Control). Error detection is done by CRC. The device is the switch or the bridge. |
| Physical (1) | Deals with the cables, the voltage, the connectors and the data rate. The devices are the hub and the repeater. |
Network Devices and the Layers They Work At
| Device | Layer | Function |
|---|---|---|
| Hub | Physical (1) | Sends the data to all the connected computers; no intelligence |
| Repeater | Physical (1) | Regenerates and strengthens the signal |
| Bridge | Data Link (2) | Connects two LANs and filters by the MAC address |
| Switch | Data Link (2) | Sends the frame only to the correct port using the MAC address |
| NIC (Network Interface Card) | Physical and Data Link (1 and 2) | Connects the computer to the network; has the MAC address |
| Router | Network (3) | Connects different networks and chooses the best path by the IP address |
| Layer 3 switch | Network (3) | A switch that can also route |
| Gateway | All layers (usually 7) | Connects two networks that use different protocols |
| Firewall | Network to Application (3 to 7) | Filters the traffic by rules |
| Modem | Physical (1) | Converts the digital data into analog signals and back |
The TCP/IP Model and Its Layers
| TCP/IP layer | Matching OSI layers | Protocols | Function |
|---|---|---|---|
| Application | Application, Presentation and Session (5 to 7) | HTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS, DHCP, Telnet, SSH | Gives the services to the user |
| Transport | Transport (4) | TCP, UDP | End-to-end delivery and the port numbers |
| Internet (Network) | Network (3) | IP (IPv4, IPv6), ICMP, ARP, IGMP | Addressing and routing of the packets |
| Network Access (Link) | Data Link and Physical (1 and 2) | Ethernet, Wi-Fi, PPP | Sending the frames over the physical medium |
- The TCP/IP model has 4 layers: Application, Transport, Internet and Network Access. A 5-layer version splits the last layer into Data Link and Physical.
- IP (Internet Protocol) is a connectionless and unreliable protocol that only forwards the packets; the reliability is given by TCP.
- ICMP (Internet Control Message Protocol) sends the error and control messages; the ping command uses ICMP.
- ARP (Address Resolution Protocol) finds the MAC address from the IP address. RARP does the reverse.
TCP vs UDP
| Point | TCP | UDP |
|---|---|---|
| Full form | Transmission Control Protocol | User Datagram Protocol |
| Connection | Connection-oriented (a connection is made first) | Connectionless |
| Reliability | Reliable; lost data is sent again and the order is kept | Not reliable; no guarantee of delivery |
| Speed | Slower | Faster |
| Header size | 20 bytes or more | 8 bytes |
| Use | Web pages, email, file transfer | Video streaming, online games, voice calls, DNS queries |
| Handshake | Three-way handshake: SYN, SYN-ACK, ACK | No handshake |
Well-known Port Numbers
| Service | Port number | Transport protocol |
|---|---|---|
| HTTP | 80 | TCP |
| HTTPS | 443 | TCP |
| FTP | 20 (data) and 21 (control) | TCP |
| SSH | 22 | TCP |
| Telnet | 23 | TCP |
| SMTP | 25 | TCP |
| DNS | 53 | UDP (and TCP) |
| DHCP | 67 and 68 | UDP |
| POP3 | 110 | TCP |
| IMAP | 143 | TCP |
| SNMP | 161 | UDP |
| RDP (Remote Desktop) | 3389 | TCP |
Port numbers range from 0 to 65535. Ports 0 to 1023 are the well-known ports, 1024 to 49151 are the registered ports and 49152 to 65535 are the dynamic (private) ports.
IP Address and Its Classes
- An IPv4 address has 32 bits written as four decimal numbers (octets) separated by dots, such as 192.168.1.10. Each number is from 0 to 255.
- An IPv6 address has 128 bits, written in hexadecimal with colons, such as 2001:0db8::1.
- A subnet mask shows which part of the address is the network and which part is the host.
- Private IP addresses are used inside the local networks: 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255 and 192.168.0.0 to 192.168.255.255.
- 127.0.0.1 is the loopback (localhost) address that points to the same computer.
- DHCP gives the IP address automatically; DNS changes the domain names into IP addresses.
| Class | First octet range | Default subnet mask | Use |
|---|---|---|---|
| A | 1 to 126 | 255.0.0.0 | Very large networks |
| B | 128 to 191 | 255.255.0.0 | Medium networks |
| C | 192 to 223 | 255.255.255.0 | Small networks |
| D | 224 to 239 | Not applicable | Multicasting |
| E | 240 to 255 | Not applicable | Experimental use |
Encapsulation: How the Data Travels
- At the sender, the application makes the data (layers 7, 6, 5).
- The Transport layer splits the data into segments and adds the port numbers.
- The Network layer adds the source and destination IP addresses and makes a packet.
- The Data Link layer adds the MAC addresses and the error check (a frame).
- The Physical layer sends the bits as signals.
- At the receiver, the layers remove their headers in the reverse order, and the application receives the data.
The simple way to remember the data units from the top is: Data, Segment, Packet, Frame, Bits.
Important Questions Explained
Question 1: How many layers are there in the OSI model and in the TCP/IP model?
Answer: The OSI model has 7 layers and the TCP/IP model has 4 layers.
Question 2: Which layer of the OSI model is responsible for routing?
Answer: The Network layer (layer 3), whose device is the router.
Question 3: Which layer uses the MAC address?
Answer: The Data Link layer (layer 2).
Question 4: Which device works at the Data Link layer?
Answer: A switch (and a bridge).
Question 5: Which protocol is reliable and connection-oriented, TCP or UDP?
Answer: TCP.
Question 6: What is the data unit of the Network layer called?
Answer: A packet.
Question 7: Which layer is called the translator layer?
Answer: The Presentation layer.
Quick Tips to Remember
- Learn the layers with the memory tricks "All People Seem To Need Data Processing" and "Please Do Not Throw Sausage Pizza Away".
- Remember the pairs: Network layer with IP address and router; Data Link layer with MAC address and switch; Physical layer with bits and hub.
- Remember "S for Segment at Transport, P for Packet at Network, F for Frame at Data Link".
- Learn the main port numbers: HTTP 80, HTTPS 443, FTP 21, SSH 22, SMTP 25 and DNS 53.
- Remember that the OSI model has 7 layers but the TCP/IP model has 4.
- In the exam, eliminate the options by the keyword: "routing" means Network layer, "encryption" means Presentation layer and "end-to-end" means Transport layer.
Common Mistakes to Avoid
- Writing the Transport layer as layer 3 or the Network layer as layer 4.
- Confusing the MAC address (Data Link layer) with the IP address (Network layer).
- Saying that the switch works at the Network layer (it works at layer 2, except for the layer 3 switch).
- Writing that UDP is reliable.
- Mixing up the number of layers of the OSI (7) and the TCP/IP (4) models.
Quick Revision Points
- OSI: 7 layers made by ISO in 1984; TCP/IP: 4 layers.
- Physical, Data Link, Network, Transport, Session, Presentation, Application (bottom to top).
- PDU: Bits, Frame, Packet, Segment, Data.
- Hub = layer 1; Switch and bridge = layer 2; Router = layer 3.
- TCP is reliable and connection-oriented; UDP is fast and connectionless.
- HTTP 80, HTTPS 443, FTP 21, SSH 22, SMTP 25, DNS 53.
- IPv4 is 32 bits; IPv6 is 128 bits; 127.0.0.1 is the loopback address.
Practice Questions With Answers
- How many layers does the OSI model have?
Answer: 7 (Reference model of ISO). - Which layer of OSI is the lowest?
Answer: Physical layer (Layer 1). - Which layer is responsible for the encryption of data?
Answer: Presentation layer (Layer 6). - Which layer is responsible for the end-to-end delivery?
Answer: Transport layer (Layer 4). - A router works at which layer?
Answer: Network layer (Layer 3). - A switch works at which layer?
Answer: Data Link layer (Layer 2). - A hub works at which layer?
Answer: Physical layer (Layer 1). - Which address is used at the Data Link layer?
Answer: MAC address (Physical address). - Which address is used at the Network layer?
Answer: IP address (Logical address). - What is the PDU of the Transport layer in TCP?
Answer: Segment (Data unit). - What is the PDU of the Data Link layer?
Answer: Frame (Data unit). - Which protocol finds the MAC address from the IP address?
Answer: ARP (Address Resolution Protocol). - Which protocol is used by the ping command?
Answer: ICMP (Internet Control Message Protocol). - What is the default port number of HTTPS?
Answer: 443 (Secure web). - What is the default port number of SMTP?
Answer: 25 (Email sending). - How many bits are there in an IPv6 address?
Answer: 128 (Hexadecimal). - Which IP class has the first octet from 192 to 223?
Answer: Class C (Small networks). - Which layer sets the checkpoints in a session?
Answer: Session layer (Layer 5). - How many layers does the TCP/IP model have?
Answer: 4 (Application, Transport, Internet, Network Access). - Which protocol is connectionless and fast?
Answer: UDP (Used in streaming).
How to Practise This Topic
- Write the seven layers on a sheet with one function, one device and one protocol each.
- Learn the two memory tricks and say the layers from the top and from the bottom.
- Revise the tables of the ports and the IP classes the next day.
- Attempt the practice questions without looking at the answers.
- Solve the SSC practice papers and the previous year papers for the pattern of networking questions.
Related Notes and Practice
- Computer Network Notes
- Internet Protocols Notes
- Internet and Networking Notes
- Cyber Security and Cyber Crime Notes
- Computer Knowledge Notes for SSC
- SSC practice papers
Frequently Asked Questions
What is the OSI model?
The OSI (Open Systems Interconnection) model is a reference model of 7 layers made by ISO in 1984 to explain how data moves between two computers in a network.
What are the seven layers of the OSI model?
From the bottom to the top they are Physical, Data Link, Network, Transport, Session, Presentation and Application.
What is the difference between the OSI and TCP/IP models?
OSI is a 7-layer theoretical model, while TCP/IP is a 4-layer practical model that is used on the internet.
Which layer does routing?
Routing is done by the Network layer (layer 3) using the IP address.
What is the difference between TCP and UDP?
TCP is reliable and connection-oriented but slower, while UDP is faster and connectionless but does not guarantee the delivery.
What is a MAC address?
A MAC address is the unique physical address of a network card, used at the Data Link layer. It is 48 bits long.
What is the difference between an IP address and a MAC address?
An IP address is a logical address given to a device on a network and it can change, while a MAC address is the fixed physical address of the network card.
What is a port number?
A port number identifies a particular program or service on a computer, such as 80 for HTTP and 443 for HTTPS.
What is encapsulation?
Encapsulation is the process in which every layer adds its own header to the data while it goes down the layers at the sender.
What is the loopback address?
The loopback address is 127.0.0.1 (localhost), which refers to the same computer.
How many questions come from the OSI model in SSC exams?
Usually one question comes from networking models, devices or protocols in the Computer Knowledge section.
How can I remember the OSI layers easily?
Use the sentence "Please Do Not Throw Sausage Pizza Away" for the layers from the bottom to the top.
Previous chapter
Artificial Intelligence Notes for SSC Exams: AI, Machine Learning and Generative AI
Next chapter
MS-DOS and Linux Commands Notes for SSC Exams
Rahul Kumar
SSC Exam Expert & Content Editor
Rahul is a senior SSC exam strategist with 8+ years of experience helping aspirants crack CGL, CHSL and MTS exams. He writes in-depth notification breakdowns, exam pattern guides and preparation strategies.