ARP/Mac address table
Solution 1:
MAC Table (Layer 2)
The MAC table is used by the switch to map MAC Addresses to a specific interface on the switch. These usually expire every 5 minutes or so, and are updated by reading the source address of the frame entering the interface. Your switch should have a MAC/CAM Table as a layer 2 device.
ARP Table (Layer 3)
The ARP table is used to map MAC Addresses to IP addresses. If no ARP entry exists, an ARP broadcast is sent out, and the table is updated with the response. These usually expire after 2-4 hours. Each host connected to the network should maintain its own ARP Table.
Solution 2:
I had the same question in the past. Let me tell what I have understand with a simple example.
Mac Table: This table maps for particular mac address which port the data should be send through.
For example let's consider there is one entry in mac address table as follows.
show mac-address-table
0021.d837.a6fc Dynamic 1 FastEthernet3
The above information says if the destination mac address is '0021.d837.a6fc' send through the port FastEthernet3. This is the sole purpose of mac address table. For which mac address which port to forward data through. This happens in layer 2 which is a switch.
Arp Table: This table has mapping of ip address to mac address.
Again a simple example, let's say you want to send some data to 192.168.1.1. We don't know the mac address of "192.168.1.1" yet. ARP protocol helps in the discovering the mac address by sending broadcast message. Once we have learned the mac address of the host we save that in arp table.
show arp
Internet 192.168.1.1 3 0021.d837.a6fc
Now that we know the mac address of the destination host we pass this information to layer 2, which does the forwarding to particular port based on the mac address.
Hope this helps someone.