Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `eamt query` feature #287

Closed
ydahhrk opened this issue May 23, 2019 · 0 comments
Labels
Milestone

Comments

@ydahhrk
Copy link
Member

@ydahhrk ydahhrk commented May 23, 2019

While trobleshooting some problems from a user, I noticed that the EAMT algorithm is rather error-prone when done by hand. For example,

IPv4 Prefix IPv6 Prefix
2001:db8::/32 192.0.2.0/24

The IPv6 version of 192.0.2.4 is neither of these:

  • 2001:db8::4
  • 2001:db8:4::
  • 2001:db8:4000::

The right answer is 2001:db8:0400::. (Right? Hopefully. I did it by hand.)

So, since people sometimes wants to know the IPvX version of the IPvY address (where X does not equal Y), and dealing with the algorithm needn't be a daily chore, I propose

$ jool_siit eamt display
+---------------------------------------------+--------------------+
|                                 IPv6 Prefix |        IPv4 Prefix |
+---------------------------------------------+--------------------+
|                         2001:db8:aaaa::/128 |       192.0.2.1/32 |
|                        2001:db8:bbbb::b/128 |       192.0.2.2/32 |
|                         2001:db8:cccc::/124 |      192.0.2.16/28 |
|                          2001:db8:dddd::/64 |     192.0.2.128/26 |
|                        2001:db8:eeee:8::/62 |     192.0.2.192/29 |
|                               64:ff9b::/127 |     192.0.2.224/31 |
+---------------------------------------------+--------------------+
$ jool_siit eamt query 192.0.2.128
2001:db8:dddd::
$ jool_siit eamt query 2001:db8:eeee:9:8000::
192.0.2.195

Giving people the opportunity to experiment should also discourage them from using different suffix lengths for corresponding prefixes, because it's so actually rarely needed.

@ydahhrk ydahhrk added the New feature label May 23, 2019
@ydahhrk ydahhrk closed this in 310b0b7 May 24, 2019
@ydahhrk ydahhrk added this to the 4.0.6 milestone Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.