How does a switch populate a cam table

The cam table of a switch contains the mac-address to the port number mapping. It is built dynamically. In the above diagram, PC1 and PC2 are connected to E0 and E1 ports on the switch. When data is generated from PC1 to PC2, an ethernet frame is created which would contain the source mac-address as that of PC1 and destination mac-address of PC2. When the frame reaches the E0 interface, the switch adds the source mac-address to the cam table of the switch. Since, there are no other entries in the cam table, the switch is unaware of the location of the destination mac-address, which is PC2. The switch, floods the frame out to all ports. Flooding is a technique by which the copy of the frame is sent out to all ports. Once the frame reaches E1 and PC2 responds, the switch adds the source mac-address which is contained in the ethernet frame and adds the information in the cam table. So, 2 entries would be available in the cam table, which was initially empty.

—————————————————————————————————————————————-

The above content is a sample preview from the Ebook

Routing & Switching

 

Routing & Switching Fundamentals

Price $5.99