public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
* NNCP with SP via high-latency links and TCP timeouts
@ 2025-01-18 11:15 Marek Küthe
2025-01-18 20:38 ` Sergey Matveev
0 siblings, 1 reply; 5+ messages in thread
From: Marek Küthe @ 2025-01-18 11:15 UTC (permalink / raw)
To: nncp-devel
[-- Attachment #1: Type: text/plain, Size: 883 bytes --]
Hello,
I recently came across NNCP and on the homepage it says that it also
works over high latency links, but TCP is used. When I tried to
establish a TCP connection with netcat via a high-latency link (20%
packet loss, 30 seconds latency), I got a lot of timeouts and
retransmissions, so that the TCP connection was not established at all.
I have two questions about this:
- Does NNCP SP also work over UDP?
- I looked at the source code and saw that various timeouts are set.
However, I found on [1] that only the timeouts for the connection and
not the TCP handshake (which is started in call.go line 91) are set.
Is this intentional? Have I overlooked something?
I would appreciate an answer!
Regards
Marek Küthe
[1] https://stackoverflow.com/questions/63870817/does-setting-the-timeout-on-the-net-dialer-and-deadline-on-the-connection-result
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NNCP with SP via high-latency links and TCP timeouts
2025-01-18 11:15 NNCP with SP via high-latency links and TCP timeouts Marek Küthe
@ 2025-01-18 20:38 ` Sergey Matveev
2025-01-18 20:49 ` Marek Küthe
0 siblings, 1 reply; 5+ messages in thread
From: Sergey Matveev @ 2025-01-18 20:38 UTC (permalink / raw)
To: nncp-devel
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
Greetings!
*** Marek Küthe [2025-01-18 11:15]:
>- Does NNCP SP also work over UDP?
No, it does not.
>- I looked at the source code and saw that various timeouts are set.
>However, I found on [1] that only the timeouts for the connection and
>not the TCP handshake (which is started in call.go line 91) are set.
>Is this intentional? Have I overlooked something?
That is not intentional: I just did not think about establishment
timeout. Anyway TCP workability completely depends on native operating
system's network stack. NNCP just use native OS abilities.
>I recently came across NNCP and on the homepage it says that it also
>works over high latency links
Well, 30sec latency is anomalously huge delay for IP-link. Even
communication with geostationary satellite has less than 1s RTT.
I can imagine only very buffer-bloated stack, that adds such huge
latencies.
Delay-tolerant networking and all that subject is not about
workability of online/SP protocol, but about packets lying in
the spool and having no explicit eviction time, just waiting
when someone, possibly by using store-and-forward method, with
removable media, will take them out.
--
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: 12AD 3268 9C66 0D42 6967 FD75 CB82 0563 2107 AD8A
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NNCP with SP via high-latency links and TCP timeouts
2025-01-18 20:38 ` Sergey Matveev
@ 2025-01-18 20:49 ` Marek Küthe
2025-01-18 20:58 ` Sergey Matveev
2025-01-19 1:45 ` John Goerzen
0 siblings, 2 replies; 5+ messages in thread
From: Marek Küthe @ 2025-01-18 20:49 UTC (permalink / raw)
To: nncp-devel
[-- Attachment #1: Type: text/plain, Size: 900 bytes --]
Thanks for the quick reply!
On Sat, 18 Jan 2025 23:38:20 +0300
Sergey Matveev <stargrave@stargrave•org> wrote:
> Well, 30sec latency is anomalously huge delay for IP-link. Even
> communication with geostationary satellite has less than 1s RTT.
> I can imagine only very buffer-bloated stack, that adds such huge
> latencies.
The latency occurred when I used IP via Meshtastic. Meshtastic itself
uses LoRa (by default in long-fast mode).
> Delay-tolerant networking and all that subject is not about
> workability of online/SP protocol, but about packets lying in
> the spool and having no explicit eviction time, just waiting
> when someone, possibly by using store-and-forward method, with
> removable media, will take them out.
However, as far as I understand it, only the SP supports Perfect
Forward Secrecy (PFS), right?
--
Marek Küthe
m.k@mk16•de
er/ihm he/him
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NNCP with SP via high-latency links and TCP timeouts
2025-01-18 20:49 ` Marek Küthe
@ 2025-01-18 20:58 ` Sergey Matveev
2025-01-19 1:45 ` John Goerzen
1 sibling, 0 replies; 5+ messages in thread
From: Sergey Matveev @ 2025-01-18 20:58 UTC (permalink / raw)
To: nncp-devel
[-- Attachment #1: Type: text/plain, Size: 664 bytes --]
*** Marek Küthe [2025-01-18 20:49]:
>The latency occurred when I used IP via Meshtastic. Meshtastic itself
>uses LoRa (by default in long-fast mode).
Ah, I see. Well, currently (except for missing timeout setting in
net.Dial), only OS'es TCP tuning may help with SP.
>However, as far as I understand it, only the SP supports Perfect
>Forward Secrecy (PFS), right?
Yes, it has PFS property, but only for the data transmitted inside
that SP-connection. That means that encrypted packets in the spool
still won't have PFS property anyway.
--
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: 12AD 3268 9C66 0D42 6967 FD75 CB82 0563 2107 AD8A
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NNCP with SP via high-latency links and TCP timeouts
2025-01-18 20:49 ` Marek Küthe
2025-01-18 20:58 ` Sergey Matveev
@ 2025-01-19 1:45 ` John Goerzen
1 sibling, 0 replies; 5+ messages in thread
From: John Goerzen @ 2025-01-19 1:45 UTC (permalink / raw)
To: Marek Küthe; +Cc: nncp-devel
On Sat, Jan 18 2025, Marek Küthe wrote:
> Thanks for the quick reply!
>
> On Sat, 18 Jan 2025 23:38:20 +0300
> Sergey Matveev <stargrave@stargrave•org> wrote:
>
>> Well, 30sec latency is anomalously huge delay for IP-link. Even
>> communication with geostationary satellite has less than 1s RTT.
>> I can imagine only very buffer-bloated stack, that adds such huge
>> latencies.
>
> The latency occurred when I used IP via Meshtastic. Meshtastic itself
> uses LoRa (by default in long-fast mode).
I would like to learn more about this. I have dabbled in both LoRa and
Meshtastic. I haven't tunneled IP over Meshtastic though.
Due to LoRa's very slow bitrate, the overhead for IP packets is
significant and TCP performs quite poorly over it. See some comments in
my project at https://github.com/jgoerzen/lorapipe about this.
But since you can specify a command to pipe to for the addrs in
nncp.hjson, you can pipe directly over a reliable transport without
involving TCP/IP. This would have a significant benefot for LoRa.
- John
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-19 2:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-18 11:15 NNCP with SP via high-latency links and TCP timeouts Marek Küthe
2025-01-18 20:38 ` Sergey Matveev
2025-01-18 20:49 ` Marek Küthe
2025-01-18 20:58 ` Sergey Matveev
2025-01-19 1:45 ` John Goerzen