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

How to support Link-Local scope addresses for IPv6 #12

Closed
mcr opened this issue Oct 5, 2021 · 2 comments
Closed

How to support Link-Local scope addresses for IPv6 #12

mcr opened this issue Oct 5, 2021 · 2 comments

Comments

@mcr
Copy link
Collaborator

mcr commented Oct 5, 2021

== DISCUSS ==

> Generic comment how are link-local address (LLA) with scope encoded ? I would                  
> expect CBOR to work also on LLA only networks... At the bare minimum, please                   
> state that link-local addresses cannot be encoded with their scope, hence, they                
> cannot represent an interface.                                                                 
                                                                                                 
> -- Section 3.1.3 --                                                                            
> How can 2 valid link-local addresses (fe80::1%eth0, fe80::1%eth1) can be                       
> represented in order to identity two interfaces ?                                              
@mcr
Copy link
Collaborator Author

mcr commented Oct 5, 2021

There are three kinds of things encoded:
a) addresses.
b) prefixes
c) interface definitions

For (b) and (c), we could easily entertain (and did we discuss this in the
thread that was CC'ed to 6man?) adding a third element to the array to store
the interface ID.
For (a), I'm not sure what we can do to add the interface ID, but see below.

That's kinda the easy part.
The hard part is deciding how to encode the scope.
The simplest is as an integer, being the ifindex.

CBOR makes that easy and efficient, and many systems don't have more than 24
interfaces. However, on systems where interfaces come/go a lot, the ifindex
often increments anyway. Using the ifindex is probably clearer on most any
system than a string which can change, but it does change from one boot to
another.
While the ifindex is system specific and has no outside meaning, the purposes
where I imagine this being used would be in some system specific container.
(My use case, which drove me to do this, actually probably needed scope-id)

One way to do (a) could be to append to the IPv6 string.
Another way would be not to bother, to always use the interface definition
when a IPv6-LL is needed. Whether the length is 0, 128, or the actual
interface prefix (probably 64) is something we could specify.

@mcr
Copy link
Collaborator Author

mcr commented Oct 13, 2021

Solution merged.

@mcr mcr closed this as completed Oct 13, 2021
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

No branches or pull requests

1 participant