Solved

Cisco show mac-address | exclude

Posted on 2010-09-13
6
923 Views
Last Modified: 2012-05-10
Good afternoon,

I want to use the show mac-address commad to list all devices connected to a Cisco switch 3750. However, I want to filter the list by excluding the MAC addresses that have a particular port that I have previously identified (they are access ports)

For example, to exclude all MACs that have port Gi1/0/49 I run the following coomand:

show mac-address dynamic | exclude Gi1/0/49

My question is, how can I filter two ports at the same time?


For example, now I want to remove the MACs from ports Gi1/0/49 and Gi2/0/50. What command do I use to exclude both at the same time? Something like show mac-address dynamic | exclude Gi1/0/49 and Gi2/0/50.

Thanks in advance,

Ana
0
Comment
Question by:ITCity
6 Comments
 
LVL 3

Expert Comment

by:d_willia
ID: 33665097
show mac-address dynamic | exclude Gi1/0/49 | exclude Gi2/0/50

0
 
LVL 20

Expert Comment

by:woolnoir
ID: 33665119
show mac-address dynamic | exclude Gi1/0/49 | exclude Gi2/0/50
0
 
LVL 20

Expert Comment

by:woolnoir
ID: 33665123
ugh.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:ITCity
ID: 33665141
I tried show mac-address dynamic | exclude Gi1/0/49 | exclude Gi2/0/50, and it doesn't work. I still get mac addresses with those ports. Thanks anyway
0
 
LVL 6

Accepted Solution

by:
wpharaon earned 500 total points
ID: 33665160
show mac-address dynamic | exclude Gi1/0/49|Gi2/0/50

add as much as you like (make sure to include | between each without spaces
0
 

Author Closing Comment

by:ITCity
ID: 33665188
Thank you very much. I got the result that I wanted :)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The worst thing when starting a new job is when the previous Network Administrator left behind no documentation. How do you get into the devices? If you've been in this situation or just accidently mistyped your password, this article will hopefully…
This tutorial will go through the steps required to write a script that will back up the configuration settings of a HP-ProCurve switch. You will need to get the following things to follow this tutorial: Telnet Scripting Tool e.g. TST10.exe …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question