The packets in the same vlan should be switched instead of being routed. Because they are in the different switches, you will need to build one trunking between A and B,and one trunking between B and C (or one trunking between A and C directly, if possible). Make sure that vlan 2 is allowed in the trunking and not pruned.
Sorry, this workaround has a problem. Two interfaces can't not be in the same subnet unless ... ip unnumber?? May be. Well, I'm sleepy, can't think now. I will try this in my lab tomorrow. If you accept this workaround, let me know.
I have tried, but I failed. The fact is simple: A packet with the source and destination in the same subnet can only be switched. It cannot be routed. When a L3 switch receive this packet, it will try to switch the packet to other switchports in the same vlan. It will not switch the packet to any other routed ports. No chance!
To solve your problem in this senario, either change one side into a different vlan(so that they can be routed), or change the routing enviroment into a switching enviroment(so they can be switched).If you insist such a Layer2 over Layer3 senario, I know some advanced techonology can do it, like EoMPLS, VPLS. There happen to be a relateed topic in progress:
We are pleased to announce availability of Beta software for 16.6.3.
16.6.3 will be the second rebuild on the 16.6 release train targeted
towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are
looking for early feedback from customers befor...
Introduction Featured Speakers Luis Espejel is the Telecommunications
Manager of IENova, an Oil & Gas company. Currently he works with Cisco
IOS® and Cisco IOS XE platforms, and NX to some extent. He has also
worked as a Senior Engineer with the Routing P...
In this session you can learn more about Layer 3 multicast and the best
practices to identify possible threats and take security measures. It
provides an overview of basic multicast, the best security practices for
use of this technology, and recommendati...