03-15-2012 07:22 AM - edited 03-07-2019 05:34 AM
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!!!!!!!!!!!
03-15-2012 07:39 AM
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
03-15-2012 07:39 AM
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
03-15-2012 07:43 AM
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
03-15-2012 09:54 AM
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
03-15-2012 10:13 AM
Vishal,
Download nmap and run that. It'll show you all addresses in use and responding.
nmap -sP 192.168.0.0/24
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: