Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List all devices connected to switches 1

Status
Not open for further replies.

montrealguyhere

IS-IT--Management
Oct 19, 2004
41
0
0
US
I have been given a interesting task and would like some advice.

We have over 20 switches, from 4506, to 2950s, I need to track all the devices on each port...( one person, unable to follow the wire, bad install in buildings poor labeling in install years ago)

sho cdp neig works to show my devices running cdp, but i need to show all my devices, printers, computers etc on each port...

Is there an aplication that can connect to my switches to show all the macs that are on each port? from there I will have to translate this to IP to see what the device is..
how would you cisco people go about and do this task...

( please no smart remarks like, Hire some people to do it)


Montrealguyhere.





John - Up in Montreal

It's about who??????
Then make it about us....
 
It kind of depends on the topology. You can get the MAC addresses of the devices attached/reachable on each switch port with the command 'show mac address-table command'
Code:
cat-3560#sho mac address-table interface gigabitEthernet 0/1
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  15    00aa.bbbb.cccc    STATIC      Gi0/1
Total Mac Addresses for this criterion: 1
You then need to tie this with the layer-3 address by checking the ARP entry on the device performing the layer-3 routing. In my topology the layer-2 and layer-3 are boing performed by the same switch, however this may be different in your topology.
Code:
cat-3560#show ip arp | inc cccc
Internet  192.168.111.21         36   00aa.bbbb.cccc  ARPA   Vlan10
cat-3560#

HTH
Andy
 
no problem here is my output,, ( below)
I use this command but I am looking for a simple command that will list ALL at one time instead of sho mac-address-table for each port... i have 130 ports on my chassis and I have 6 chassis and many more switches...

so... is there a command that tells me all the ports with the macs associoated to each port or do I have to do each port manually?



backbone-sw1>sho mac-address-table interface fasteth3/1
Unicast Entries
vlan mac address type protocols port
-------+---------------+--------+---------------------+--------------------
224 0023.ae9a.2d5d dynamic ip FastEthernet3/1
226 0012.019b.42da dynamic ip FastEthernet3/1


Montrealguyhere

John - Up in Montreal

 
do a google search for cammer.pl. The guy that wrote MRTG put together a perl script to tie the mac address from a switch port to the ip address from the arp table. Will need to have SNMP access to both, but it works very well.
 
I use "switchport mapper" from Solarwinds.
Whenever I'm replacing a data centre switch or doing an IP migration on an edge switch, I need a switchport map so I can ensure every device is identified and tested post-change.
 
Guys I assume I'm missing something here but why wouldnt you just use "show mac-address-table" without the interface parameter? This shows all MAC addresses across all interfaces in the MAC table?
 
Doesn't show you what IP maps to each MAC address though, which is where a good tool comes in handy.
 
It doesnt, but that would be a good way to answer the original question.

TCL scripting on the IOS itself would be able to create a command that lists port/MAC/IP address...I've seen some example scripts kicking about.
 
The original question included "...from there I will have to translate this to IP to see what the device is....".
Hence my answer, which addressed the question.

A proper tool matches each MAC entry in the edge switch to an ARP entry in the router and then queries DNS to resolve the IP to a name. Highly recommended.


 
If DHCP snooping is configured on your network, and clients use adresses assigned by DHCP.

2950 switches:
show ip dhcp snooping bindings
Option 82 on untrusted port is not allowed
MacAddress IpAddress Lease(sec) Type VLAN Interface
------------------ --------------- ---------- ------- ---- --------------------
00:11:0A:95:0F:DD 10.109.49.146 2039 dynamic 117 FastEthernet0/10
00:04:75:D1:A2:F7 10.109.48.179 2664 dynamic 117 FastEthernet0/11
00:10:A7:20:EB:3C 10.109.48.161 3412 dynamic 117 FastEthernet0/14

2960 switches : Use show ip source bindings

Best regards,

Oyvind
 
Not bad. In the absence of anything better, that would give you a huge leg-up, leaving you just all the statically-assigned addresses to track down.

Another argument for the benefits of centralised management by having *all* network devices use DHCP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top