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

Ip6 scoped linklocal #113

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

christophefontaine
Copy link
Contributor

First try to implement scoped link local addresses.

Still has some issues:

grout# add ip6 route ::0/0 via fe80::4e77:6dff:fe7d:1cc7
error: command failed: No route to host

This link local address doesn't exist in the FIB, but fe80:100::4e77:6dff:fe7d:1cc7 and fe80:300::4e77:6dff:fe7d:1cc7 are present internally.

grout# add ip6 route ::0/0 via fe80:100::4e77:6dff:fe7d:1cc7
grout# show ip6 route
VRF  DESTINATION                    NEXT_HOP
0    fe80::209:c000:17e:f6b/128     fe80::209:c000:17e:f6b
0    fe80::4e77:6dff:fe7d:1cc7/128  fe80::4e77:6dff:fe7d:1cc7
0    fe80::1:1/128                  fe80::1:1
0    fe80::4e77:6dff:fe7d:1cc7/128  fe80::4e77:6dff:fe7d:1cc7
0    fe80::90e2:ba00:314:2f8c/128   fe80::90e2:ba00:314:2f8c
0    ::/0                           fe80::4e77:6dff:fe7d:1cc7

We may have a similar linklocal next hop (same ip, same mac) on 2 different interfaces.
In order to support scoped linklocal addresses, we encode the interface id
in the second nibble of the ipv6 address:

"fe80::209:c000:17e:f6b on interface id 1" becomes "fe80:100::209:c000:17e:f6b".

Signed-off-by: Christophe Fontaine <[email protected]>
Do not expose the internal encoding of the interface in
the link local address.

Signed-off-by: Christophe Fontaine <[email protected]>
@christophefontaine
Copy link
Contributor Author

I'll update the API to allow the client to specify the interface.

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.

1 participant