Switches use MAC addresses to direct network communications through their switch fabric to the appropriate port toward the destination node. The switch fabric is the integrated circuits and the accompanying machine programming that allows the data paths through the switch to be controlled. For a switch to know which port to use to transmit a unicast frame, it must first learn which nodes exist on each of its ports. Show
A switch determines how to handle incoming data frames by using its MAC address table. A switch builds its MAC address table by recording the MAC addresses of the nodes connected to each of its ports. Once a MAC address for a specific node on a specific port is recorded in the address table, the switch then knows to send traffic destined for that specific node out the port mapped to that node for subsequent transmissions. When an incoming data frame is received by a switch and the destination MAC address is not in the table, the switch forwards the frame out all ports, except for the port on which it was received. When the destination node responds, the switch records the node's MAC address in the address table from the frame's source address field. In networks with multiple interconnected switches, the MAC address tables record multiple MAC addresses for the ports connecting the switches which reflect the node's beyond. Typically, switch ports used to interconnect two switches have multiple MAC addresses recorded in the MAC address table. To see how this works, view each of the steps in Figures 1-6. The following describes this process: Step 1. The switch receives a broadcast frame from PC1 on Port 1. Step 2. The switch enters the source MAC address and the switch port that received the frame into the address table. Step 3. Because the destination address is a broadcast, the switch floods the frame to all ports, except the port on which it received the frame. Step 4. The destination device replies to the broadcast with a unicast frame addressed to PC1. Step 5. The switch enters the source MAC address of PC2 and the port number of the switch port that received the frame into the address table. The destination address of the frame and its associated port is found in the MAC address table. Step 6. The switch can now forward frames between source and destination devices without flooding, because it has entries in the address table that identify the associated ports. Note: The MAC address table is sometimes referred to as a content addressable memory (CAM) table. While the term CAM table is fairly common, for the purposes of this course, we will refer to it as a MAC address table. Accessing MAC address views and searchesSyntax
Listing all learned MAC addresses on the switch, with the port number on which each MAC address was learned HP Switch# show mac-address Listing all learned MAC addresses on one or more ports, with their corresponding port numbers For example, to list the learned MAC address on ports A1 through A4 and port A6: HP Switch# show mac-address a1-a4,a6 Listing all learned MAC addresses on a VLAN, with their port numbers This command lists the MAC addresses associated with the ports for a given VLAN. For example: HP Switch# show mac-address vlan 100
Finding the port on which the switch learned a specific MAC address For example, to find the port on which the switch learns a MAC address of 080009-21ae84: Accessing MAC address views and searches (Menu)Viewing and searching per-VLAN MAC-addressesThis feature lets you determine which switch port on a selected VLAN is being used to communicate with a specific device on the network. From the Main Menu, select:
Finding the port connection for a specific device on a VLANThis feature uses a device's MAC address that you enter to identify the port used by that device.
Viewing and searching port-level MAC addressesThis feature displays and searches for MAC addresses on the specified port instead of for all ports on the switch.
Determining whether a specific device is connected to the selected portProceeding from step 2, above:
What happens if a destination MAC address is not in the MAC address table?Find the Destination MAC Address
If the destination MAC address is not in the table, the switch forwards the frame out all ports except the incoming port. This is called an unknown unicast.
What happens when a switch doesn't know the MAC address?If the switch does not find the destination MAC address in its MAC address table in the VLAN to which the Frame belongs, it will "flood" the frame (i.e. it will forward the frame to each forwarding port in that VLAN except the port from which the frame was received).
What happens if a switch receives a frame for a MAC not in the table?If the destination MAC address is not in the table, the switch will forward the frame out all ports except the incoming port. This is known as an unknown unicast. If the destination MAC address is a broadcast or a multicast, the frame is also flooded out all ports except the incoming port.
What if a MAC address is unknown?Log into your router, change your Wifi password, reboot your router, and see if the MAC addresses are visible on the network. You may have had rogue devices on your network. To prevent this: Factory reset your router.
|