From: "Cole Helbling" <cole.e.helbling@outlook.com>
To: "Alyssa Ross" <hi@alyssa.is>, <devel@spectrum-os.org>
Subject: Re: [PATCH nixpkgs] spectrumPackages: use link-local router addresses
Date: Fri, 14 May 2021 09:52:18 -0700 [thread overview]
Message-ID: <SJ0PR03MB5581A0396FC9A213224002EDB3509@SJ0PR03MB5581.namprd03.prod.outlook.com> (raw)
In-Reply-To: <20210513201323.2087344-1-hi@alyssa.is>
On Thu May 13, 2021 at 1:13 PM PDT, Alyssa Ross wrote:
> There's no need for every interface on a router to have it's own
> unique IP. Using link-local addresses, we can assign every interface
> on a single router the same IP, and save the effort of
> adding/subtracting one all the time to infer the address of one side
> of a link from the other.
>
> This means that routers and clients are both only interested in what
> the IP of the client should be, since that's the only thing that is
> different between different links. So we change our MAC format to
> communicate the client IP to both sides. If we just made the whole
> NIC portion of the MAC the last three octets of an IP address like we
> did before, then both ends of the link would have the same MAC, so we
> still need to set a bit to encode whether a MAC is at the router side
> of the link or the client side. I've decided to simplify the
> implementation by using the most significant bit of the NIC part for
> that, and just declaring the rest of that octet to be reserved. This
> way, no calculation is required in the guests -- they just need to
> look at the last two octets. And we can still identify 65536 links in
> this scheme, which should be enough for anybody, right?
> ---
> I'd like to move the networking to be IPv6. That's a bit more
> complicated, but shouldn't get in the way of smaller improvements like
> this.
>
> .../linux/spectrum/testhost/default.nix | 25 ++++++++-----------
> .../linux/spectrum/vm/app/default.nix | 15 ++++-------
> .../linux/spectrum/vm/net/default.nix | 13 +++++-----
> 3 files changed, 23 insertions(+), 30 deletions(-)
Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
prev parent reply other threads:[~2021-05-14 16:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-13 20:13 [PATCH nixpkgs] spectrumPackages: use link-local router addresses Alyssa Ross
2021-05-14 16:52 ` Cole Helbling [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SJ0PR03MB5581A0396FC9A213224002EDB3509@SJ0PR03MB5581.namprd03.prod.outlook.com \
--to=cole.e.helbling@outlook.com \
--cc=devel@spectrum-os.org \
--cc=hi@alyssa.is \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).