XMPP - Extensible Messaging and Presence Protocol
===================================================
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**What is XMPP?**
XMPP stands for **Extensible Messaging and Presence Protocol**. It is an open, XML-based communication protocol designed for real-time messaging, presence information, and structured data exchange between clients and servers.
Originally developed for instant messaging, XMPP has evolved to support a wide range of applications including **IoT**, **VoIP**, and **social networking**.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**Why is XMPP useful?**
* **Real-time communication** – Ideal for chat, notifications, and presence updates.
* **Federated architecture** – Like email, anyone can run their own XMPP server.
* **Extensible** – Supports custom features via **XMPP Extension Protocols (XEPs)**.
* **Secure** – Uses **TLS encryption** and **SASL authentication**.
* **Decentralized** – No central authority; promotes open and distributed communication.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**How it works?**
* **Client connects to XMPP server** – Using TCP and negotiates TLS and authentication.
* **Authentication** – Performed using SASL (Simple Authentication and Security Layer).
* **Session established** – Client sends `` to indicate availability.
* **Message exchange** – Clients send XML stanzas (``, ``, ``) through the server.
* **Session ends** – Client sends `` and disconnects.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**Where is XMPP used?**
* **Instant messaging apps** – Jabber, Conversations, and (formerly) Google Talk.
* **IoT communication** – Lightweight, extensible, and efficient for device messaging.
* **Enterprise chat systems** – Used in internal business communication.
* **Social networking** – Presence/status updates and live interactions.
* **VoIP and video calls** – Used as a signaling protocol in certain systems.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**Which OSI layer does this protocol belong to?**
* XMPP operates at the **Application Layer (Layer 7)**.
* It provides **stateful communication**, manages **sessions**, and supports **structured XML data exchange**.
* It is protocol-agnostic and can carry a wide range of data types.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**Is XMPP Windows specific?**
* No, XMPP is **not Windows-specific**.
* It is a **cross-platform** protocol supported on Windows, Linux, macOS, Android, iOS, and embedded systems.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**Is XMPP Linux specific?**
* No, XMPP is **not Linux-specific**.
* It runs across a variety of platforms and operating systems.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**Which Transport Protocol is used by XMPP?**
* XMPP primarily uses **Transmission Control Protocol (TCP)**.
* It also supports:
* **TLS** for encryption,
* **BOSH** (XMPP over HTTP),
* **WebSockets** for browser-based and firewall-friendly communication.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**Which Port is used by XMPP?**
Common XMPP ports:
* **Port 5222** – Client-to-server communication (with or without STARTTLS).
* **Port 5223** – Legacy SSL/TLS (deprecated in favor of STARTTLS).
* **Port 5269** – Server-to-server federation.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
**Is XMPP using the client-server model?**
* Yes, XMPP uses a **client-server model**.
* **Clients** connect to an **XMPP server**, which:
* Manages message delivery and presence updates,
* Routes XML stanzas,
* Federates with other servers for cross-domain communication.
.. panels::
:container: container pb-4
:column: col-lg-12 p-2
:card: shadow
Topics in this section,
* :ref:`Learnings in this section `
* :ref:`Terminology `
* :ref:`Version Info `
* :ref:`XMPP Version&RFC Details `
* :ref:`XMPP Basic Setup on Ubuntu using IPv4 `
* :ref:`XMPP Basic Setup on Ubuntu using IPv6 `
* :ref:`XMPP Protocol Packet Details `
* :ref:`XMPP Usecases `
* :ref:`XMPP Basic Features `
* :ref:`XMPP Feature : XML Based Protocol `
* :ref:`XMPP Feature : Real Time Messaging `
* :ref:`XMPP Feature : Presence Information `
* :ref:`XMPP Feature : Federated Architecture `
* :ref:`XMPP Feature : Extensiblity via XEPs `
* :ref:`XMPP Feature : Security Support `
* :ref:`XMPP Feature : Multiuser chat `
* :ref:`XMPP Feature : offline messaging `
* :ref:`XMPP Feature : Push Notifications `
* :ref:`XMPP Feature : cross platform compatibility `
* :ref:`Reference links `
.. _XMPP_step1:
.. tab-set::
.. tab-item:: Learnings in this section
* In this section, you are going to learn
.. _XMPP_step2:
.. tab-set::
.. tab-item:: Terminology
* Terminology
.. _XMPP_step3:
.. tab-set::
.. tab-item:: Version Info
* Version Info
.. _XMPP_step5:
.. tab-set::
.. tab-item:: XMPP Version&RFC Details
.. csv-table::
:file: ./XMPP/XMPP_rfcdetails.csv
:widths: 10,10,10,30
:header-rows: 1
.. _XMPP_step19:
.. tab-set::
.. tab-item:: XMPP Basic Setup on Ubuntu using IPv4
* setup
.. _XMPP_step20:
.. tab-set::
.. tab-item:: XMPP Basic Setup on Ubuntu using IPv6
* setup
.. _XMPP_step6:
.. tab-set::
.. tab-item:: XMPP Protocol Packet Details
**Client Stream Header Packet**
.. csv-table::
:file: ./XMPP/XMPP_packetdetails1.csv
:widths: 10,20,30,10
:header-rows: 1
**Server Stream Header Packet**
.. csv-table::
:file: ./XMPP/XMPP_packetdetails2.csv
:widths: 10,20,30,10
:header-rows: 1
**SASL Authentication Packet**
.. csv-table::
:file: ./XMPP/XMPP_packetdetails3.csv
:widths: 10,20,30,10
:header-rows: 1
**Resource Binding Packet**
.. csv-table::
:file: ./XMPP/XMPP_packetdetails4.csv
:widths: 10,20,30,10
:header-rows: 1
**Presence Packet**
.. csv-table::
:file: ./XMPP/XMPP_packetdetails5.csv
:widths: 10,20,30,10
:header-rows: 1
**Message Packet**
.. csv-table::
:file: ./XMPP/XMPP_packetdetails6.csv
:widths: 10,20,30,10
:header-rows: 1
**IQ Packet**
.. csv-table::
:file: ./XMPP/XMPP_packetdetails7.csv
:widths: 10,20,30,10
:header-rows: 1
.. _XMPP_step7:
.. tab-set::
.. tab-item:: XMPP Usecases
.. csv-table::
:file: ./XMPP/XMPP_usecases.csv
:widths: 10,20,30
:header-rows: 1
.. _XMPP_step8:
.. tab-set::
.. tab-item:: XMPP Basic Features
.. csv-table::
:file: ./XMPP/XMPP_basicfeatures.csv
:widths: 10,10,30
:header-rows: 1
.. _XMPP_step9:
.. tab-set::
.. tab-item:: XMPP Feature : XML Based Protocol
**XML Based Protocol - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature1_XML_Based_Protocol_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step10:
.. tab-set::
.. tab-item:: XMPP Feature : Real Time Messaging
**Real Time Messaging - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature2_Real_Time_Messaging_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step11:
.. tab-set::
.. tab-item:: XMPP Feature : Presence Information
**Presence Information - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature3_Presence_Information_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step12:
.. tab-set::
.. tab-item:: XMPP Feature : Federated Architecture
**Federated Architecture - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature4_Federated_Architecture_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step13:
.. tab-set::
.. tab-item:: XMPP Feature : Extensiblity via XEPs
**Extensiblity via XEPs - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature5_Extensiblity_via_XEPs_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step14:
.. tab-set::
.. tab-item:: XMPP Feature : Security Support
**Security Support - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature6_Security_Support_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step15:
.. tab-set::
.. tab-item:: XMPP Feature : Multiuser chat
**Multiuser chat - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature7_Multiuser_chat_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step16:
.. tab-set::
.. tab-item:: XMPP Feature : offline messaging
**offline messaging - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature8_offline_messaging_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step17:
.. tab-set::
.. tab-item:: XMPP Feature : Push Notifications
**Push Notifications - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature9_Push_Notifications_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step21:
.. tab-set::
.. tab-item:: XMPP Feature : cross platform compatibility
**cross platform compatibility - Testcases**
.. csv-table::
:file: ./XMPP/XMPP_feature10_cross_platform_compatibility_testcases.csv
:widths: 10,10,30,20
:header-rows: 1
.. _XMPP_step18:
.. tab-set::
.. tab-item:: Reference links
* Reference links