Skip to content

doc: document UDP underlay and ports#4895

Merged
romshark merged 31 commits into
scionproto:masterfrom
nicorusti:underlay_doc
Mar 16, 2026
Merged

doc: document UDP underlay and ports#4895
romshark merged 31 commits into
scionproto:masterfrom
nicorusti:underlay_doc

Conversation

@nicorusti
Copy link
Copy Markdown
Contributor

This PR contains a description of the IP/UDP underlay. This page will be added as an informative reference in the SCION dataplane RFC.

During the IETF review process, it emerged that we need to document the behavior of default port UDP 30041, which is required to be unique so that endhosts (endpoints in the drafts) can receive SCMP informational messages.
The UDP/IP underlay behavior in the nearly final version draft-dekater-scion-dataplane-11 is not well specified.

We discussed wether to include this in the draft, and we decided that it is best to leave it out to an external reference. Mian reasons were:

  • this is currently an evolving topic (dispatcherless, STUN, etc...) and we don't want behaviors set in stone in the RFC
  • this document would better fit an Internet Draft of its own (e.g. SCION on top of IP behavior)

For the record, discussions happened in:

@nicorusti nicorusti changed the title Document UDP underlay and ports doc: document UDP underlay and ports Mar 3, 2026
@nicorusti nicorusti marked this pull request as ready for review March 3, 2026 13:50
Comment thread doc/protocols/stack.rst Outdated
Comment thread doc/protocols/stack.rst Outdated
Comment thread doc/protocols/stack.rst Outdated
Comment thread doc/protocols/stack.rst Outdated
Comment thread doc/protocols/stack.rst
+-----------------------------------------+------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
| Router Internal Interfaces | any | UDP 30100-30199 | Router-wide | :doc:`topology.json <../manuals/common>` |
+-----------------------------------------+------------+-----------------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------+
| Router External Interfaces | any | UDP 31000-39999 | Link | :doc:`topology.json <../manuals/common>` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are we describing ports that are not relevant for the intra-AS UDP/IP underlay here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea is that inter-AS traffic may also some an underlay?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I agree with Jordi, this document should probably focus on intra AS underlays.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More specifically, on communication between BR<->endhost and BR<->BR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My idea was that this page generally describes how SCION is stacked over IP/UDP. This should IMHO include inter-AS links. I reworded to clarify that inter-AS links are independent from intra-AS links.

Comment thread doc/protocols/stack.rst Outdated
Comment thread doc/protocols/stack.rst Outdated
Copy link
Copy Markdown
Contributor

@tzaeschke tzaeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % SCMP handling

Comment thread doc/protocols/stack.rst
Comment thread doc/protocols/stack.rst Outdated
Comment thread doc/protocols/stack.rst Outdated
Control plane components require service ports for topology synchronization, beaconing, and PKI tasks:

* **Control Plane Intra-AS**: Control services typically communicate over TCP/IP and UDP/SCION on ports **40000-40099**.
* **Control Plane Inter-AS**: Control plane traffic across AS boundaries relies on QUIC/SCION, with the exact ports dynamically chosen by the service.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention service addresses here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely, this is a missing point and we could take some text from the draft or from the design docs to this page

Comment thread doc/protocols/stack.rst Outdated
Comment thread doc/protocols/stack.rst
nicorusti and others added 8 commits March 4, 2026 21:37
@nicorusti
Copy link
Copy Markdown
Contributor Author

@tzaeschke @JordiSubira I made some changes based on your feedback. How does it look now?
Feel free to edit directly.
It would be great if we can merge it by March 16 so that I can have the link ready for the reference in the draft. We can always fine tune it later.

Copy link
Copy Markdown
Contributor

@tzaeschke tzaeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

* **SCMP**: For SCMP informational messages, the router forwards the packet to the default end-host port: **30041**. For SCMP error messages, the router tries to extract the end-host port and sends the packet to the endhost, subject to dispatched port settings and the default underlay port. If the port cannot be extracted, the packet is dropped.

.. note::
Historically, SCION end hosts relied on a user-space "dispatcher" process listening on the default port UDP 30041 to route incoming packets to the correct application socket. For more details, see the :doc:`Dispatcher Manual <../manuals/dispatcher>`.
Copy link
Copy Markdown
Contributor

