I'm trying to write a script that can block a host by shutting down a switchport directly on the Switch.
I have access to the Cisco Router and the computer, how do I find out which Switch my computer is connected to?
I tried using "show arp" and "show cdp neighbors" but the interface of the host IP address just isn't written there. Or maybe I just didn't get the command.
Anyway, the Network administrator suggested that I'm just supposed to connect to the "neighbors" until eventually there aren't any and that's how I know I reached the direct Switch. But it doesn't work for me. Is there an easier way?