RE: Smart Macros and interface range/macro

From: Osmanov Orhan (Orhan.Osmanov@sofk.siemens.bg)
Date: Wed Feb 15 2006 - 03:46:06 GMT-3


Yet it works.

Switch_3550(config)#define interface-range test fa 0/17 - 18
Switch_3550(config)#int range macro test
Switch_3550(config-if-range)#macro trace cisco-desktop $access_vlan 4
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)#do sh run int fa 0/17
Building configuration...

Current configuration : 331 bytes
!
interface FastEthernet0/17
 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/18
Building configuration...

Current configuration : 331 bytes
!
interface FastEthernet0/18
 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

Regards.

-----Original Message-----
From: xprtofnet [mailto:xprtofnet@yahoo.com]
Sent: Tuesday, February 14, 2006 6:07 PM
To: Osmanov Orhan; ccielab@groupstudy.com
Subject: RE: Smart Macros and interface range/macro

in my e.g. below my smart macro has the interface
range macro--did you get that to work ?

Thank You,

--- Osmanov Orhan <Orhan.Osmanov@sofk.siemens.bg>
wrote:

> 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,
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>



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