- Community Home
- >
- Networking
- >
- Switching and Routing
- >
- Aruba & ProVision-based
- >
- Re: How to get hostnames on all connected devices
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2017 08:59 PM
01-11-2017 08:59 PM
How to get hostnames on all connected devices
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2017 02:32 AM - edited 01-12-2017 02:32 AM
01-12-2017 02:32 AM - edited 01-12-2017 02:32 AM
Re: How to get hostnames on all connected devices
From a Switch standpoint is generally true that you can do a MAC Address <-> Switch Port mapping and then infer about known/unknown discovered MAC Addresses to understand what devices (so, eventually, which hostnames) are really connected to within your Subnet(s)...doing so you can also easily discover (even without deploying LLDP) if there are other "foreing" Switches connected to your Switch ports (sometimes Network topology become, during years, very unknown to some IT Administrators!).
Generally by examining the Switch ARP Table and its discovered MAC Addresses you can build a "Switch Port - MAC Address - IP Address - VLAN Id - Hostname" list (or sort of)...but that will happen using different discovery (manual/automatic) methods, not relaying only on your Switch internal capabilities/features.
I'm not an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2017 02:33 AM
01-12-2017 02:33 AM
Re: How to get hostnames on all connected devices
Hi
"show lldp neighbors" should do the trick.
Kind regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2017 02:50 AM
01-12-2017 02:50 AM
Re: How to get hostnames on all connected devices
Or "show lldp info remote-device" since this is a 2530.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2017 07:37 AM - edited 01-12-2017 08:07 AM
01-12-2017 07:37 AM - edited 01-12-2017 08:07 AM
Re: How to get hostnames on all connected devices
Consider that primarily LLDP is used to collect infomation from neighboring switches and other media devices (through LLDP-MED), reference here...I personally doubt it can collect Host's hostnames (FQDNs or simply host names <- both are set on Hosts at their Operating System level), for sure it can collect neighborig switches' system names.
I'm not an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2017 11:32 AM
01-12-2017 11:32 AM
Re: How to get hostnames on all connected devices
I'll try the command when I get on site. I thought of another way to find what I'm needing. If I can get a list of all the mac addresses and what port their connected to, then use a program to scan my network and pull the hostname's and mac from all my devices then I can join the data in a database or excel and then I'll have my Hostname, port number, and mac address. I just have to find the software that can do all this and the command to see what mac is on what port. I currently use a solar winds product to scan my network, but I don't believe it lists mac addresses, just IP and hostname. I was just hoping there was a way to do it from the CLI, but it looks like I'm going to have to add in a couple more steps.
But I'll try what you all have said and see if it's what I need. I'll etl you know how it turns out. If you can think of anything else or if anyone knows of a good freeware, or cheap software that will scan my network and give me Hostname, and mac, please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2017 12:07 PM - edited 01-12-2017 12:41 PM
01-12-2017 12:07 PM - edited 01-12-2017 12:41 PM
Re: How to get hostnames on all connected devices
zenmap, eventually, is the GUI frontend of nmap if you use a graphical desktop environment.
I'm not an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2017 07:00 PM
01-12-2017 07:00 PM
Re: How to get hostnames on all connected devices
When using "show lldp info remote-device" I'm given 3 devices which shows me 3 mac addresses. It appears that the 3 devices are 3 other switches on the same network, but it doesn't list any of the other devices plugged into the switch. Why wouldn't it list everything plugged into the switch?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2017 07:00 PM
01-12-2017 07:00 PM
Re: How to get hostnames on all connected devices
You need to carry out 3 operations to produce this list:
1/ On the switch:
show mac-address table.
This give you the switchport to MAC address mapping.
2/ On the layer3 switch/router:
show arp
This gives you the MAC address to IP address mapping
3/ use nslookup to resolve IP address to hostname.
You could write scripts to gather the info and pass the results to the next script and eventually output the whole thing as a list or table.
Alternatively, get hold of tool such as Solarwinds "Switchport mapper" to do it for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2017 03:12 AM - edited 01-16-2017 03:08 PM
01-13-2017 03:12 AM - edited 01-16-2017 03:08 PM
Re: How to get hostnames on all connected devices
crabtreecj wrote: ...but it doesn't list any of the other devices plugged into the switch. Why wouldn't it list everything plugged into the switch?
Please, re-read replies provided above: answers given were plain clear, already in front of your eyes.
I'm not an HPE Employee