0

How do you lookup the local hostname from an IPv6 address in Python?

I'm trying to diagnose network bandwidth hogs, and I'm using Wireshark to find which IPv6 addresses are using the most bandwidth, but it doesn't include any hostsnames, so I'm left with a CSV of IPv6 addresses and total bytes transmitted.

Note, I'm not talking about converting a generic IP to domain, since that only works for DNS, not your local network's hostnames.

The only command line tool I know for doing this is:

sudo nmap -sn 192.168.1.0/24

but that doesn't list IPv6 addresses.

Cerin
  • 60,957
  • 96
  • 316
  • 522

1 Answers1

0

This is what I found looking online, I'm sorry but i think that what you are lookin at isn't possible.

From WireShark Q&A:

What you're looking at are probably neighbor discovery packets, which are sent to a special multicast address called "solicited node multicast".

It's basically the replacement mechanism for ARP, which is not used for IPv6 anymore.

Usually, if you need to find out where something is coming from you should try to determine the MAC address of the source, and then log in to your switches to find the port where that MAC address is connected.

There should be a command that will show you the MAC address table of the switch. If you can find a port where only the MAC address in question is listed you need to follow the cable from that port to the device.

If you have more than one MAC address listed for a port it is usually a connection to another switch. In that case you need to log in to the switch it connects to and repeat your search.

Simo
  • 955
  • 8
  • 18