XMPP (Extensible Messaging and Presence Protocol) utilizes several standard TCP ports for different communication purposes. The primary ports for XMPP are 5222 for client-to-server communication and 5269 for server-to-server communication.
According to the IANA Service Name and Transport Protocol Port Number Registry, the key ports associated with XMPP and related services are:
XMPP Standard Ports
Service Name | Port Number | Transport Protocol | Description |
---|---|---|---|
xmpp-client |
5222 | tcp | Client-to-server connections |
xmpp-server |
5269 | tcp | Server-to-server connections |
xmpp-bosh |
5280 | tcp | BOSH (HTTP Binding) sessions |
presence |
5298 | tcp | Presence service (often related to XMPP) |
These ports are essential for the various functions of the XMPP network, allowing users to connect, servers to exchange messages, and alternative connection methods like BOSH to operate.
Breakdown of Key Ports
- Port 5222 (xmpp-client): This is the most commonly encountered XMPP port. It's used by XMPP client applications (like chat software) to connect securely to an XMPP server. Communication over this port is typically encrypted using TLS.
- Port 5269 (xmpp-server): This port is dedicated to communication between different XMPP servers. It allows servers to exchange messages, presence information, and other data, forming a federated network. Server-to-server connections also commonly use TLS encryption.
- Port 5280 (xmpp-bosh): While XMPP traditionally uses direct TCP connections, BOSH (Bidirectional-streams Over Synchronous HTTP) is an alternative transport method that uses HTTP. Port 5280 is the standard port for XMPP over BOSH, which is often used in web-based clients or environments where direct TCP connections are restricted.
- Port 5298 (presence): This port is listed in the IANA registry related to XMPP searches and is designated for a 'presence service'. While core XMPP presence exchange often occurs over the client-to-server (5222) and server-to-server (5269) connections, this port may be used for specific presence-related services or components within an XMPP deployment.
Understanding these different ports is crucial for configuring firewalls, deploying XMPP servers, and troubleshooting connectivity issues in an XMPP environment.