@JordiSubira JordiSubira Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incomplete if it intends to refer the current behaviour. This is true for requests, for replies the ID field is inspected to dispatched the port directly to the underlay client port (if within the dispatched range)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I proposed an update, what do you think?

Also, I could not find this behavior described here: https://docs.scion.org/en/latest/protocols/scmp.html, so we probably need to update the doc.

Copy link
Copy Markdown
Contributor Author

@nicorusti nicorusti Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the update.

for replies the ID field is inspected to dispatched the port directly to the underlay client port

What ID? And how do rotuers map this ID to a port?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Identifier field in SCMP information messages. It's a direct mapping.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the identifier include a port directly? Or is the router supposed to stare state containing mappings of identifiers to source endpoint underlay ports?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No state, the field just contains the port number.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #4901.

Comment thread doc/protocols/underlay.rst Outdated
Comment on lines +93 to +95
Control plane components of different ASes communicate with each other through RPC messages that are transported via Connect RPC. This protocol carries messages over HTTP/3, that uses a QUIC transport layer. Identification of the relevant addresses and ports for inter-domain queries is provided by `Service discovery <https://datatracker.ietf.org/doc/html/draft-dekater-scion-controlplane-15#name-control-service-discovery>`_.

For intra-domain communication of endpoints with service instances, the operator may use arbitrary ports, that have to be communicated to endpoints. For a comprehensive list of ports used by this implementation, refer to the `Control Port Table <../manuals/control.html#port-table>`_.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Control plane components of different ASes communicate with each other through RPC messages that are transported via Connect RPC. This protocol carries messages over HTTP/3, that uses a QUIC transport layer. Identification of the relevant addresses and ports for inter-domain queries is provided by `Service discovery <https://datatracker.ietf.org/doc/html/draft-dekater-scion-controlplane-15#name-control-service-discovery>`_.
For intra-domain communication of endpoints with service instances, the operator may use arbitrary ports, that have to be communicated to endpoints. For a comprehensive list of ports used by this implementation, refer to the `Control Port Table <../manuals/control.html#port-table>`_.
Control plane components communicate with each other and with end-hosts through RPC messages transported via Connect RPC. This protocol carries messages over HTTP/3, that uses a QUIC transport layer. They therefore do not communicate directly on top of the UDP/IP underlay.
For inter-AS communication, traffic is transported on top of UDP/SCION between control service instances. Identification of the relevant control service addresses and ports is provided by `Service discovery <https://datatracker.ietf.org/doc/html/draft-dekater-scion-controlplane-15#name-control-service-discovery>`_.
For intra-AS communication, traffic is transported on top of IP between end-hosts and control service instances. The port used by control service instances is configured by operators, and configured on end-hosts. For a comprehensive list of ports used by this implementation, refer to the `Control Port Table <../manuals/control.html#port-table>`_.

How about this @JordiSubira ?

Copy link
Copy Markdown
Contributor

@romshark romshark Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we have a contradiction:

This protocol carries messages over HTTP/3, that uses a QUIC transport layer

But port-table says:

QUIC + gRPC with HTTP/2

https://github.com/nicorusti/scion/blob/9fdeabdc157194ece544c56d5aa8d556d60e151b/doc/manuals/control/port-table.rst?plain=1#L6

