====== Basic Switch Logic ====== The primary role of a switch is to get **//frames//** from point **A** to **B** on a **LAN**. It does this by examining Source and Destination MAC addresses. Not unlike a router which instead uses IP addresses. **EXPAND ON THE FOLLOWING:** ---- === SWITCH FUNCTIONS === * Forward or Filter frames based on ''//MAC address//'' * Learn and fill MAC / CAM table based on ''//incoming//'' MAC address * Prevent Layer 2 loops with STP === SWITCH FORWARDING LOGIC === * Switch receives / examines frame * Is the frame's ''//source//'' MAC in the table? * NO: Add source MAC to table with associated port # * Is the frame's ''//destination//'' MAC in the table? * NO: Flood frame out all ports in same VLAN except the port it originated from. * YES: Forward frame out appropriate port. * If destination MAC is unknown | ''//broadcast//'' | ''//multicast//'' * Flood frame out all ports in the same //VLAN// except the port it originated from. == FILTERING == AKA, not sending the packet out X interface. Port Security is a good example of this.