Question
-
CreatorTopic
-
June 23, 2007 at 9:44 pm #2271570
Find IP of device attached to a CISCO switch
Lockedby jsoutter · about 17 years, 9 months ago
Is there a way to find what IP is associate with a specific interface on a CISCO switch using CLI?
I know I can do a “show arp” and that will give me the IP’s in the arp table but how to I associate that with the interface that it is attached to?
Topic is locked -
CreatorTopic
All Answers
-
AuthorReplies
-
-
June 23, 2007 at 9:44 pm #2587907
Clarifications
by jsoutter · about 17 years, 9 months ago
In reply to Find IP of device attached to a CISCO switch
Clarifications
-
June 23, 2007 at 10:57 pm #2587895
use this command
by cg it · about 17 years, 9 months ago
In reply to Find IP of device attached to a CISCO switch
RARP
which will query the devices and return an IP address.
-
June 25, 2007 at 1:15 am #2586964
Try this one
by sebastian zdrojewski · about 17 years, 9 months ago
In reply to Find IP of device attached to a CISCO switch
Assuming the device you are trying to resolve is on the same VLAN as the management IP address (I assume the default: VLAN 1 and IP address of your device is 172.16.32.164) you can try doing this (from the Cisco Catalyst):
#ping 172.16.32.164
#show arp! Get the MAC Address of the device you are looking for
#show mac-address-table
The output should be something like this
4 0030.4842.f5a2 DYNAMIC Fa0/6
As you can see the device will be listed together with the port it results being connected to.
If you have pinged the device from the network, not necessarily from the Cisco Switch the MAC address of the device should already be saved in the MAC address table of all switches, so the ping command won’t be necessary.
-
June 25, 2007 at 7:17 am #2590212
Almost there
by jsoutter · about 17 years, 9 months ago
In reply to Try this one
Thanks for your quick reply.
I had already tried the “show arp” command however I get “VLAN1” as being the interface.
What I need to do is associate an IP Address with the exact interface #.
Example if someone comes to me and says 10.100.0.32 is port scanning can you please cut them off at the switch. I will need to know the exact interface to shutdown (there are other reasons why I would need to know the interface # this is just an example).
Any help is GREATLY appreciated – Long Live the TechRepublic!
-
June 25, 2007 at 8:13 am #2590167
Switch
by sebastian zdrojewski · about 17 years, 9 months ago
In reply to Almost there
Since the switch is working at Layer 2 of the OSI model, you cannot associate an IP address on a port, but only a MAC address and the port it is connected. Also, from a security point of view, a portscan action can be done using a spoofed IP address, so the information given is unreliable.
I would suggest you to do a map of the layer 2 of your network using some simple tool (nmap with -sP option to do a ping sweep of the entire subnet) and gathering the whole information in an Excel file (or equivalent). Once someone asks you to disable a device, you can match the IP address with its MAC address and disable the port you need.
Also you can prevent users from “sniffing” the network by using the “protected port” feature given by Cisco Catalysts. Using the “mac-address sticky” option you will reduce efforts for managing mac address table on each port, while “mac-address maximum 2” will grant that no more than 2 MAC addresses can be applied on that port. Once a device starts an ARP Poisoning process or sniffing (actively) the port will shutdown (or other chosen action policy).
Hope this helps :))
En3pY
-
October 7, 2009 at 12:28 pm #2824524
What type of switch?
by kevaburg · about 15 years, 6 months ago
In reply to Almost there
VLAN 1 is reserved for admin so someone knows how to get on there which is a little unsettling.
Is this a layer-2 or layer-3 switch? Associating an IP address with MAC on a Layer-2 device isn’t possible is it? You could try associating the MAC address with the same on the VLAN router. If you are using VLANs then a router of some description will also be installed.
-
October 5, 2010 at 7:06 am #2864048
try this
by jpcorzo · about 14 years, 6 months ago
In reply to Almost there
if you need to narrow your search for an ip try :
show arp | i #.#.#.#
it will tell you the mac address associated with this IP.
then you can run the show mac-address-table address A.B.C.D to get the exact port.
hope it helps
-
October 5, 2010 at 9:14 am #2864022
-
-
-
August 14, 2007 at 5:53 am #2618934
I do it in such way…
by bar · about 17 years, 7 months ago
In reply to Find IP of device attached to a CISCO switch
with L3 switches.
Run CLI command “show mac address-table”, you will get list with Vlan ID, mac address and port info.
Find your port in the list and take mac address which associates with this port. Then run “show arp” command and find the record with mentioned above mac address. You have ip you looking for.
for example:
show mac address-table | include GigabitEthernet2/28you have output:
10 0002.a534.8ff5 dynamic ip GigabitEthernet2/28sh arp | include 0002.a534.8ff5
result:
Internet 10.1.185.251 0 0002.a534.8ff5 ARPA Vlan10Hope it help you
-
January 30, 2009 at 1:59 am #2753965
You can also use…
by mgorbachev · about 16 years, 2 months ago
In reply to I do it in such way…
trace mac ip…
Ping an IP in the same vlan and ping the ip you are after…
Then use the random IP as the source and your taget IP as the target.
-
-
February 20, 2013 at 6:33 am #2427658
Find IP from MAC address Check OUT
by bhautik123 · about 12 years, 1 month ago
In reply to Find IP of device attached to a CISCO switch
If you have Mac Address than , login to your cisco l3 switch which is connected to L2 Switch ,
In Cisco L3 Switch Type # sh ip dhcp binding assigned . here u need to find exact mac address which is might be start with 01 or 11 . thats it , there only u will find ip address which is associated to relevent Mac address.othere than u can also enable cdp discovery in switch and type #sh cdp nei details
-
February 20, 2013 at 7:58 am #2427649
Reponse To Answer
by Wizard57M-TR · about 12 years, 1 month ago
In reply to Find IP from MAC address Check OUT
Sheesh…did you even look at the date this question was asked?
June 25 2007—-almost 6 years! I wonder if the original poster is
still looking for an answer? Probably not, since it was answered
ABOVE in detail.
-
-
-
AuthorReplies