ntop / n2n

Peer-to-peer VPN
GNU General Public License v3.0
6.18k stars 930 forks source link

What the better mtu for n2n v3? #985

Closed altair-albert closed 2 years ago

altair-albert commented 2 years ago

I mee a problem. ssh over the n2n network can't output large message( less 1K (maybe)). and always hangup. but i can ping each other.

Welcome to n2n v.3.0.0 for Linux
Built on Dec 20 2021 21:12:09

mtu default

edge0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1290 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 06:3c:3d:79:f7:7a brd ff:ff:ff:ff:ff:ff

when I dynamic change the mtu to 1000 ip link set edge0 mtu 1000, its works again.

Logan007 commented 2 years ago

Yes, it looks very much like an MTU issue you are experiencing. Somewhere on the line, packets end seems to be shaved off.

I made the same experience at some point and IIRC it were the last parts of initial handshake/negotiation packets which got cut-off. In my case, I was able to connect using some other manually specified cipher -c aes-128 or so (can't recall the details) and change MTU to lower value on the remote edge, too.

But MTU of 1000 indeed is very low, maybe you will be able to go a bit higher again.

For regular LAN and DSL, the default MTU of 1290 still is very good and allows sufficient, actually more than generous, space for headers.

Logan007 commented 2 years ago

Is this still an issue? If no, how did you solve it?

altair-albert commented 2 years ago

No, I just change mtu by manual. but it's works.