Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 939
  • Last Modified:

Cisco show mac-address | exclude

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
ITCity
Asked:
ITCity
1 Solution
 
d_williaCommented:
show mac-address dynamic | exclude Gi1/0/49 | exclude Gi2/0/50

0
 
woolnoirCommented:
show mac-address dynamic | exclude Gi1/0/49 | exclude Gi2/0/50
0
 
woolnoirCommented:
ugh.
0
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

 
ITCityAuthor Commented:
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
 
WissamSenior Network EngineerCommented:
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
 
ITCityAuthor Commented:
Thank you very much. I got the result that I wanted :)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now