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

Mention multiple capsules are allowed #33

Merged
merged 2 commits into from
Oct 14, 2021
Merged

Mention multiple capsules are allowed #33

merged 2 commits into from
Oct 14, 2021

Conversation

DavidSchinazi
Copy link
Collaborator

Fixes #32

Copy link
Collaborator

@tfpauly tfpauly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This initial paragraph is good! However, I think we could drop a bit more text in, either for each capsule, or in this summary. Just a very simple explanation of what multiple means (that they don't replace each other, but add):

If an endpoint receives multiple ADDRESS_ASSIGN capsules, all of the assigned addresses or prefixes can be used. For example, multiple ADDRESS_ASSIGN capsules are necessary to assign both IPv4 and IPv6 addresses.

If an endpoint receives multiple ROUTE_ADVERTISEMENT capsules, all of the advertised routes can be used. For example, multiple ROUTE_ADVERTISEMENT capsules are necessary to provide routing to both IPv4 and IPv6 hosts. Routes are removed using ROUTE_WITHDRAWAL capsules.

@DavidSchinazi
Copy link
Collaborator Author

Good point, added. Note that I've also added an important note about how ROUTE_ADVERTISEMENT and ROUTE_WITHDRAWAL coexist, please take a look @tfpauly and @achernya .

@@ -334,6 +343,12 @@ packets in that prefix to its peer. Note that this capsule can be reordered
with DATAGRAM frames, and therefore an endpoint that receives packets for
routes it has rejected MUST NOT treat that as an error.

ROUTE_ADVERTISEMENT and ROUTE_WITHDRAWAL capsules are applied in order of
receipt: if a prefix is covered by multiple received ROUTE_ADVERTISEMENT and/or
ROUTE_WITHDRAWAL capsules, only the last received capsule applies as it
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This text is a bit confusing as written. Maybe rephrase this as "ROUTE_ADVERTISEMENT and ROUTE_WITHDRAWAL for a specific prefix [...]"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would mean something different. I phrased this specifically to cover the scenario of one route containing another.

For example if we have the following sequence:

  • ROUTE_ADVERTISEMENT 2001:DB8::/32
  • ROUTE_WITHDRAWAL 2001:DB8:1111:2222/64

Then the recipient has routes in the tunnel for 2001:DB8:0000:0000-2001:DB8:1111:2221 and 2001:DB8:1111:2223-2001:DB8:FFFF:FFFF.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My point was that right now you have to read the sentence 1.5 times to understand it, because the qualifier for what "last received update applies" is at the very end. This is an editorial nit, but I think the current sentence structure is confusing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair. Can you propose text that accounts for the scenario when one prefix is included in another?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In attempting to suggest text that I find more clear, I actually think I found a bug in these semantics.

We've overloaded WITHDRAWAL to mean two things in this setup:

  1. Undo a previous ADVERTISEMENT
  2. Create an entry in the routing table that means no-route

These are actually slightly different operations, even though it sounds like they should produce the same effect, because of the processing of overlap.

The in-order logic simply means whenever you get a new ADVERTISEMENT, you append it to your table -- pretty simple. But WITHDRAWAL has to first scan for an exact match in the table, and if it finds one, delete it. If it does not, then it needs to add an entry for no-route. But that implies the ADVERTISEMENT logic is similarly wrong: it has to also delete any no-route entries that may already exist.

Perhaps ADVERTISEMENT should grow another field in the capsule indicating if the range is routable or not, and WITHDRAW is simply an inverse of ADVERTISEMENT? That way a positive route and null route are represented without overload.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to facilitate progress, I'm going to merge this as-is and continue the discussion in #34. That way I can write a PR based off main that can attempt to resolve #34 and we can discuss there.

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.

Explain behavior when handling multiple capsules of a given type
3 participants