-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Feature suggestion
Bulk Allocation Port
I quickly looked in the Jool documentation and also in the Issues of that repository, and I didn't find any reference to the words "bulk" or "lsn", which made me think that this functionality I'm going to suggest has not yet been considered by the project maintainers.
The purpose of this suggestion is to increase the feasibility of implementing Jool as a tool used as P-LAT in 464XLAT scenarios.
I've been interacting with Jool recently, and I've been positively surprised.
However, I currently don't feel comfortable suggesting a set of "CPEs with C-LAT + Jool as PLAT" to replace the "Dual-Stack + CGNAT" scenario precisely because of the volume of logs that Jool generates.
Basically it generates a log entry for each connection that opens or closes, right?
This, in a ISP scenario of 10K, 20K, 50K customers ends up becoming unfeasible both to maintain the necessary disk volume and also to do any search for events up to 2 years ago.
Therefore, I decided to suggest the idea of BulkPortAllocation, which is used by vendors and also by OpenSource projects.
If we were talking about CGNAT 44, if we compared the Predefined(AKA.: Fixed) method with the Bulk Port Allocation(AKA.: LSN) method, the great advantage of the BPA method over Fixed is that after doing the proper tuning the size of the steps of ports and the maximum number of allocation, it is possible to have a very small volume of logs, optimizing the use of public IPv4.
Furthermore, it avoids the problem that the fixed method imposes of "spending" public ports with IPs that are often not being used.
In a simple example, if instead of generating a LOG for each of the 256 new connections established by the same client, I generated only a log saying "these 256 ports are for this client" I would save 255 LOG entries.
(I ask for tolerance here, I know the example is very shallow).
I AM NOT A PROGRAMMER!
But I will try to make a very concise explanation of what the idea is in an environment where Jool would play the role of P-LAT with Bulk Port Allocation support:
A new connection request arrived from the IPv6 side->
Does this IPv6 already have a block of ports allocated to it?
_If yes: Is there a port available to do the translation?
_ _If yes: Do NAT 64
_ _If not: Go to TryAllocateNewBlock
_If not: Go to AllocateNewBlock
TryAllocateNewBlock
Has this IPv6 already exceeded the maximum amount of blocks that was configured?
_If yes: Is there a port available to do the translation?
_ _If yes: Reply with NAK, and generate log.
_ _If not: Go to AllocateNewBlock
AllocateNewBlock
Choose a block of available public IPv4 ports, whether random or sequential.
Allocate this block to this IPv6.
Generate Log of this allocation
There are also snippets of logic for:
- Generate block deallocation log.
- Generate log of "still allocated to the same client", almost like an interim-update.
There are also many other criteria in the configuration of this scenario, such as whether or not to synchronize the UDP and TCP port ranges to avoid making a log for each protocol...
Well... I make myself available, if it is in your interest, to try to collaborate as much as possible.