cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1298
Views
2
Helpful
10
Replies

Is There Any Way To Show The MACs Of Only Directly Connected Devices?

bpam
Level 1
Level 1

Good Day,

I have a Catalyst switch with a WAP connected to one port, when I perform a "sh mac address-table" I receive a bunch of MAC addresses of the devices connected to the WAP. Is there any way to only get information for devices physically connected to to an access port?

Thank you in advance

2 Accepted Solutions

Accepted Solutions

bpam
Level 1
Level 1

Thanks for all of the input, I believe I have come up a workable solution.

First off to clarify. What I want is a list of devices that are physically connected to the switch and nothing else. My issue with the MAC addresses shown on the WAP ports is that they are non-existent so confirming the validity is futile.

My solution is to work with the output provided. I've appended a basic regex to my sh mac address-table command which will include only VLANs I want (in this case I want to exclude the WAP VLAN) and make sure the MAC is associate with a physical port.

sh mac address-table | include (.*120|121|162|163)(.*Gi)

This does the trick and I am now pulling the MAC addresses of devices directly connected to a switch port.

 

View solution in original post

That's fine!

Basically, the "inverse" of my "Doesn't MAC table show associated port?  If so, exclude port connected to AP.", but perhaps I should have further clarified what I had in mind for how to exclude (i.e. using sh mac address-table | exclude <reg-ex for WAP port>).  If what I had in mind, can be used, in theory, it might be easier to maintain.

Your approach, though, offers the advantage of NOT including extraneous data, like the table's headers, etc.

View solution in original post

10 Replies 10

Show cdp can help you I think

Leo Laohoo
Hall of Fame
Hall of Fame
sh mac address interface <PORT>

bpam
Level 1
Level 1

Thank for the quick response. Running sh cdp neighbors I only see the MAC address of the core switch connected to it but I see no other endpoints.

sh mac address interface <PORT> shows all MAC addresses connected to the WAP (as well as the WAPs MAC). These addresses appear to be fake and I'm trying to figure out the best way to validate connected devices are authorized.

Use any l2 auth' otherwise you dont know which mac for which wireless client 

Uhhhhh ... Wut? 

You want to see the MAC addresses from a port connected to a Cisco AP?  Not going to happen.  The only MAC address will be of the AP.  Everything from that port is encapsulated inside a CAPWAP tunnel.

if he use local switching then the mac of wifi host will appear in mac address table 

True for LWAP, not true for a non-LWAP AP.  (I know, I know, who still use such.)

If a LWAP, you're correct, you wouldn't see the wireless host MACs.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Doesn't MAC table show associated port?  If so, exclude port connected to AP.

bpam
Level 1
Level 1

Thanks for all of the input, I believe I have come up a workable solution.

First off to clarify. What I want is a list of devices that are physically connected to the switch and nothing else. My issue with the MAC addresses shown on the WAP ports is that they are non-existent so confirming the validity is futile.

My solution is to work with the output provided. I've appended a basic regex to my sh mac address-table command which will include only VLANs I want (in this case I want to exclude the WAP VLAN) and make sure the MAC is associate with a physical port.

sh mac address-table | include (.*120|121|162|163)(.*Gi)

This does the trick and I am now pulling the MAC addresses of devices directly connected to a switch port.

 

That's fine!

Basically, the "inverse" of my "Doesn't MAC table show associated port?  If so, exclude port connected to AP.", but perhaps I should have further clarified what I had in mind for how to exclude (i.e. using sh mac address-table | exclude <reg-ex for WAP port>).  If what I had in mind, can be used, in theory, it might be easier to maintain.

Your approach, though, offers the advantage of NOT including extraneous data, like the table's headers, etc.

Review Cisco Networking for a $25 gift card