[Standards-JIG] Why is S2S on 5269 and not 5222?

Matthias Wimmer m at tthias.eu
Sat Dec 2 00:09:55 UTC 2006

Hi Chris!

Chris Mullins schrieb:
> I'm scoping some upcoming S2S work in our server, and I keep wondering
> why S2S connections are on a different port than standard connections?
> The way the streams work, it would be simple enough to have the server
> decide "what type of stream is this?" without needed a dedicated port
> number.

If your server does not need two different ports, you are free to have
both on the same port (as you and Peter already noticed by using SRV

If your problem is to get the ports opened at the firewall this is your
way to go. But there are also valid reasons why other setups benefit
from the two-port approach:
- c2s and s2s can easily be implemented on different software
components/processes this way.
- a server can decide if a stream is c2s or s2s before authentication
has been done (e.g. it does not have to offer s2s-only authentication
schemes on a c2s link, nor does it have to offer JEP-0078 on a s2s link)

Note: I read RFC 3920, 11.2.2 in a way, that it is not required to have
the xmlns='jabber:client' or xmlns='jabber:server' attribute on the
stream root element. - And from the XML point of view such a requirement
would be strange, as the following XML code is equivalent:

<stream:stream xmlns='jabber:server'
xmlns:stream='http://etherx.jabber.org/streams' to='example.com'
version='1.0'>....(authentication and such)....<message
to='juliet at example.net' from='romeo at example.com'>...

<foo:stream xmlns:foo='http://etherx.jabber.org/streams'
xmlns='jabber:iq:auth' to='example.com' version='1.0'>...(authentication
and such)....<js:message xmlns:js='jabber:server'
to='juliet at example.net' from='romeo at example.com'>...

While I would not advice to use the later, I think it would be okay with
RFC 3920. - And it should therefore be accepted (but probably not
generated) by an XMPP server.

Tot kijk

Matthias Wimmer      Fon +49-700 77 00 77 70
Züricher Str. 243    Fax +49-89 95 89 91 56
81476 München        http://ma.tthias.eu/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4263 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20061202/4ba958cb/attachment.bin>

More information about the Standards mailing list