0

I have several hosts from which I traceroute to the same destination.

Is there a way to determine whether two IP addresses belong to different interfaces of the same router?

Is it enough to check if the hostname is the same (dig +short -x $IPADDRESS)?

Are there other methods?

  • 1
    Why do you need to do that? What is the actual problem that you are seeking to resolve by asking this question? – a CVn Aug 27 '14 at 14:11
  • I am not sure how reliable hostname is - what is there to prevent another device on the network claiming the same hostname? AD? - an alternative would be to check against all the MAC addresses that the interfaces have (and while MAC addresses can also be spoofed, that is likely to cause errors on the network) – user2813274 Aug 27 '14 at 14:11
  • @MichaelKjörling: My actual goal is to check to which extent paths from different hosts overlap. – Ricky Robinson Aug 27 '14 at 14:17
  • 1
    @user2813274 MAC addresses are not routed. IP runs on top of Ethernet, not the other way around which would be required for routing of MAC addresses. – a CVn Aug 27 '14 at 14:19
2

Just based on an IP address it is not possible to check if they belong to the same device. If you were to be in the same network(subnet), you could compare the MAC addresses and see if they are consecutive, which would give you some guarantee.

If the remote router has some sort of service running which allows it to be identified (SNMP/Webservice with unique hostname/Telnet banner etc.) you could use that of course.

You could try running nmap against both routers and see if the results are the same, which could mean it's the same device, or that the remote party has configured 2 routers with exactly the same settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.