How can I see the mac address connected directly to switch port

Hi to all!

My question is this:
How can I see what MAC address is connected to a port on CRS226-24G-25+RM as a switch with no bridge and no routing functionality
(e.g.: on port ether8 is directly connected a workstation with some MAC address. The master-port for ether8 is port ether2.)?

After running Tools>IP Scan I can see IP addresses and MAC addresses and immediately in IP>ARP I see IP addresses, MAC addresses and interface ether2 but
no other ethernet ports even if the workstations are connected to the other ports.

Thank you.

Look at switch - FDBs

Torch can also be your friend here…

@docmarius: from what I see, Torch can’t tell me on what switch port is connected a particular MAC address.
@arnoldmikro: I did, but didn’t help me too much.
Thank you for your answers.

Hi!

The following script is used to associate IP address of directly connected stations to physical port of the switch.
Warning: Running this script will make the CPU go to 100% for about 30-40 seconds, so please run the script when needed or by using scheduler.

##Script to associate IP address of directly connected stations to physical port of the switch#
##Tested with RouterOS v6.38.1 on CRS226-24G-2S+(mipsbe)##
##Authors: Xantos and tandrot8.

## Based on:##
## Script for Dynamic/Static arp ##
## Tested with RouterOS v6.37rc27 ##
## from BrasDeutscher,Para,Brazil ##
##!!!!Steps:##
## 1. Run: /tool ip-scan duration=10 ##or time value as needed ##
## 2. Run: /ip arp print ##to confirm dynamic values in table ##
## 3. Run script from above:
##

{

## Set here yes for dynamic or no for static arp's ##
:global state yes

## defined variables
:global int
:global ip
:global mac
:global port
:global macs

## ether2 in this case is switch master port##

:foreach b in=[/interface ethernet switch unicast-fdb find where dynamic=$state  and  port!="ether2"] do={
:set port [/interface ethernet switch unicast-fdb get $b port ];
:set macs [/interface ethernet switch unicast-fdb get $b mac-address ];
    {
    :foreach a in=[/ip arp find where dynamic=$state and mac-address!=00:00:00:00:00:00 ] do={
        :set mac [/ip arp get $a mac-address ];
        :if ( $mac = $macs) do={    
            :set int [/ip arp get $a interface ];
            :set ip [/ip arp get $a address ];
            :log warning ("IP - $ip  with Mac - $mac on Ethernet Port - $port")
            }
        }
    }
    }
:log warning ("End of script")
}

Hope this script will help!