Smartport macros - Event Trigger

From: spycharlies <spycharlies_at_gmail.com>
Date: Tue, 6 Apr 2010 17:54:51 -0600

Hi Experts,

Did anyone successful modify the built-in function in Smartport Macro's?

I successfully modify the trunk port, but access ports (for VOIP and
worstation) is giving me a lot of headache...

My goal is..when a Cisco Phone is detected on a switchport, automatically
load a pre-defined config.

example - load the following config when a workstation or cisco phone is
detected..
==
switchport mode access
 switchport access vlan 15
 switchport voice vlan 30
 switchport port-security maximum 3
 switchport port-security
 switchport port-security aging time 1
 switchport port-security violation restrict
 switchport port-security aging type inactivity
 auto qos voip cisco-phone
 spanning-tree portfast
 spanning-tree bpduguard enable
 spanning-tree guard root
 ip dhcp snooping limit rate 30
==

..But even after i modify this, it still shows up as the cisco defined
configs

#sh shell functions | be CISCO_PHONE_AUTO_SMARTPORT

function CISCO_PHONE_AUTO_SMARTPORT () {
    if [[ $LINKUP -eq YES ]]; then
        conf t
            interface $INTERFACE
                macro description $TRIGGER
                switchport access vlan $ACCESS_VLAN
                switchport mode access
                switchport block unicast
                if [[ $AUTH_ENABLED -eq NO ]]; then
                   switchport voice vlan $VOICE_VLAN
                fi
                switchport port-security maximum 3
                switchport port-security maximum 2 vlan access
                switchport port-security
                switchport port-security aging time 1
                switchport port-security violation restrict
                switchport port-security aging type inactivity
                load-interval 30
                auto qos voip cisco-phone
                storm-control broadcast level pps 1k
                storm-control multicast level pps 2k
                storm-control action trap
                spanning-tree portfast
 --More--

Any input appreciated

Thanks Guys,

Charlie

Blogs and organic groups at http://www.ccie.net
Received on Tue Apr 06 2010 - 17:54:51 ART

This archive was generated by hypermail 2.2.0 : Sat May 01 2010 - 09:49:56 ART