CyberSecC@ptBlackb3ard
  • 🦜Welcome
  • Cyber Security
    • Offensive Security
      • Penetration Testing Methodology
      • Pre-Engagement Interaction
      • Reconnaissance (Information Gathering)
        • Open-Source Intelligence (OSINT)
      • Scanning and Enumeration
        • Domain Enumeration
        • Network Enumeration
          • Network Mapper (nmap)
          • Port/Protocol & Service Enumeration & Attack
            • File Transfer Protocol (FTP): 20, 21
              • Trivial File Transfer Protocol (TFTP): 69
              • FTP over SSL/TLS (FTPS): 989, 990
            • Secure Shell (SSH): 22
            • Telnet: 23
            • Simple Mail Transfer Protocol (SMTP): 25
              • SMTP Secure (SMTPS): 587
            • Domain Name System (DNS):53
            • Dynamic Host Configuration Protocol (DHCP): 67, 68
            • Hyper Text Transfer Protocol (HTTP): 80
              • HTTP over SSL/TLS (HTTPS): 443
            • Kerberos: 88
            • Post Office Protocol version 3 (POP3): 110
            • Network Time Protocol (NTP): 123
            • Remote Procedure Call (RPC): 135
            • NetBIOS: 137, 138, 139
            • Internet Message Access Protocol (IMAP): 143
            • IMAP over SSL/TLS: 933
            • Internet Relay Chat (IRC): 194
            • Light Weight Directory Access Protocol (LDAP): 389
              • LDAP over SSL/TLS (LDAPS): 636
            • Server Message Block (SMB): 445
              • Hostname
              • Shared Folders
            • Network File System (NFS): 2049
            • Microsoft SQL Server: 1433
            • MySQL Server: 3306
            • PostgreSQL Server: 5432
            • Remote Desktop Protocol (RDP): 3389
            • Border Gateway Protocol (BGP): 179
            • Remote Authentication Dial-In User Service (RADIUS): 1812, 1813
        • Web Enumeration
      • Security Assessment Report Writing
      • Tools
        • Cryptography & Encoding
          • Password Recovery
        • Network Tools
  • Networking
    • OSI and TCP/IP Model
      • Common Network Ports & Protocols
  • Cloud
    • Cloud Computing
  • General
    • Cyber Security Theory
      • Information Security
      • Cybersecurity Resilience
      • Cybersecurity Posture
    • Terms and Acronyms
    • Database Cheat Sheets
Powered by GitBook
On this page
  • TLDR;
  • Model Summary
  1. Networking

OSI and TCP/IP Model

TLDR;

Open System Interconnection (OSI) Model: This is a theoretical framework with 7 detailed layers that explain network fundamentals and communication.

  1. Physical

  2. Data Link

  3. Network

  4. Transport

  5. Session

  6. Presentation

  7. Application

TCP/IP Model: This practical model was developed to standardize communication protocols for the Internet and real-world networks. It merges OSI layers into 4 layers for simplicity.

  1. Link/Network Access

  2. Internet/Network

  3. Transport

  4. Application

Layer 7 - Application

This is the highest layer in the OSI model, allowing users to access network resources and services. It is the only layer seen by end users - it provides an interface that is the base of all other activities.

Layer 6 - Presentation

This layer transforms the data it receives into a format the Application layer can read.

The data encoding and decoding depend on the application protocol sending or receiving the data.

This layer also handles encryption and decryption used for securing data.

Layer 5 - Session

This layer establishes, manages, and terminates connections between communicating devices and services.

It is also responsible for establishing whether a connection is duplex or half-duplex and for gracefully closing a connection between hosts.

Layer 4 - Transport

The primary purpose of this layer is to provide reliable data transmission to lower layers.

Its features include flow control, segmentation, desegmentation, and error control; it ensures that data moves error-free from point to point.

The transport layer provides services to connection-oriented (TCP) and connectionless (UDP) protocols.

Firewalls and proxies operate at this layer.

Layer 3 - Network

It is responsible for routing data between physical networks.

It is also responsible for logically addressing network hosts (IP address), packet segmentation, protocol identification, and, in some cases, error detection.

Routers operate at this level.

Layer 2 - Data Link

Provides the means of transporting data across a physical network (LAN).

Its primary purpose is to provide an addressing scheme that can be used to identify physical devices (MAC) and provide error-checking features to ensure data integrity.

Network switches operate at this layer.

Layer 1 - Physical

The lowest layer of the OSI model is the physical medium through which network data is transferred.

It defines the physical and electrical nature of all hardware used - voltages, hubs, network adaptors, repeaters, & cabling specifications.

It establishes and terminates connections, provides a means for sharing communication resources, and converts signals from digital to analog and vice versa.

Application Layer

It is the highest layer of the TCP/IP model and merges the OSI Application, Presentation, and Session layers.

It groups the following functionality:

  • Provides an interface via applications for uses to access and manage network resources.

  • Establishes, maintains, and terminates connections between network applications and services.

  • Handles data encoding, decoding, encryption, and description.

Transport Layer

Similar to the OSI model, it establishes, maintains, and terminates connections between network devices.

It divides data from the application layer into packets for transmission via sequences, flow control, and error control.

The protocols used in this layer are:

  • TCP: Transmission Control Protocol is responsible for the proper transmission of segments over the communication channel. It also establishes a network connection between the source and destination system.

  • UDP: User Datagram Protocol is responsible for identifying errors, and other tasks during the transmission of information. UDP maintains various fields for data transmission such as:

  • Source Port Address: This port is responsible for designing the application that makes up the message to be transmitted.

  • Destination Port Address: This port receives the message sent from the sender side.

  • Total Length: The total number of bytes of the user datagram.

  • Checksum: Used for error detection of the message at the destination side.

Network/Internet Layer

Similar to the OSI Network layer, it controls the transmission of data over the network by:

  • Specifying the path the data packets will use during transmission.

  • Providing logical addresses (IP addresses) to identify devices on the network.

Link/Network Access Layer

It is the lowest layer of the TCP/IP model and merges the OSI Physical and Data Link layers.

It is responsible for sending and receiving data in raw bits, i.e., in binary format, over the physical communication modes in the network channel.

It uses the device's physical address (MAC) to map the transmission path over a LAN.

Model Summary

OSI Layer
TCP/IP Layer
Protocols
Purpose

7 - Application

4 - Application

FTP/S, SSH, Telnet, SMTP/S, DNS, DHCP, TFTP, HTTP/S, Kerberos, POP3, NTP, RPC, IMAP, SNMP, IRC, LDAP/S, MSSQL, MySQL, PostgreSQL, RADIUS, SIP, NFS

User interface for accessing network services.

6 - Presentation

Application - Merged

SSL/TLS, JPEG, MPEG, ASCII, EBCDIC

Data formatting, encryption, and compression

5 - Session

Application - Merged

NetBIOS, RPC, PPTP, SMB, OpenVPN,

Manages sessions and data exchange between hosts

4 - Transport

3 - Transport

ISAKM, IKE

Reliable delivery, segmentation, flow control

3 - Network

2 - Internet

IP, ICMP, ARP, IGMP, NAT, OSPF, BGP, IPSec

Routing, addressing, logical data transmission

2 - Data Link

1 - Link (Network Access)

Ethernet, PPP, Frame Relay, HDLC, L2TP, PPTP, LLDP, MPLS

Framing, error detection, physical addressing

1 - Physical

Link (Network Access) - Merged

Ethernet, Fiber, Wireless

Physical transmission of raw bits over medium

PreviousNetwork ToolsNextCommon Network Ports & Protocols

Last updated 5 months ago