Interface Ranges

When using the interface range global configuration command, note these guidelines: •Valid entries for port-range:

vlan vlan-ID - vlan-ID, where VLAN ID is from 1 to 4094 fastethernet slot/{ffrst port} - {last port}, where slot is 0 gigabitethernet slot/{ffrsf port} - {last port}, where slot is 0

port-channel port-channel-number - port-channel-number, where port-channel-number is from 1 to 64

• You must add a space between the interface numbers and the hyphen when using the interface range command. For example, the command interface range fastethernet 0/1 - 5 is a valid range; the command interface range fastethernet 0/1-5 is not a valid range.

• The interface range command works only with VLAN interfaces that have been configured with the interface vlan command (the show running-config privileged EXEC command displays the configured VLAN interfaces). VLAN interfaces not displayed by the show running-config command cannot be used with the interface range command.

• All interfaces in a range must be the same type; that is, all Fast Ethernet ports, all Gigabit Ethernet ports, all EtherChannel ports, or all SVIs.

You can use the interface range global configuration command to configure multiple interfaces with the same configuration parameters. When you enter the interface range configuration mode, all command parameters that you enter are attributed to all interfaces within that range until you exit this mode. The interface range command is extremely useful when assigning access ports to a VLAN. Without the interface range command you must go into interface configuration on each individual access port.

When using the interface range global configuration command, note these guidelines:

■ Valid entries for port-range:

— vlan vlan-ID - vlan-ID, where VLAN ID is from 1 to 4094

— fastethernet slot/{/irstport} - {lastport}, where slot is 0

— gigabitethernet slot/{/irst port} - {lastport}, where slot is 0

— port-channel port-channel-number - port-channel-number, where port-channel-number is from 1 to 64

You must add a space between the interface numbers and the hyphen when using the interface range command. For example, the command interface range fastethernet 0/1 -5 is a valid range; the command interface range fastethernet 0/1-5 is not a valid range.

■ The interface range command works only with VLAN interfaces that have been configured with the interface vlan command (the show running-config privileged EXEC

© 2002, Cisco Systems, Inc. All rights reserved.

Cisco CCIE Prep v1.0—Module 5-36

command displays the configured VLAN interfaces). VLAN interfaces not displayed by the show running-config command cannot be used with the interface range command.

■ All interfaces in a range must be the same type; that is, all Fast Ethernet ports, all Gigabit Ethernet ports, all EtherChannel ports, or all SVIs.

Use the steps outlined in the following table to configure a range of interfaces with the same parameters:

Table 4-18: Range of Interfaces

Command

Purpose

3550(config)# interface range

{port-range}

Enter interface range configuration mode by entering the range of interfaces (VLANs or physical ports) to be configured.

■ You can use the interface range command to configure up to five port ranges or a previously defined macro.

■ Each comma-separated port-range must consist of the same port type. You do not need to enter spaces before or after the comma.

When you define a range, the space between the first port and the hyphen is required.

You can now use the normal configuration commands to apply the configuration parameters to all interfaces in the range.

You can create an interface range macro to automatically select a range of interfaces for configuration. Before you can use the macro keyword in the interface range macro global configuration command string, you must use the define interface-range global configuration command to define the macro.

Use the steps outlined in the following table to define an interface range macro: Table 4-19: Interface Range Macro

Command

Purpose

3550(config)# define interface-range macro_name interface-range

Define the interface-range macro, and save it in NVRAM.

■ The macro_name is a 32-character maximum character string.

■ A macro can contain up to five comma-separated interface ranges. You do not need to enter spaces before or after the comma.

■ Each interface-range must consist of the same port type.

All interfaces in a range must be the same type; that is, all Fast Ethernet ports, all Gigabit Ethernet ports, all EtherChannel ports, or all VLANs, but you can combine multiple interface types in a macro.

3550(config)# interface range macro macro_name

Select the interface range to be configured using the values saved in the interface-range macro called macro_name.

You can now use the normal configuration commands to apply the configuration to all interfaces in the defined macro.

Note Use the no define interface-range macro_name global configuration command to delete a macro.

Was this article helpful?

0 0

Post a comment