How to find out what device is on what port
TechStriker
Member Posts: 131
in CCNP
How to find out what device is on what port on your Cisco 2950 switches.
I did show mac address table command it show vlan number, mac address, type and ports, but all ports are the gigabit link ports.
Is there CLI command which returns given a mac which port the device is connected, any help is greatly appreciated.
Thanks
I did show mac address table command it show vlan number, mac address, type and ports, but all ports are the gigabit link ports.
Is there CLI command which returns given a mac which port the device is connected, any help is greatly appreciated.
Thanks
Passed SNIA - SCSP
Working on VCP4
Working on VCP4
Comments
-
Sanis4life Banned Posts: 60 ■■□□□□□□□□sh mac- | i FastEthernetx/x, or if you want to search by mac use sh mac- | i XXXX ( last 4 of MAC).
Hope that helps -
TechStriker Member Posts: 131Thanks Sanis4life for your quick response
check this
sw20-2950-#sh mac- | i 0000
vlan no 10 mac 0000.0000.0000 DYNAMIC Gi0/2
it only shows me the Gi port (Gigabitport port) for all devices connected to the switch I know this the link port but i need the switch port ie fa/10 or some thing along this lines.
do you know what the issue could bePassed SNIA - SCSP
Working on VCP4 -
networker050184 Mod Posts: 11,962 ModIf its showing the MAC on an up link its probably on another switch.An expert is a man who has made all the mistakes which can be made.
-
Sanis4life Banned Posts: 60 ■■□□□□□□□□networker050184 wrote:If its showing the MAC on an up link its probably on another switch.
Yes, which means you need to go to that switch and run the sh mac command from there. -
APA Member Posts: 959if it is showing you the uplink that is a pointer...... follow the uplinks to each switch until you find the actual switch port the Host is on...
If the MAC is tied to an uplink it means that switch has the learnt that the host is accessible via the uplink which is connected to another switch
CCNA | CCNA:Security | CCNP | CCIP
JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
JNCIS:SP | JNCIP:SP -
Stovokor Member Posts: 20 ■□□□□□□□□□Agreed...I had to use this to find a printer that was connected to the wrong vlan. I had to go through 3 switches that were co-located. The Unix like nature of the CLI is great.
-
APA Member Posts: 959If the switch management address is on the same vlan as the users....(Not good design but most networks have this) .... Use 'show ip arp | inc (ip address of host)'
Then use the mac that is output from this command and do 'show mac address-table | inc (MAC)'
Also if you have a L3 switch just run 'traceroute mac ip (source) (dest)' and this will run a L2 traceroute from port to port....
CCNA | CCNA:Security | CCNP | CCIP
JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
JNCIS:SP | JNCIP:SP -
redwarrior Member Posts: 285If you end up doing this a lot (I do because we have NAC...I have to track down a device via MAC at least 3 times a week), I find Solarwinds's Switchport Mapper in their Engineer's toolkit a good tool to use. Yes, that probably decreases my Cisco geek score, but it does speed up my workflow.
CCNP Progress
ONT, ISCW, BCMSN - DONE
BSCI - In Progress
http://www.redwarriornet.com/ <--My Cisco Blog -
darkuser Member Posts: 620 ■■■□□□□□□□depends whether you know the mac or ip address
i use a combination of arp and
sh mac-address-table address xxxx.xxxx.xxxxrm -rf / -
TechStriker Member Posts: 131Thanks guys for all your input, is three free open source tool which will help me manage this. I have been given mini project to create database of list of all devices on the network and it is associated switch port. We need to keep track which device is connected on what port. We have around 90 cisco 2950 and 2 L3 switch and almost 850 host on the network.
ThanksPassed SNIA - SCSP
Working on VCP4 -
flares2 Member Posts: 79 ■■□□□□□□□□Show CDP interface does not give MAC addresses associated to the ports, only things like line protocol up/down, encapsulation, holdtime, etc.
In terms of neighboring switches it will only show the neighboring devices, not what is on each of their ports. Plus because, TechStriker stated he is using L2 switches, there are no IPs associated to the ports.Techexams.net - Job security for one more day. -
billyr Member Posts: 186Yes your right. I'll read the whole question next time. I thought he was after just the directly connected devices.
-
darkuser Member Posts: 620 ■■■□□□□□□□that will only show you devices that speak cdp multicastrm -rf /
-
astorrs Member Posts: 3,139 ■■■■■■□□□□How about a pretty Visio diagram? LANSurveyor Express is free until the end of the month:
http://www.solarwinds.com/register/index.aspx?Program=583&c=70150000000DWUM&CMP=LEC-Visio-Toolbox-HP-LSE-DL
To create a switch report you would need the full version, but the free one will create a pretty network map for you. It's not what your describing but may meet your needs (not sure how flexible the requirements are). -
TechStriker Member Posts: 131Solarwinds's Engineer's toolkit seems a good tool to use I will play around with this and see what it can do for me, thanks for all your help in this matter
Regards,Passed SNIA - SCSP
Working on VCP4 -
APA Member Posts: 959Yeah Solarwinds NET is awesome kit to have
If you really want to be a smart arse configure DHCP snooping -> then run show ip dhcp snooping binding...
This output gives you MAC, IP, Inteface connected and associated other values....... Plus it's a necessity for DAI and Source-Guard
CCNA | CCNA:Security | CCNP | CCIP
JNCIA:JUNOS | JNCIA:EX | JNCIS:ENT | JNCIS:SEC
JNCIS:SP | JNCIP:SP -
redwarrior Member Posts: 285APA - this dhcp snooping sounds neat...would I run the show command from the switch the device is connected to, the route point for the network/Vlan, or the device handing out dhcp? This sounds like it could be handy for a number of uses.
Thanks!
CCNP Progress
ONT, ISCW, BCMSN - DONE
BSCI - In Progress
http://www.redwarriornet.com/ <--My Cisco Blog