MAC Address Table
The MAC addres table keeps a record of the switch ports and VLANs to which a network host is associated too.
The switch builds its MAC address table by keeping track of the source MAC addresses of packets that it recieves through its ports. The information that the switch collects from these packets builds a table of MAC addresses to reduce the collision domain and reduce the number of packets that need to be broadcast out of every port with unknown unicast flooding.
The MAC address table can be displayed on a switch with the command show mac address-table
. Some additional keywords can be suffixed onto the end of the command to provide additional functionality:
address mac-address xxxx.yyyy.zzzz
– Displays entries that match the MAC addresse entereddynamic
– Displays entries that were learned by the switch only.vlan X
– Displays all MAC addresses present in the table that are associated with VLAN x
Some older technologies require a static MAC address to be programmed into the switch to prevent unknown unicast flooding.The command mac address-table static xxxx.yyyy.zzzz vlan x interface z
adds a static entry to the MAC address table.
The MAC address table lives in a type of memory classed as content addressable memory or CAM. CAM uses a faster search technology that the traditional RAM found in switches, providing a binary result for any query sent to it. 0 is returned if the search is true, 1 is returned if the search is false.
The CAM can be used with other switch technologies that allow traffic to be analysed and forwarded very quickly. Switches have large content addressable memory to accommmodate for the larger amount of MAC addresses that they need to store for their forwarding tables.
Switch Port Status
The command show interfaces X switchport
can provide all the information for a switch ports status. show interfaces switchport
can also be used to display the same information but for all ports on a switch.
Interface Status
The command show interface status
is another command for viewing the status of switchports in a simplified manner. The following fields are shown in the commands output:
Column | Description |
Port | Displays the interface or port channel number |
Name | Displays the configured interface description if it has one |
Status | Displays connected if a link is established and working, notconnected if a link is not detected and err-disabled if an error has been detected on the port and disabled by the switch. |
VLAN | Displays the VLAN number associated with the port. If the port is a trunk it displays trunk. If the port is configured as a layer 3 interface it displays routed. |
Duplex | Displays the duplex setting of the port, if the duplex was negotiated rather than statically set it prefixes the value with a-. |
Speed | Displays the duplex setting of the port, if the duplex was negotiated rather than statically set it prefixes the value with a-. |
Type | Displays the physical type of port, for example if it is a copper port or a small formfactor pluggable (SFP) port |
Leave a Reply