RE: Smart Macros and interface range/macro

From: Osmanov Orhan (Orhan.Osmanov@sofk.siemens.bg)
Date: Tue Feb 14 2006 - 12:10:18 GMT-3


HI,

See the output:

Switch_3550(config)#int range fastEthernet 0/21 - 22
Switch_3550(config-if-range)#macro trace cisco-desktop ?
  WORD Keyword to replace with a value e.g. $access_vlan
  <cr>

Switch_3550(config-if-range)#macro trace cisco-desktop $access_vlan 4
Applying command... 'switchport access vlan 4'
Applying command... 'switchport mode access'
Applying command... 'switchport port-security'
Applying command... 'switchport port-security maximum 1'
Applying command... 'switchport port-security violation restrict'
Applying command... 'switchport port-security aging time 2'
Applying command... 'switchport port-security aging type inactivity'
Applying command... 'spanning-tree portfast'
%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc... to this
 interface when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION

%Portfast will be configured in 2 interfaces due to the range command
 but will only have effect when the interfaces are in a non-trunking mode.
Applying command... 'spanning-tree bpduguard enable'
Applying command... 'switchport access vlan 4'
Applying command... 'switchport mode access'
Applying command... 'switchport port-security'
Applying command... 'switchport port-security maximum 1'
Applying command... 'switchport port-security violation restrict'
Applying command... 'switchport port-security aging time 2'
Applying command... 'switchport port-security aging type inactivity'
Applying command... 'spanning-tree portfast'
Applying command... 'spanning-tree bpduguard enable'
Switch_3550(config-if-range)#
Switch_3550(config-if-range)#
Switch_3550(config-if-range)#
Switch_3550(config-if-range)#
Switch_3550(config-if-range)#
Switch_3550(config-if-range)#
Switch_3550(config-if-range)#do sh run int fa 0/21
Building configuration...

Current configuration : 331 bytes
!
interface FastEthernet0/21
 switchport access vlan 4
 switchport mode access
 switchport port-security
 switchport port-security aging time 2
 switchport port-security violation restrict
 switchport port-security aging type inactivity
 macro description cisco-desktop
 spanning-tree portfast
 spanning-tree bpduguard enable
end

Switch_3550(config-if-range)#do sh run int fa 0/22
Building configuration...

Current configuration : 331 bytes
!
interface FastEthernet0/22
 switchport access vlan 4
 switchport mode access
 switchport port-security
 switchport port-security aging time 2
 switchport port-security violation restrict
 switchport port-security aging type inactivity
 macro description cisco-desktop
 spanning-tree portfast
 spanning-tree bpduguard enable
end

Switch_3550(config-if-range)#

Regards.

-----Original Message-----
From: xprtofnet [mailto:xprtofnet@yahoo.com]
Sent: Tuesday, February 14, 2006 5:00 PM
To: ccielab@groupstudy.com
Subject: Smart Macros and interface range/macro

Hello,

i am trying to run the smart macros with interface
range macros without any luck.

any one tried that?

so, i want to do apply smart macro to a range of
interfaces.

Smart Marco
-----------
interface range macro f
switchport mode access
switchport access vlan $v
description Hello.World !
exit <- with or without same result
@

now when i run this smart macro for a range of f0/1 -
24 defined in my interface macro f the result is
applied only to first port f0/1.

i also tried to go in the port range manually and then
apply the smart macro but same result.

looked in the configs guides but no e.g. there.

requesting inputs.

Thank You,



This archive was generated by hypermail 2.1.4 : Wed Mar 01 2006 - 11:28:18 GMT-3