Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

Auto Smartports on Catalyst 2960

I don't know if what I am asking is possible but I thought I would ask.  I have mobile video conferencing equipment that could be plugged into any network jack in a building and I need to reconfigure the port on the fly.  I have successfully used Auto Smartports to configure the port to the proper VLAN when the equipment is plugged in.  The problem I am having is when I unplug the equipment, the switchport retains the current VLAN.  I would like the switchport to revert back to its original configuration including the VLAN it had before plugging the equipment in.

3 REPLIES
Hall of Fame Super Blue

Auto Smartports on Catalyst 2960

Command:  default interface

Community Member

Auto Smartports on Catalyst 2960

Thanks for the command but it removed all configuration for that interface back to factory default.  I want to keep all configuration including QOS, spanning-tree, etc.  I just want it so when I unplug the equipment, the data vlan goes back to the vlan it was before the equipment was plugged in but retain all the other interface configuration.

Community Member

Re: Auto Smartports on Catalyst 2960

No sure if you resolved your issue yet but noticed that no answer had yet been accepted so presume not

I believe you have to run an anti-macro to remove the commands added by your initial macro. The bit after the link down is considered to be the anti-macro

if [[ $LINKUP -eq YES ]]; then

    conf t

    interface $INTERFACE

    switchport access vlan 10

    exit

end

fi

if [[ $LINKUP -eq ]]; then

    conf t

    interface $INTERFACE

    !switch back to the your default port vlan on link down

    switchport access vlan 20

    !or

    no switchport access vlan 10

    ! this will result with the port having no access vlan.

    exit

end

fi

Good luck

Dale

506
Views
0
Helpful
3
Replies
CreatePlease to create content