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

Issue with multihomed IP addresses #46

Closed
gmmoura opened this issue Jun 16, 2017 · 11 comments
Closed

Issue with multihomed IP addresses #46

gmmoura opened this issue Jun 16, 2017 · 11 comments

Comments

@gmmoura
Copy link

gmmoura commented Jun 16, 2017

The tools seems to report only 1 AS out of multiple that multihomed IPs have.

E.g:
In [4]: asndb.lookup('37.209.196.7')

Out[4]: (134390, '37.209.196.0/24')

While IP2ASN

whois -h whois.cymru.com " -v 37.209.196.7 2017-06-10 00:00:00 GMT" |cut -d'|' -f1,2,3

AS | IP | BGP Prefix
18210 | 37.209.196.7 | 37.209.196.0/24
134390 | 37.209.196.7 | 37.209.196.0/24
134391 | 37.209.196.7 | 37.209.196.0/24
134396 | 37.209.196.7 | 37.209.196.0/24`

@hadiasghari
Copy link
Owner

Hi @gmmoura , thanks for the input.

Most probably this is the line of code that is responsible in the MRT to IPASN converter:

for prefix, origin in prefixes.items():
    if not debug_write_sets and isinstance(origin, set):
        origin = list(origin)[0]  # get an AS randomly if more than one

This could be changed to save the whole set during conversion, and return the whole set by the lookup method.

Could you elaborate a bit on the use-case and how important it is to all ASes returned for these multi-homed IPs?

Cheers, Hadi

@hadiasghari
Copy link
Owner

I'd appreciate some input to know if this is important to fix.

@aaronkaplan
Copy link

aaronkaplan commented Jul 24, 2017 via email

@hadiasghari
Copy link
Owner

@aaronkaplan that's exactly my thinking, and if the change is useful only for rare cases, then it has little priority.

@hadiasghari
Copy link
Owner

BTW, I also wonder if this issue relates to #37.

@aaronkaplan
Copy link

aaronkaplan commented Jul 25, 2017 via email

@hadiasghari
Copy link
Owner

hadiasghari commented Jul 25, 2017

The change requires producing IPASNDAT files with multiple ASes listed for some prefixes, and this might be incompatible with existing versions of the library (specifically the load function in the C code). This might be OK, but I'd prefer to avoid it if possible. Will check the code.

@ghost
Copy link

ghost commented Jul 25, 2017

Then the new version is simply 2.0 :)

@hadiasghari
Copy link
Owner

hadiasghari commented Feb 11, 2020

@wagner-certat, do you have any code/workaround on this for a possible PR? If so I'd be happy to do a merge. Otherwise I'm closing the issue as a won't fix since the original poster doesn't have an interest in it either.

@ghost
Copy link

ghost commented Feb 11, 2020

I did not work on it. Does the closing of the issue mean that the feature request is rejected?

@hadiasghari
Copy link
Owner

The idea is not rejected: I agree that it could be a useful addition. The question is if anyone wants the feature enough to implement it, and the moment the answer to that question is negative. Do you suggest I keep these kind of issues open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants