Link to home
Start Free TrialLog in
Avatar of ITCity
ITCity

asked on

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
Avatar of Doug Williams
Doug Williams
Flag of United States of America image

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

Avatar of Adrian Cantrill
show mac-address dynamic | exclude Gi1/0/49 | exclude Gi2/0/50
Avatar of ITCity
ITCity

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Wissam
Wissam
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ITCity

ASKER

Thank you very much. I got the result that I wanted :)