From: Brian McGahan (bmcgahan@internetworkexpert.com)
Date: Wed Dec 29 2004 - 13:18:48 GMT-3
Rick,
The advantage is for administrative purposes when you have
multiple groups of ports that have the same policy applied and need to
recall the without constantly looking to see which ports are part of
that policy.
Switch(config)#define interface-range VLAN_10 fa0/1 - 4 , fa0/8 , fa0/22
Switch(config)#define interface-range PORT_CHANNEL fa0/12 , fa0/18 - 19
Switch(config)#define interface-range WEB_SERVERS fa0/5 , fa0/7 , fa0/10
Switch(config)#interface range macro VLAN_10
Switch(config-if-range)#switchport access vlan 10
Switch(config-if-range)#interface range macro PORT_CHANNEL
Switch(config-if-range)#channel-group 1 mode on
Switch(config-if-range)#interface range macro WEB_SERVERS
Switch(config-if-range)#switchport protected
Switch(config-if-range)#switchport block unicast
Is it easier to remember that ports fa0/1, fa0/2, fa0/3, fa0/4,
fa0/8, and fa0/22 are in VLAN 10, or that they are all defined by the
macro VLAN_10?
Brian McGahan, CCIE #8593
bmcgahan@internetworkexpert.com
Internetwork Expert, Inc.
http://www.InternetworkExpert.com
Toll Free: 877-224-8987 x 705
Outside US: 775-826-4344 x 705
24/7 Support: http://forum.internetworkexpert.com
Live Chat: http://www.internetworkexpert.com/chat/
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
Of
> ccie2be
> Sent: Tuesday, December 28, 2004 6:43 PM
> To: Rick; Cisco certification
> Subject: Re: define interface-range
>
> Rick,
>
> I agree with you that the benefit of a interface range macro is
limited.
>
> However, if you have a list of non-consecutive interfaces that you
> repeated
> need to reference, it might be easier
>
> to specify the list once when you define the macro, and then use the
macro
> instead.
>
> Although from the examples it might not be that clear, but you can
define
> any group of interfaces in the macro, not just fa0/1 - 24.
>
> HTH, Tim
> ----- Original Message -----
> From: "Rick" <rick@iptool.net>
> To: "Cisco certification" <ccielab@groupstudy.com>
> Sent: Tuesday, December 28, 2004 7:31 PM
> Subject: define interface-range
>
>
> > Can anyone tell me what the benefit of the define interface-range
macro
> is?
> > All the examples on CCO that I have found don't really show any
benefit.
> > SW2(config)#define interface-range 1-24 fastEthernet 1/0/1 - 24
> > SW2(config)#
> >
> > Once I do that how can I use it to do anything useful that I can't
do by
> using
> > the following:
> > SW2(config)#interface range fastEthernet 1/0/1 - 24
> > SW2(config-if-range)#
> >
> >
> > Thanks
> > Rick
> >
> >
This archive was generated by hypermail 2.1.4 : Mon Jan 03 2005 - 10:31:31 GMT-3