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?

Improve company productivity with a Business Account.Sign Up

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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.