I've got four switches in a line. On the fourth, an AP is connected. A PC, associated with this AP, sends ethernet frames through the switches, but its MAC address doesn't show up in the MAC tables like this:
--- snip ---
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.149.251.33, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms
Switch1#sh ip arp | in 10.149.251.33
Internet 10.149.251.33 93 0016.6f75.861e ARPA Vlan251
Switch1#sh mac add add 0016.6f75.861e
No entries present.
--- snap ---
Only the switch which the access point is connected to knows the MAC address.
The port in the first switch leading to the host in question is configured like this:
--- begin config ---
switchport access vlan 7
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 7,251
switchport mode trunk
no snmp trap link-status
--- end config ---
Other MAC addresses ARE present on the port in VLAN 251
Indeed, we have found the source of Peter's problems: a workstation connected into the same VLAN by two distinct interfaces.
Peter, connecting a station with two NICs into the same VLAN (and thus in the same IP subnet) is usually calling for trouble like this one. Common operating systems like Windows or Linux usually do not have any intelligent mechanisms to decide which interface they should use when communicating, and it can be almost a random play to find out which interface is actually answering to the ARP requests and which one is used to send packets.
What I believe happened is that when the laptop sent and ARP message to the network (either its own ARP Request or an ARP Reply), it inserted its IP address and the MAC address of the wireless NIC into the ARP message body. However, that entire ARP message was then sent out the wired NIC and that is the source of confusion - an ARP message containing the MAC address of a particular interface, encapsulated in a frame that went out through a different interface! That is why the ARP cache and the MAC address tables on all switches got "desynced". Blame the operating system on the laptop!
Actually, this could be very interesting to watch in Wireshark and confirm whether this is really the case. Wanna do some tests on the laptop?
In any case, as Milan has pointed out, it would be the best if the VLAN for the wireless clients was separated from the wired VLAN. At least, do not connect a PC with two interfaces into the same VLAN.
One comment to your configuration: on ports configured as static trunks using the switchport mode trunk, the command switchport access vlan X is unused and ignored. As it can be confusing to see that command on a trunk, I suggest removing it from all ports that are configured similarily, to reduce the ambiguosity of the configuration.
it's clearer now.
IMHO, it's a bad practice to use the same VLAN and subnet for wireless and cable connection :-(
You might get confused then easily as happened in your case.
Connecting both cable and wireless on your PC creates a loop in VLAN251 in fact.
It's possible you've got bridging enabled on your PC.
And STP running on that might shutdown the wireless port.
But it might be considered Up by the IP stack still, i.e., replying to Pings received by the Ethernet interface.
My understanding what could happen is:
When you try to Ping your PC from Switch1, the switch sends and ARP Request broadcast to VLAN251.
The PC receives it via the cable and as it knows there's 10.149.251.33 configured on the wireless interface, it replies.
But the ARP Reply is sent from the PC's Ethernet interface.
So the Switch1 knows the MAC address of the PC's wireless interface (incuded inside the ARP Reply packet).
But as the ARP Reply was sent out from the Ethernet interface, the Switch1 has never received any frame sent out from the PC's wireless interface and does not have the wireless MAC address in the MAC address table.
And replies to Pings are received through the cable part of your LAN, again.
I know this theory does not explain why Switch3 knows the MAC address of the wireless interface.
It's possible the Switch3 is breaking the STP loop and the PC is replying to Pings from the Ethernet interface due to a default route.
Or something even more complicated.
But definitely, it's not good to connect a PC to a VLAN by two interfaces configured for the same subnet.
IMHO, if you disconnect your PC Ethernet port from the LAN and connect it via wireless only, everything should work a standard way.