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

allow to specify source LLA's address #27

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

skoef
Copy link

@skoef skoef commented Aug 30, 2021

While this causes a breaking change in the way source_lla is configured, it could be an approach to allow for overriding the source link-layer address derived from the dialing interface.

This PR is in response to #26

@mdlayher
Copy link
Owner

mdlayher commented Sep 3, 2021

Thanks for the PR. I would rather not break the existing configuration and would prefer to add new options if anything. It isn't clear to me if this behavior (advertising on behalf of another router) is actually allowed by the NDP RFCs. Do you have any references?

@skoef
Copy link
Author

skoef commented Sep 10, 2021

I agree that breaking changes are no desirable, this was merely a PoC and I'm happy to take any suggestions.

I'm not aware of any implementations out there sending RA's on behalf of another router, except my own, and I wouldn't be surprised if it is violating the RFC, but I'm not sure so I can lookup into this.

@mdlayher
Copy link
Owner

Cool! I will do some research as well.

Another approach would be to actually expose the corerad.Server type for consumption in other packages. I have been putting off some cleanup on that for quite a while. It's possible that that would be useful elsewhere too.

@skoef
Copy link
Author

skoef commented Sep 10, 2021

The RFC states:

router - a node that forwards IP packets not explicitly
addressed to itself.

which doesn't explicitly is the case when sending out RA's on behalf of another router, but later:

A router might want to send Router Advertisements without advertising
itself as a default router. For instance, a router might advertise
prefixes for stateless address autoconfiguration while not wishing to
forward packets. Such a router sets the Router Lifetime field in
outgoing advertisements to zero.

To me, that seems the RFC allows for hosts to send out RA's even if they don't forward packets but only for SLAAC (exactly my usecase).

@skoef
Copy link
Author

skoef commented Sep 24, 2021

I've cleaned up the PR a bit and this time it's not a breaking change. Let me know if you're happy with the lla_address config key, since the word address is in LLA already ofcourse. I could change it into ll_address with then the link with source_lla wouldn't be as evident.

@skoef
Copy link
Author

skoef commented Oct 6, 2021

@mdlayher any thoughts on this?

@mdlayher
Copy link
Owner

mdlayher commented Oct 6, 2021

Wouldn't this problem be solved in the correct way by running multiple instances of a router advertisement daemon?

  • router advertises default route
  • hypervisors are delegated prefixes and then serve SLAAC to their VMs with no default route
  • hosts get addresses via server SLAAC and default route from the real router

I hesitate to support anything tricky, especially since you also mention setting the destination MAC in the issue (which is something we can't do at this layer of the networking stack).

@skoef
Copy link
Author

skoef commented Oct 11, 2021

That actually works, never thought of that. The only difference with how I normally send the router advertisements is that now I have both a /64 route and a /48 route next to a default route in my routing table, but that doesn't harm anything.

The only hurdle I have to overcome now is to configure different prefixes for different source MAC/link-local addresses. I don't think such flexibility is currently possible in CoreRAD. For testing I configured 1 customer prefix and manually dropped all router solicitations from other MACs towards CoreRAD and that has the desired effect. How could I approach this issue?

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

Successfully merging this pull request may close these issues.

2 participants