EEM 3.2 MAC Address prefix->switch port config examples
Have a interesting project that would require us to have a switchport change which VLAN it's configured to based on a specific device being plugged in. Device has a unique MAC prefix for this manufacturer and would be plugged into a Cat4500 running 12.2(54)SG1 which has EEM 3.2.0. Trying to figure out if it's possible to detect this MAC prefix and do the following IOS commands:
interface X/Y (based on which port the MAC is seen on)
switchport access vlan 500
Bonus points if there's a way to revert the interface back to another VLAN (could be statically assigned per switch) when the device is removed (link-down event?)
It looks like EEM 3.2 and higher are so new, that none of the examples I'm finding have it, and the mac-address-table information wasn't added until this release. Any suggestions or pointers to examples using this functionality would be greatly appreciated.
I know this thread is old but I have the same issue but for a bunch of MACs. I was looking to implement this with Auto SmartPorts but it seems that Cisco is pushing to use EEM better.
What modifications should I do to the above script for a group of MACs?
What about if I have also another group of macs that I want to change complete their port configuration if the device is connected and if the device is disconnected then change it back to the previous state?
Another questions, with ASP or EEM is a best practice to have all the access ports with their config empty or pre-configured with a "default vlan" that I want to have plus other configs and then later leave the script do it's thing?
The need was to reach an host inside a LAN through a VPN connection managed by the LAN gateway (Cisco 1921).
The LAN gateway performs NAT and there was a dedicate nat rule for the host i wanted to reach through VPN.
I couldn't connect to the hos...
We have 3 identical switches configured by someone else and would like to claim some of the Gigabit ports(G1/G2/G3/G4) for use on servers. When we try to change the wiring and configuration, we run in to connectivity issues. Attached is a des...
This is actually a pretty cool feature, i didn't even know it existed until I was looking for a solution to advertise a subnet (prefix in BGP talk), only if a certain condition existed. This is exactly what conditional advertisements does