From 6d67afa00197f7315485a64680092ba9f1e1bae4 Mon Sep 17 00:00:00 2001 From: Fisher Darling Date: Fri, 4 Nov 2022 08:40:04 +0100 Subject: [PATCH] shift right, not left --- projects/alamesh/alanet_conf_reqs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/alamesh/alanet_conf_reqs.md b/projects/alamesh/alanet_conf_reqs.md index e860572..54b5d2f 100644 --- a/projects/alamesh/alanet_conf_reqs.md +++ b/projects/alamesh/alanet_conf_reqs.md @@ -45,7 +45,7 @@ We can combine the internal IP and subnet pretty easily using cidr notation. e.g `255:10::1` and the network is `255::/16`. The router id can be calculated from the host and network. We take the set prefix of `255:10::1/16` which is `255::/16` -and convert that to a 128-bit integer. We then shift that integer left 96 bits and convert the lower 32 bits to an IPv4 +and convert that to a 128-bit integer. We then shift that integer right 96 bits and convert the lower 32 bits to an IPv4 address. If the lowest byte of that new IPv4 addr is 0, we add 1. ```