From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.5 Received: by atuin.qyliss.net (Postfix, from userid 496) id D67EEBAC1; Fri, 14 May 2021 16:53:00 +0000 (UTC) Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id E1A20BAAA; Fri, 14 May 2021 16:52:51 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id BD9CDBA2E; Fri, 14 May 2021 16:52:49 +0000 (UTC) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07olkn2058.outbound.protection.outlook.com [40.92.43.58]) by atuin.qyliss.net (Postfix) with ESMTPS id C1EF9BA2D for ; Fri, 14 May 2021 16:52:46 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JdheeTZaHQbe4ODguD2f7ty/2Y9Hk8wnW8iCHtHyFyJO3e+HgYXqMxQRrI3EYdEzO3X7fp55GHPbW8VR6SPMlP/oFDkr4sSdSY6BLtRtIzCRWENnQM2l9AvUKmjhbItWyaGg4jmlPg570lRBHOVMVNU1A3CObiFu3vBUKNJ6rd3VqRPa1F5sGA88jkYm49bjMisCahkYXmy0JaFSsVq+/u45xAwYO5jGxjbT33iAooDPEN6uZinFv5Z5d+7SV86V1EWtzG3SagTcLSx0wR86iY5Hh4Ne2ohy0gMm3nCBNTNAmXHyKtA2DPvfGNnUZC4hgI5uo230AegJWz8R4Ct6WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MWUjZj0gCFh2lPZz6wPu25Dlg0a6/gycNF/h6tjL3ks=; b=IroYaV99PrCYGj46PFMEQNjAx6u84pED/21IAHj9CCJcTos8GHa9ba+TM2Pn/Q7WRmLSuX4dhkpXyFYJzY5ELvx4Zo4xp0kcK27VUlUuFjvp0OtkwWFTXDJ/NxQ1JyOGrCqHZxDjH+B1ohVc7tOjMz7V4aiIbqIRGI6LW8/b9rR8Fj5YiB04eT0XsPg8x1Z90vfqwFxzymRasuXfFqDsEBJ6QZI0jkF2iPEtkt72+nQmZCgE8ZAeKMHFdKaFmgh9sQsQSRQB+gbGaeOEKv1f0KUo93pe6i2agI+zJtgQ3akmdtdvlkSkAcoy6ErCmz4etvpKOT3c/BTwtQR/Y5Bbew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MWUjZj0gCFh2lPZz6wPu25Dlg0a6/gycNF/h6tjL3ks=; b=Z3Hd7ySSWO1xkL8Qsb09kvFI1Odvl+jsvErO7bcUuKQqPu84FjR6I0rMsG9nhDf23AQ1P8cNqsv+s9PmHkqXuA0FocSFlczdtt5bW3CA+tnDxmDGrFJr5jb4+Qa7k9iowFN2xQcODzlZ6OZH15I8Ak7OQpFEkcuDMOaIE+7c+RaKYerY9yb7JPSSnhjisZoqLJKHFzPt88X7sQ9s+TwYicqsSkIn2/0LPcHf9S41kul4vCELbUhWtF/SoRb5TpxHiV/8FqUI5HNMQsic4LwAkbZocrk+FysPD2JnKQ9tgrySSEryDV53yBntwLKVFVXaIKALmWXIECD8mogXU+jXBw== Received: from SN1NAM02FT043.eop-nam02.prod.protection.outlook.com (2a01:111:e400:fc4a::47) by SN1NAM02HT0003.eop-nam02.prod.protection.outlook.com (2a01:111:e400:fc4a::145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.27; Fri, 14 May 2021 16:52:43 +0000 Received: from SJ0PR03MB5581.namprd03.prod.outlook.com (2a01:111:e400:7e44::43) by SN1NAM02FT043.mail.protection.outlook.com (2a01:111:e400:7e44::184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.27 via Frontend Transport; Fri, 14 May 2021 16:52:43 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:6FF1DB7C34AAC83B45CB3F70B8DE2AB0BE9D0E6FC7737E445D1BE6C327AFB1AE;UpperCasedChecksum:5CECA57E96FCF075E8264F80E3201515CB8B261678E81876D1B96ABB625EEF99;SizeAsReceived:8466;Count:44 Received: from SJ0PR03MB5581.namprd03.prod.outlook.com ([fe80::2437:eb29:a6eb:76fa]) by SJ0PR03MB5581.namprd03.prod.outlook.com ([fe80::2437:eb29:a6eb:76fa%5]) with mapi id 15.20.4129.026; Fri, 14 May 2021 16:52:43 +0000 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 From: "Cole Helbling" To: "Alyssa Ross" , Subject: Re: [PATCH nixpkgs] spectrumPackages: use link-local router addresses Date: Fri, 14 May 2021 09:52:18 -0700 Message-ID: In-Reply-To: <20210513201323.2087344-1-hi@alyssa.is> X-TMN: [cBRlLl6TFS/7tO7vCWMZ+36jwkR3GtU1] X-ClientProxiedBy: SJ0PR13CA0055.namprd13.prod.outlook.com (2603:10b6:a03:2c2::30) To SJ0PR03MB5581.namprd03.prod.outlook.com (2603:10b6:a03:27b::20) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (73.48.197.220) by SJ0PR13CA0055.namprd13.prod.outlook.com (2603:10b6:a03:2c2::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.11 via Frontend Transport; Fri, 14 May 2021 16:52:43 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 44 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 9d3a9217-b2f5-40b0-f802-08d916f8b16d X-MS-TrafficTypeDiagnostic: SN1NAM02HT0003: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1/ZFXp+KL6lAEIkwntc2qwRz/Zsw9wggaE12Cn6alFKnz3c9Jdlpd1+8On8DngI/aVlBIgqOz33pQLhwhaj7ip4hBVCpPPz4UMEB2731KeFlfN1gQaJYM87XmEUpdYqRMWNDsSxqKlVGznb2wivfaeXgl/pGTVUp84gNNgP7Yg/3HLNrZmU87hV5KZxaC8XEneQWAumq93qOUrekpYR2WA+CbzuEhAXMwSr9fXqZiTYqMqbaeBbo1X6zA/YcNGN2mH8cZ0asfQDfOXUSH8B7ADFSoK5IWjb5yK3tJkFvWgifja9bFdteFGHSvC3vB5oLf1fWIJ3rhSQ10B3ufHFYnVSfbnoxUzT8OWDGX8AjCLi/Dd10HZU291QQeLUxNSlo2TT6JOkCGSzXw6e2olwK5g== X-MS-Exchange-AntiSpam-MessageData: xa0kOl7hXoHdTTZOILKMDCa+Dp2kNPGQ349f6hBB8qgEO2HXT6/7VhFP9ES9zm4fGa5M320eGaciPNKyMNzmLnuzPviQo9EfKruF/aaYO9mY9G2Fc0LMuEuLH0vOHuM4q4Rvigx//4vHnuZ/EiVrBw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d3a9217-b2f5-40b0-f802-08d916f8b16d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2021 16:52:43.8730 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT043.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1NAM02HT0003 Message-ID-Hash: EFEE7ZDKFD4W6KI2Y27WKQZRRM4XHYWU X-Message-ID-Hash: EFEE7ZDKFD4W6KI2Y27WKQZRRM4XHYWU X-MailFrom: cole.e.helbling@outlook.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.4 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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