Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carrier Grade NAT (CGNAT to CGNAT) Testing #383

Closed
CMCDragonkai opened this issue Jun 14, 2022 · 3 comments
Closed

Carrier Grade NAT (CGNAT to CGNAT) Testing #383

CMCDragonkai opened this issue Jun 14, 2022 · 3 comments
Assignees
Labels
development Standard development r&d:polykey:core activity 4 End to End Networking behind Consumer NAT Devices

Comments

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jun 14, 2022

Specification

Existing issues #159 and PR #381 address testing the NAT busting through hole-punching and centralised signalling via testnet.polykey.io. We know that certain NAT situations won't be traversable until relaying via #182 is possible. We're parking #182 until #365 is first solved, since the architectures would be similar.

This issue is about augmenting our NAT tests to also simulate a carrier grade NAT situation. This is important for mobile device deployment.

To give you an example, our office has a wireless router connected to the ISP. The router provides a LAN for the office computers. However the external IP assigned to the router is not the real IP on the internet, it's also within a LAN with respect to the ISP. The ISP adds their own NAT on top of our router's NAT.

This means there's a "double NAT".

Therefore we may want to test:

  • Any kind of NAT setup (including no-NAT) to a double NAT setup.

The hardest would be double NAT to double NAT.

When I attempted to use wireguard/tailscale to connect my home laptop to my phone's hotspot to the office router to the windows/mac systems in office, I noticed that it had to use the DERP relays, a direct connection was not possible. This implies hole-punching and signalling is not enough in theses situations. But we can simumlate this using our NAT simulation harness.

The CGNAT is likely to be a port-restricted or symmetric NAT. And as we saw in #381, we don't need to test address-restricted or full-cone as long as port-restricted and symmetric works.

Additional context

Tasks

  1. ...
  2. ...
  3. ...
@CMCDragonkai CMCDragonkai added the development Standard development label Jun 14, 2022
@CMCDragonkai CMCDragonkai changed the title Carrier Grade NAT Testing Carrier Grade NAT Testing - "Double NAT" Jun 14, 2022
@teebirdy teebirdy added the r&d:polykey:core activity 4 End to End Networking behind Consumer NAT Devices label Jul 24, 2022
@CMCDragonkai
Copy link
Member Author

CMCDragonkai commented Oct 31, 2022

To test CGNAT to CGNAT, we can basically connect to the office from another mobile network by hot-spotting a laptop. This can be done in-office or at home.

It will be critical for mobile networks for this to work. But if hole punching doesn't succeed then, most likely this will need to be done with relaying.

Note though, that it's possible that many mobile phones end up sharing the same IP address. And this would result in the same problem with P2P on internal networks. I'll discuss this problem in MatrixAI/js-mdns#1.

@CMCDragonkai CMCDragonkai changed the title Carrier Grade NAT Testing - "Double NAT" Carrier Grade NAT (CGNAT to CGNAT) Testing Oct 31, 2022
@CMCDragonkai CMCDragonkai self-assigned this Jul 10, 2023
@CMCDragonkai
Copy link
Member Author

CMCDragonkai commented Dec 15, 2023

This can only be done in PKI, not here. Closing for now as this is not something we can do until we implement more sophisticated PKI and setup relaying NAT traversal in #182.

@CMCDragonkai
Copy link
Member Author

@amydevs

@CMCDragonkai CMCDragonkai closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development r&d:polykey:core activity 4 End to End Networking behind Consumer NAT Devices
Development

No branches or pull requests

2 participants