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
ITCityAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
WissamConnect With a Mentor Senior 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
 
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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
woolnoirCommented:
ugh.
0
 
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
 
ITCityAuthor Commented:
Thank you very much. I got the result that I wanted :)
0
All Courses

From novice to tech pro — start learning today.