shift right, not left

This commit is contained in:
Fisher Darling
2022-11-04 08:40:04 +01:00
parent f72aa78f86
commit 6d67afa001
+1 -1
View File
@@ -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.
```