Address Learning

When a switch is powered on, the MAC filtering table is empty. When a

device transmits and an interface receives a frame, the switch places the
source address in the MAC filtering table, remembering what interface the
device is located on.

The switch has no choice but to flood the network with this frame because it has no idea where the destination device is located.

If a device answers and sends a frame back, then the switch will take the
source address from that frame and place the MAC address in the database,
associating this address with the interface that received the frame. 

Since the switch now has two MAC addresses in the filtering table, the devices can make a point-to-point connection, and the frames will only be forwarded between the two devices. This is what makes layer-2 switches better than hubs. 

In a hub network, all frames are forwarded out all ports every time.
Diagram above shows the procedures for how a MAC database is built.

Host 1 sends a frame to Host 3. Host 1’s MAC address is
0000.8c01.1111; Host 3’s MAC address is 0000.8c01.2222.

2. The switch receives the frame on the E0/1 interface (interface addressing
is covered in Appendix B) and places the source address in the
MAC address table.

3. Since the destination address is not in the MAC database, the frame is
forwarded out all interfaces.

4. Host 3 receives the frame and responds to Host 1. The switch receives
this frame on interface E0/3 and places the source hardware address inHost 1 and Host 3 can now make a point-to-point connection and only the two devices will receive the frames. Hosts 2 and 4 will not see the frames.

If the two devices do not communicate to the switch again within a certain
amount of time, the switch will flush the entries from the database to keep
it as current as possible.

Leave a Reply

Your email address will not be published. Required fields are marked *