01-23-2012 09:47 PM - edited 03-07-2019 04:30 AM
hi guys,
In my comp we are having around 700 Workstations... in case of any virus issue or network slow issue we need to shutdown the particular workstation..and we need to shut down his vlan port..
In case if i had only Host name and IP address of that work station, Is there is any way to find in which switch its connected and in which port its connected.
Thanks in advance..
Regards,
Naveen...
Solved! Go to Solution.
01-23-2012 10:29 PM
Hello,
On the L3 switch you can do "show ip arp IP_ADDR" puting host ip address for IP_ADDR. It will give you host MAC address. Then with "show mac-addr addr MAC_ADDR" or equivalent command based on platform you can see on which port this MAC was learnt. Further you'll need to go to device connected to that port and do same show mac command to trace it further until you come to an access port where this host is connected.
The other way - if your host gets ip from DHCP -you can check the DHCP lease statistics to see if that learnt the host MAC and trace it same way.
Nik
01-24-2012 12:12 AM
Hi Naveen,
if CDP enabled in your network then, you can try below command to Identify machines connected to switches,
#traceroute mac xxxx.xxxx.xxxx xxxx.xxxx.xxxx (the x is the end user PC mac)
the abouve command will give the o/p as below
#traceroute mac 0000.0000.0000 0000.0000.0000
Source 0000.0000.0000 found on switch5
1 switch5 (10.11.12.5) : Gi0/43 => Gi0/43
Destination 0000.0000.0000 found on switch5
Layer 2 trace completed
Regards,
KodandaRao - Please rate helpful posts
01-23-2012 10:29 PM
Hello,
On the L3 switch you can do "show ip arp IP_ADDR" puting host ip address for IP_ADDR. It will give you host MAC address. Then with "show mac-addr addr MAC_ADDR" or equivalent command based on platform you can see on which port this MAC was learnt. Further you'll need to go to device connected to that port and do same show mac command to trace it further until you come to an access port where this host is connected.
The other way - if your host gets ip from DHCP -you can check the DHCP lease statistics to see if that learnt the host MAC and trace it same way.
Nik
01-24-2012 12:12 AM
Hi Naveen,
if CDP enabled in your network then, you can try below command to Identify machines connected to switches,
#traceroute mac xxxx.xxxx.xxxx xxxx.xxxx.xxxx (the x is the end user PC mac)
the abouve command will give the o/p as below
#traceroute mac 0000.0000.0000 0000.0000.0000
Source 0000.0000.0000 found on switch5
1 switch5 (10.11.12.5) : Gi0/43 => Gi0/43
Destination 0000.0000.0000 found on switch5
Layer 2 trace completed
Regards,
KodandaRao - Please rate helpful posts
01-24-2012 07:52 AM
hi nikolay & Kodandarao,
Really thanks for your both reply...Both of your reply solved my query..
Regards,
Naveen..
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide