This question already has an answer here:

I am currently exploring Nmap for its capabilities. Can anyone tell how can Nmap be used to query the machines connected to a network switch?

marked as duplicate by Iszi, tlng05, WhiteWinterWolf, M'vy, RoraΖ Jul 21 '15 at 11:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • That really depends on what data you're looking to gather. You don't need nmap to do a ping sweep and look at your arp table. – Iszi Jul 20 '15 at 16:17

Nmap is not the right tool for that. "Machines connected to a network switch" is a layer 2 question. Nmap is a layer 3 tool.

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