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

[Feature] Assign IP addresses to non-headscale devices #2169

Open
1 of 2 tasks
crimewaffle opened this issue Oct 4, 2024 · 3 comments
Open
1 of 2 tasks

[Feature] Assign IP addresses to non-headscale devices #2169

crimewaffle opened this issue Oct 4, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@crimewaffle
Copy link

Use case

Currently, when accessing multiple networks with identical subnets (e.g., 10.10.10.0/24), only one network can be routed at a time. Switching between these networks requires manually disabling one subnet route and enabling another, which is inefficient.

Description

Introduce the ability to assign unique Headscale IPs (100.64.0.0/10) to specific devices, bypassing the need to route entire subnets. This would allow direct access to individual devices across multiple networks without conflicting subnet routes.

Example Use Case:

Network1: 10.10.10.0/24 (Switch/AP at 10.10.10.11)
Network2: 10.10.10.0/24 (Another Switch/AP at 10.10.10.175)

With this feature, users could assign a unique Headscale IP (e.g., 100.64.x.x) to the switch at 10.10.10.11 on Network1 and another Headscale IP to the switch at 10.10.10.175 on Network2. This eliminates the need for manual routing of entire subnets and simplifies access to specific devices on overlapping subnets.

Contribution

  • I can write the design doc for this feature
  • I can contribute this feature

How can it be implemented?

No response

@crimewaffle crimewaffle added the enhancement New feature or request label Oct 4, 2024
@kradalby
Copy link
Collaborator

kradalby commented Oct 4, 2024

If I understand you correctly, I do not think we can do this, the only thing we do is pass a set of routes down to the Tailscale client, which then builds a routing table on what to send where. Headscale by itself cant really map addresses to subnet routers.

If I am misunderstanding and you can find a feature like this in Tailscale's documentation, then we might be able to build it.

As a potential work around, tho tedious, you can announce /32 subnet routes, so for the subnet router that is in front of Switch/AP at 10.10.10.11 you can announce 10.10.10.11/32, but you will have to manage them all "manually" or make some script to talk to the API.

@ChibangLW
Copy link
Contributor

4via6 subnet routers is probably what you want or need.

It should be supported in headscale.

I am not sure it would be a good idea to assign a tailnet ip to non-tailnet devices (if at all possible).

@crimewaffle
Copy link
Author

4via6 might actually be it.

i disabled ipv6 tho

implementing that into my workflow is going to be a pain in the ass lmao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants