Skip to content

Support roaming between NAT64 and native IPv4 networks #1214

Open

Description

@achernya

I've recently noticed that some wifi deployments are now NAT64 with with DNS64, meaning they have no native IPv4 connectivity, and the NAT64 gateway provides the IPv6 to IPv4 translation.

In particular, when roaming between a native IPv4 network to a NAT64 IPv6 network, mosh never is able to reconnect to an IPv4 server, presumably because all of the sendmsg calls get EHOSTUNREACH (No route to host). Similarly, if the mosh session is started on such a network then roamed to a native IPv4 network, the same applies.

Mosh should detect such networks and automatically switch between the native IPv4 address and the NAT64 address. RFC 7050 specifies how to detect such networks: a DNS AAAA query for ipv4only.arpa , which normally points to 192.0.0.170 and 192.0.0.171, lets you discover the NAT64 prefix.

Activity

  1. added this to the mosh-1.5.0 milestone on Jan 24, 2023
  2. achernya commented on Jan 24, 2023

    @achernya
    CollaboratorAuthor

    This is closely related to #212. I think the main difference here is we may want to add some heuristics to enable this even if a general purpose hostname re-resolution feature is protected behind a --enable-roaming flag to the main mosh CLI. The heuristic could be something like "has exactly 1 A record", although admittedly that would still not work for systems that do DNS-based load balancing with short TTLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions