5.4 Troubleshooting Tools
show mac-address-table
šCompTIA Network+ (N10-009)
Breaking it down: Key Terms
- MAC Address (Media Access Control Address):
- A unique identifier for every device on a network (like a network āfingerprintā).
- Format:
00:1A:2B:3C:4D:5E
- Port:
- A physical connection on the switch where a device (like a computer, printer, or another switch) plugs in.
- VLAN (Virtual LAN):
- Switches often separate traffic into VLANs. Each MAC address entry belongs to a VLAN.
- Dynamic vs. Static MAC Addresses:
- Dynamic: Learned automatically by the switch when a device sends traffic.
- Static: Manually configured by an admin (rarely used).
Why is it important?
The show mac-address-table command is very useful for:
- Troubleshooting connectivity issues
- If a device cannot communicate, you can check if the switch āknowsā about it.
- Identifying devices on the network
- See which MAC addresses are connected to which ports.
- Security monitoring
- Detect unknown devices that may be connected to your network.
- Network management
- Helps in planning and mapping the network layout.
Typical Output of the Command
When you run:
Switch> show mac-address-table
You might see something like this:
| VLAN | MAC Address | Type | Port |
|---|---|---|---|
| 10 | 00:1A:2B:3C:4D:5E | Dynamic | Fa0/1 |
| 10 | 00:1B:2C:3D:4E:6F | Dynamic | Fa0/2 |
| 20 | 00:1C:2D:3E:4F:7A | Static | Fa0/3 |
- VLAN: The VLAN the device belongs to.
- MAC Address: Device identifier.
- Type: Dynamic (learned automatically) or Static (configured manually).
- Port: Physical port on the switch where the device is connected.
Common Variations
- Show MAC addresses for a specific VLAN:
show mac-address-table vlan 10
- Only shows devices in VLAN 10.
- Show MAC addresses for a specific port:
show mac-address-table interface Fa0/1
- Shows only the MAC addresses learned on that port.
- Filtering by dynamic or static:
- Some switches allow filters like:
show mac-address-table dynamic
show mac-address-table static
- Useful to focus only on automatically learned devices or manually configured ones.
Exam Tip
For the Network+ exam, remember:
show mac-address-table= āWhich devices are connected to my switch ports?ā- Dynamic MACs are learned automatically.
- Static MACs are manually configured by administrators.
- You can filter by VLAN or port.
- Used mainly for troubleshooting and mapping devices in a network.
Example Scenario in an IT Environment
- You are the network admin for a company.
- Users report that a printer on port Fa0/5 is not working.
- You run
show mac-address-table interface Fa0/5and see no MAC addresses. - This tells you the switch is not seeing the printer, so you check the cable, power, or VLAN configuration.
- Another example: You see a MAC address you donāt recognize on a sensitive VLAN. This could be a device that shouldnāt be on your network, so you investigate.
ā Key Points to Remember for the Exam
- Command:
show mac-address-table - Purpose: Displays MAC addresses learned by a switch and their associated ports.
- Filters: VLAN, interface, dynamic/static
- Usage: Troubleshooting connectivity, identifying devices, security checks, and network management