The port-table should probably say "Connect RPC over HTTP/3"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point is that inter-AS traffic is SCION/UDP/IP and intra-AS traffic is TCP/IP (no SCION), if you still believe you have to mention it here, I would make clear this (gRPC/HTTP/TCP/IP or ConnectRPC/HTTP/TCP/IP) (no SCION) whatever the client implements or will implement in the future.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think now I understand the problem.
If we discuss non-SCION traffic (e.g. endpoint<->control server), then we should add that to the introduction (the introduction currently says we are discussing SCION/UDP/IP traffic).
I guess my summary:

  • inter-domain traffic: SCION/UDP/IP (dataplane + control plane)
  • intra-domain:
    • SCION/UDP/IP (dataplane) (for simplicity let's assume intra-AS dataplane uses SCION)
    • TCP/IP (control plane)

Right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was my point, indeed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the intro, does that help?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this:

Suggested change
Control plane components of different ASes communicate with each other through RPC messages that are transported via Connect RPC. This protocol carries messages over HTTP/3, that uses a QUIC transport layer. Identification of the relevant addresses and ports for inter-domain queries is provided by `Service discovery <https://datatracker.ietf.org/doc/html/draft-dekater-scion-controlplane-15#name-control-service-discovery>`_.
For intra-domain communication of endpoints with service instances, the operator may use arbitrary ports, that have to be communicated to endpoints. For a comprehensive list of ports used by this implementation, refer to the `Control Port Table <../manuals/control.html#port-table>`_.
Control plane components communicate with each other and with end-hosts through RPC messages transported via Connect RPC.
For inter-AS communication, traffic is transported over ConnectRPC/HTTP3/QUIC/UDP/SCION/UDP/IP between control service instances. Identification of the relevant control service addresses and ports is provided by `Service discovery <https://datatracker.ietf.org/doc/html/draft-dekater-scion-controlplane-15#name-control-service-discovery>`_.
For intra-AS communication, traffic is transported over ConnectRPC/HTTP/TCP/IP between end-hosts and control service instances. The port used by control service instances is configured by operators, and configured on end-hosts. For a comprehensive list of ports used by this implementation, refer to the `Control Port Table <../manuals/control.html#port-table>`_.

Comment thread doc/protocols/underlay.rst
Co-authored-by: Tilmann <tilmann_dev@gmx.de>
Comment thread doc/protocols/underlay.rst Outdated
Comment thread doc/protocols/underlay.rst Outdated
Comment thread doc/protocols/underlay.rst
Comment thread doc/protocols/underlay.rst Outdated
Comment on lines +93 to +95
Control plane components of different ASes communicate with each other through RPC messages that are transported via Connect RPC. This protocol carries messages over HTTP/3, that uses a QUIC transport layer. Identification of the relevant addresses and ports for inter-domain queries is provided by `Service discovery <https://datatracker.ietf.org/doc/html/draft-dekater-scion-controlplane-15#name-control-service-discovery>`_.

For intra-domain communication of endpoints with service instances, the operator may use arbitrary ports, that have to be communicated to endpoints. For a comprehensive list of ports used by this implementation, refer to the `Control Port Table <../manuals/control.html#port-table>`_.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this:

Suggested change
Control plane components of different ASes communicate with each other through RPC messages that are transported via Connect RPC. This protocol carries messages over HTTP/3, that uses a QUIC transport layer. Identification of the relevant addresses and ports for inter-domain queries is provided by `Service discovery <https://datatracker.ietf.org/doc/html/draft-dekater-scion-controlplane-15#name-control-service-discovery>`_.
For intra-domain communication of endpoints with service instances, the operator may use arbitrary ports, that have to be communicated to endpoints. For a comprehensive list of ports used by this implementation, refer to the `Control Port Table <../manuals/control.html#port-table>`_.
Control plane components communicate with each other and with end-hosts through RPC messages transported via Connect RPC.
For inter-AS communication, traffic is transported over ConnectRPC/HTTP3/QUIC/UDP/SCION/UDP/IP between control service instances. Identification of the relevant control service addresses and ports is provided by `Service discovery <https://datatracker.ietf.org/doc/html/draft-dekater-scion-controlplane-15#name-control-service-discovery>`_.
For intra-AS communication, traffic is transported over ConnectRPC/HTTP/TCP/IP between end-hosts and control service instances. The port used by control service instances is configured by operators, and configured on end-hosts. For a comprehensive list of ports used by this implementation, refer to the `Control Port Table <../manuals/control.html#port-table>`_.

Copy link
Copy Markdown
Contributor

@JordiSubira JordiSubira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM content-wise now.

Copy link
Copy Markdown
Contributor

@romshark romshark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread doc/protocols/underlay.rst Outdated
Comment thread doc/protocols/underlay.rst Outdated
Comment thread doc/protocols/underlay.rst Outdated
Comment thread doc/protocols/underlay.rst
@nicorusti
Copy link
Copy Markdown
Contributor Author

Thank you all for contributing! I think it looks great and it can be merged.
@tzaeschke I left some minor edits on NAT traversal, if you agree could you add them?
If not, could you merge anyways and then we polish it in another PR?
I need the link up on Monday so that I can also upload the last DP draft version :)

tzaeschke and others added 3 commits March 16, 2026 10:15
Co-authored-by: Nicola Rustignoli <nicorusti@users.noreply.github.com>
Co-authored-by: Nicola Rustignoli <nicorusti@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@tzaeschke tzaeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@romshark romshark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@romshark romshark merged commit ea645ec into scionproto:master Mar 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants