Find switchport for device on your network (cisco)

If you have a cisco network and not using software tools who logs status for your switchports you can still find where your device is connected without physically going to the location checking patching.

You will need a source and a destination mac address.

  • Source mac address
    • The source mac address isn’t that important, just do a sh mac address table vlan 5. Find a random mac address on the same vlan as the device you are looking for.
  • Destination mac address
    • I usually find this by checking the dhcp server or asking the user for the information. It might be printed on a label on the device or if it’s a windows computer you find it with ipconfig /all under Physical Address.

When you got source and destination mac address you can run the command: traceroute mac {source mac} {destination mac}. The output will tell you something about where both source and destination mac is connected and the path between them. Example:

Traceroute mac aaaa.bbbb.cccc dddd.eeee.ffff
Source aaaa.bbbb.cccc found on switch10
1 switch10 (172.32.0.10) : Fa0/40 => Gi0/1
2 switch13 (172.32.0.13) : Gi0/2 => Gi0/1
3 switch19 (172.32.0.19) : Gi0/2 => Gi0/1
4 switch31 (172.32.0.31) : Gi0/2 => Fa0/38
Destination dddd.eeee.ffff found on switch31
Layer 2 trace completed

If you need more details, you can add detail after the command.

TSM cheatsheet

Clean up volumes, moving data first

  1. Set volume readonly: upd vol /tsmdata/stg1/filepool/01301.dsm acc=reado
  2. Move data from the volume: move data /tsmdata/stg1/filepool/01301.dsm w=y
  3. Delete the volume: del vol /tsmdata/stg1/filepool/01301.dsm
  4. Delete the volume from the underlying file system (linux example here): rm -f /tsmdata/stg1/filepool/01301.dsm

All this could be scripted if multiple volumes should be cleaned up to free space on underlying file system.

Backup database

ba db t=f dev={deviceclass} (example: file_dbb)