Data Communication and Networking

Private and Public IP Addresses; OSI Reference Model

C-CAT

Private and Public IP Addresses

Private IP Address Ranges

Private IP addresses are NOT routable on the internet. Used within private networks (home, office).

ClassPrivate RangeCIDR
Class A10.0.0.0 – 10.255.255.25510.0.0.0/8
Class B172.16.0.0 – 172.31.255.255172.16.0.0/12
Class C192.168.0.0 – 192.168.255.255192.168.0.0/16

Special Addresses:

AddressPurpose
127.0.0.1 (loopback)Refers to the local machine itself
169.254.x.x (APIPA)Self-assigned when DHCP fails
0.0.0.0Non-routable; default route
255.255.255.255Limited broadcast (current network)

Public IP Addresses

  • Assigned by ISPs
  • Globally unique and routable on the internet
  • All addresses NOT in the private range

NAT (Network Address Translation)

NAT allows multiple devices with private IPs to share one public IP address.

Private Network                    Internet
192.168.1.100 ─┐
192.168.1.101 ─┤──> [NAT Router] ─────> 203.0.113.1 (Public IP) ──> Internet
192.168.1.102 ─┘

OSI Reference Model

What is OSI Model?

The OSI (Open Systems Interconnection) Model is a conceptual framework that standardizes the functions of a communication system into 7 layers.

Developed by ISO (International Standards Organization) in 1984.

Purpose:

  • Universal reference model for networking
  • Allows products from different vendors to interoperate
  • Helps troubleshoot network issues layer by layer

The 7 Layers of OSI Model

+---+-------------------+
| 7 | Application       |  ---> User interface (HTTP, FTP, SMTP)
+---+-------------------+
| 6 | Presentation      |  ---> Data format, encryption, compression
+---+-------------------+
| 5 | Session           |  ---> Session management, synchronization
+---+-------------------+
| 4 | Transport         |  ---> End-to-end communication (TCP, UDP)
+---+-------------------+
| 3 | Network           |  ---> Logical addressing, routing (IP)
+---+-------------------+
| 2 | Data Link         |  ---> Physical addressing, error detection (Ethernet, Wi-Fi)
+---+-------------------+
| 1 | Physical          |  ---> Bits on wire (voltage, cables, connectors)
+---+-------------------+

Mnemonic: "Please Do Not Throw Sausage Pizza Away" (Physical, Data Link, Network, Transport, Session, Presentation, Application)

Layer Details

LayerNameFunctionPDUProtocol/Device
7ApplicationUser interface, application servicesMessage/DataHTTP, FTP, SMTP, DNS, DHCP
6PresentationData format, encryption, compressionMessage/DataSSL/TLS, JPEG, MPEG
5SessionSession management, dialog controlMessage/DataNetBIOS, RPC
4TransportEnd-to-end data transfer, reliabilitySegmentTCP, UDP
3NetworkLogical addressing, routingPacketIP, ICMP, IPsec — Router
2Data LinkPhysical addressing, error detectionFrameEthernet, Wi-Fi (802.11) — Switch, Bridge
1PhysicalBit transmission over mediumBitCables, hubs, repeaters, connectors

PDU = Protocol Data Unit (unit of data at each layer)

Data Encapsulation

Data flows down through layers (sender) and up through layers (receiver):

Application: [DATA]
Presentation: [DATA]
Session: [DATA]
Transport: [Segment Header][DATA]
Network: [Packet Header][Segment Header][DATA]
Data Link: [Frame Header][Packet Header][Segment Header][DATA][Frame Trailer]
Physical: 010110010100... (bits on wire)

Troubleshooting Using OSI Model

Layer 1: Physical → Check cables, connectors, NICs, power
Layer 2: Data Link → Check MAC address, VLAN, switch config
Layer 3: Network → Check IP address, subnet mask, routing
Layer 4: Transport → Check ports, firewall rules, TCP/UDP
Layer 5-7: Application → Check application, DNS, authentication

Continue learning

Related notes

Put this topic into timed practice

Open mock tests when you want full-exam pacing, or keep drilling in practice mode.