Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

CDP neighbors

hi,

i have edge switch to which all my users are connected.

Is there any command to get user's IP like we do in show cdp neighbors r is there any way to do it

pleasw help on this!!!!!!!!!!!

5 REPLIES

CDP neighbors

Hi,

if it's an L2-only switch, the only way is:

sh ARP

on the default-gateway router.

And correlate with user MAC addresses shown by

sh mac-address-table

on the edge switch.

HTH,

Milan

Cisco Employee

CDP neighbors

Hello Vishal,

No specific tool for that. Though you can do following. Take particular VLAN - you will need to have SVI for that VLAN configured. Ping broadcast address for that subnet (e.g. if subnet is 10.1.1.0 /24 - then broadcast for it is 10.1.1.255). All the hosts withing this subnet will eb ARPed first and then reply to ping.

Then check show ip arp on your switch for this subnet - you will see all the hosts replied and their mac addresses.

Do show mac address-table address MAC_ADDR from above and you will see to whcih port that is connected. You will have to do it one by one or write some script.

Hope this helps,

Nik

Silver

CDP neighbors

As I know you can only see the mac-address table on switch. Switch is not interested in end node IPs

---

Posted by WebUser Aleksandr Yanovskiy

Silver

CDP neighbors

Nik, have you ever tried to ping broadcast address in LAN? Most modern OS doesn't reply for broadcast ping

---

Posted by WebUser Aleksandr Yanovskiy

CDP neighbors

Vishal,

Download nmap and run that. It'll show you all addresses in use and responding.

nmap -sP 192.168.0.0/24

HTH, John *** Please rate all useful posts ***
287
Views
0
Helpful
5
Replies
CreatePlease login to create content