Cisco Systems 3560X Manual De Usuario

Descargar
Página de 1438
 
14-11
Catalyst 3750-X and 3560-X Switch Software Configuration Guide
OL-21521-01
Chapter 14      Configuring Auto Smartports Macros
Configuring Auto Smartports
 
Current configuration : 284 bytes
!
 interface GigabitEthernet1/0/1
 interface GigabitEthernet0/1
 switchport trunk encapsulation dot1q
 switchport trunk native vlan 10
 switchport mode trunk
 srr-queue bandwidth share 10 10 60 20
 queue-set 2
 priority-queue out 
 mls qos trust cos
 auto qos voip trust 
 macro description CISCO_SWITCH_EVENT
end
This example shows how to configure the remote macro with the setting for native VLAN 5. 
a.
Configure the remote macro in the macro.txt file.
b.
Use the macro auto execute configuration command to specify the remote location for the macro 
file.
if [[ $LINKUP -eq YES ]]; then 
    conf t 
           interface $INTERFACE 
                  macro description $TRIGGER 
                  auto qos voip trust 
                  switchport trunk encapsulation dot1q 
                  switchport trunk native vlan $NATIVE_VLAN 
                  switchport trunk allowed vlan ALL 
                  switchport mode trunk 
            exit 
    end 
else 
    conf t 
           interface $INTERFACE 
                 no macro description 
                 no auto qos voip trust 
                 no switchport mode trunk 
                 no switchport trunk encapsulation dot1q 
                 no switchport trunk native vlan $NATIVE_VLAN 
                 no switchport trunk allowed vlan ALL 
           exit 
    end 
Switch(config)# macro auto execute CISCO_SWITCH_EVENT remote tftp://<ip_address>/macro.txt  
NATIVE_VLAN=5
Switch# show running configuration | include macro
macro auto execute CISCO_SWITCH_EVENT remote tftp://<ip_address>/macro.txt
NATIVE_VLAN=5
Switch# 
Creating User-Defined Event Triggers
When using MAB or 802.1x authentication to trigger Auto Smartports macros, you need to create an 
event trigger that corresponds to the Cisco attribute-value pair (auto-smart-port=event trigger) sent by 
the RADIUS server. This procedure is optional.