define interface-range through interface range

define interface-range

To create an interface-range macro, use the define interface-range command in global configuration mode. To remove an interface-range macro, use the no form of this command.

define interface-range macro-name interface-range

Syntax Description

macro-name

Name of the interface-range macro.

interface-range

Type of interface range.

  • For a list of valid values, see the “Usage Guidelines” section.

Command Default

Interface-range macro is not configured.

Command Modes

Global configuration (config)

Command History

Release

Modification

12.2(14)SX

This command was introduced.

12.2(17d)SXB

This command was integrated into Cisco IOS XE Release 12.2(17d)SXB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

15.1(2)SNG

This command was implemented on the Cisco ASR 901 Series Aggregation Services Routers.

Usage Guidelines

  • The define interface-range command applies a particular configuration on multiple interfaces and creates multiple logical, and sub interfaces.

  • An interface range macro name can comprise up to 32 characters.

  • An interface range for a macro can accept a maximum of five ranges. However, the subinterface range for a macro accepts only one range.

  • An interface range cannot span slots.

  • Use the interface-type slot/first-interface last-interface format to enter the interface range.

  • Valid values for the interface-type argument are as follows:
    • atm —Supported on Cisco 7600 series routers that are configured with a Supervisor Engine 2
    • ethernet
    • fastethernet
    • ge-wan —Supported on Cisco 7600 series routers that are configured with a Supervisor Engine 2
    • gigabitethernet
    • loopback
    • port-channel interface-number —Valid values are from 1 to 256
    • pos —Supported on Cisco 7600 series routers that are configured with a Supervisor Engine 2
    • tengigabitethernet
    • tunnel
    • vlan vlan-id —Valid values are from 1 to 4094

Examples

The following example shows how to create a multiple-interface macro:

Device(config)# define interface-range macro1 ethernet 1/2 - 5, fastethernet 5/5 - 10
The following example shows how to create multiple loopback interfaces:
Device(config)# define interface-range loopback1-10

Related Commands

Command

Description

interface range

Executes a command on multiple ports at the same time.

duplex

To configure the duplex operation on an interface, use the duplex command in interface configuration mode. To return to the default configuration, use the no form of this command.

duplex { full | half | auto }

no duplex

Syntax Description

full

Specifies full-duplex operation.

half

Specifies half-duplex operation.

auto

Enables autonegotiation. The interface automatically operates at half-duplex or full-duplex mode depending on environmental factors, such as the type of media and the transmission speeds for the peer routers, hubs, and switches used in the network configuration.

Command Default

Half-duplex mode is enabled.

For the 4-port 10/100 Fast Ethernet Shared Port Adapter (SPA) and the 2-port 10/100/1000 Gigabit Ethernet SPA on the Cisco 7304 router, autonegotiation is enabled. The command is set to auto.

Command Modes

Interface configuration (config-if)

Command History

Release

Modification

11.2(10)P

This command was introduced.

12.2S

This command was integrated into Cisco IOS Release 12.2S.

12.2(14)SX

This command was implemented on the Supervisor Engine 720.

12.2(17d)SXB

This command was integrated into Cisco IOS Release 12.2 SXB.

12.2(20)S2

This command was implemented on the 4-port 10/100 Fast Ethernet SPA and the 2-port 10/100/1000 Gigabit Ethernet SPA on the Cisco 7304 router.

Cisco IOS XE Release 3.9S

This command was integrated into Cisco IOS XE Release 3.9S.

15.2(02)SA

This command was implemented on the Cisco ME 2600X Series Ethernet Access Switches.

Usage Guidelines

To use the autonegotiation capability (that is, to automatically detect speed and duplex modes), you must set both the speed command and the duplex command to auto.

Cisco Cloud Services Router 1000V Series

Cisco Cloud Services Router 1000V Series does not support the duplex command.

Duplex Options and Interfaces

The table below lists the supported command options by interface type.

Table 1 Supported Duplex Command Options

Interface Type

Supported Syntax

Default Setting

Usage Guidelines

10/100-Mbps module

duplex [half | full]

See the “Usage Guidelines” column.

Run the no duplex auto command to set the speed to auto.

If the speed is set to 10 or 100, without configuring the duplex setting, the duplex is set to half.

100-Mbps fiber modules

duplex [half | full]

half

Gigabit Ethernet interfaces

duplex full

full

10-Mbps ports

duplex [half | full]

half

If the transmission speed on a 16-port RJ-45 Gigabit Ethernet port is set to 1000, the duplex mode is set to full. If the transmission speed is changed to 10 or 100, the duplex mode stays at half duplex. You must configure the correct duplex mode when the transmission speed is changed to 10 or 100 from 1000.

Gigabit Ethernet is full duplex only. You cannot change the mode on Gigabit Ethernet ports.

When manually configuring the interface speed to either 10 or 100-Mbps, you should also configure the duplex mode on the interface.


Caution


Changing the interface speed and duplex mode configuration might shut down and reenable the interface during reconfiguration.


4-Port 10/100 Fast Ethernet SPA and 2-Port 10/100/1000 Gigabit Ethernet SPA on the Cisco 7304 Router

The duplex command is applied to the SPA interfaces that use the RJ-45 media. Gigabit Ethernet interfaces using fiber media support full-duplex mode only and use the negotiation command to enable and disable autonegotiation.

To enable the autonegotiation capability on an RJ-45 interface, you must set either the speed command or the duplex command to auto. The default configuration is that both commands are set to auto.


Note


For the Cisco AS5300, the duplex {full | half | auto} command syntax replaces the duplex commands—half-duplex and full-duplex. Cisco 7600 series routers can automatically negotiate the interface speed and the duplex mode only if one of the connected interfaces are configured to auto.


The table below describes the interface behavior for different combinations of the duplex and speed command settings. The specified duplex command configured with the specified speed command produces the resulting system action.

If you specify both duplex and speed settings other than auto on an RJ-45 interface, autonegotiation is disabled for the interface.


Note


If you need to force an interface port to operate with certain settings and, therefore, need to disable autonegotiation, you must be sure that the remote link is configured with compatible link settings for proper transmission including the support of flow control on the link.



Note


Every interface on a 4-port 10/100 Fast Ethernet SPA supports transmission of pause frames to stop packet flow when the Modular Services Card (MSC) is full. You cannot disable flow control for an interface on the 4-port 10/100 Fast Ethernet SPA. Hence, the flow control support is not configurable, but it is advertised during autonegotiation. If you disable autonegotiation, you must be sure that the remote device is configured to support flow control because flow control is automatically enabled for all interfaces on the 4-port 10/100 Fast Ethernet SPA.


Table 2 Relationship Between duplex and speed Commands

duplex Command

speed Command

Resulting System Action

duplex auto

speed auto

Autonegotiates both speed and duplex modes. The interface advertises the capability for the following link settings:

  • 10 Mbps and half duplex

  • 10 Mbps and full duplex

  • 100 Mbps and half duplex

  • 100 Mbps and full duplex

  • 1000 Mbps and half duplex

  • 1000 Mbps and full duplex

duplex auto

speed 10 or speed 100 or speed 1000

Autonegotiates the duplex mode. The interface advertises the capability for the configured speed with the capability for both half-duplex or full-duplex mode.

For example, if the speed 100 command is configured with duplex auto, then the interface advertises the following capability:

  • 100 Mbps and half duplex

  • 100 Mbps and full duplex

duplex half or duplex full

speed auto

Autonegotiates the speed. The interface advertises the capability for duplex mode for Fast Ethernet interfaces at a speed of 10-Mbps and 100-Mbps, and Gigabit interfaces at 10-Mbps, 100-Mbps, and 1000-Mbps.

For example, if the duplex full command is configured with the speed auto command, then the interface advertises the following capability:

  • 10 Mbps and full duplex

  • 100 Mbps and full duplex

  • 1000 Mbps and full duplex (Gigabit Ethernet interfaces only)

duplex half

speed 10

Forces 10-Mbps speed and the half-duplex operation, and disables autonegotiation on the interface.

duplex full

speed 10

Forces a speed of 10-Mbps and the full-duplex operation, and disables autonegotiation on the interface.

duplex half

speed 100

Forces a speed of 100-Mbps and the half-duplex operation, and disables autonegotiation on the interface.

duplex full

speed 100

Forces a speed of 100-Mbps and the full-duplex operation, and disables autonegotiation on the interface.

duplex half

speed 1000

Forces a speed of 1000-Mbps and the half-duplex operation, and disables autonegotiation on the interface (Gigabit Ethernet only).

duplex full

speed 1000

Forces a speed of 1000-Mbps and the full-duplex operation, and disables autonegotiation on the interface (Gigabit Ethernet only).

Examples

The following example shows how to configure a full-duplex operation on a Cisco AS5300 router:

Device(config)# interface fastethernet 0
Device(config-if)# duplex full

The following example shows how to specify the advertisement of only half-duplex support and either 10-Mbps or 100-Mbps capability during autonegotiation for the second interface (port 1) on the SPA located in the bottom subslot (1) of the MSC that is installed in slot 2 of the Cisco 7304 router:

Device# configure terminal
Device(config)# interface fastethernet 2/1/1
Device(config-if)# duplex half
Device(config-if)# speed auto

With this configuration, the interface advertises the following capabilities during autonegotiation:

  • 10 Mbps and half duplex

  • 100 Mbps and half duplex


Note


Flow control support is always advertised when autonegotiation is enabled.


Related Commands

Command

Description

interface

Configures an interface and enters interface configuration mode.

interface fastethernet

Selects a particular Fast Ethernet interface for configuration.

interface gigabitethernet

Selects a particular Gigabit Ethernet interface for configuration.

show controllers

Displays information that is specific to the hardware on a module.

show controllers fastethernet

Displays Fast Ethernet interface information, transmission statistics, and errors, and the applicable MAC destination address and VLAN filtering tables.

show controllers gigabitethernet

Displays Gigabit Ethernet interface information, transmission statistics, and errors, and the applicable MAC destination address and VLAN filtering tables.

show interfaces

Displays traffic that is seen by a specific interface.

show interfaces fastethernet

Displays information about Fast Ethernet interfaces.

show interfaces gigabitethernet

Displays information about Gigabit Ethernet interfaces.

speed

Sets the port speed for a Fast Ethernet interface.

errdisable recovery

To configure recovery mechanism variables, use the errdisable recovery command in global configuration mode. To return to the default state, use the no form of this command.

errdisable recovery { cause { all | arp-inspection | bpduguard | channel-misconfig | dhcp-rate-limit | dtp-flap | gbic-invalid | l2ptguard | link-flap | pagp-flap | psecure-violation | security-violation | rootguard | udld | unicast-flood } | interval seconds }

no errdisable recovery { cause { all | arp-inspection | bpduguard | channel-misconfig | dhcp-rate-limit | dtp-flap | gbic-invalid | l2ptguard | link-flap | pagp-flap | psecure-violation | security-violation | rootguard | udld | unicast-flood } | interval seconds }

Syntax Description

cause

Enables error-disable recovery from a specific cause.

all

Enables the recovery timers for all error-disable causes.

arp-inspection

Enables error-disable recovery from an Address Resolution Protocol (ARP) inspection cause.

bpduguard

Enables the recovery timer for the Bridge Protocol Data Unit (BPDU)-guard error-disable cause.

channel-misconfig

Enables the recovery timer for the channel-misconfig error-disable cause.

dhcp-rate-limit

Enables the recovery timer for the Dynamic Host Configuration Protocol (DHCP)-rate-limit error-disable cause.

dtp-flap

Enables the recovery timer for the Dynamic Trunking Protocol (DTP)-flap error-disable cause.

gbic-invalid

Enables the recovery timer for the Gigabit Interface Converter (GBIC)-invalid error-disable cause.

l2ptguard

Enables the recovery timer for the Layer 2 Protocol Tunneling (L2PT) error-disable cause.

link-flap

Enables the recovery timer for the link-flap error-disable cause.

pagp-flap

Enables the recovery timer for the Port Aggregation Protocol (PAgP)-flap error-disable cause.

psecure-violation

Enables the recovery timer for the psecure-violation error-disable cause.

security-violation

Enables the automatic recovery of ports that were disabled because of 802.1X security violations.

rootguard

Enables the recovery timer for the root-guard error-disable cause.

udld

Enables the recovery timer for the Unidirectional Link Detection (UDLD) error-disable cause.

unicast-flood

Enables the recovery timer for the unicast-flood error-disable cause.

interval seconds

Specifies the time, in seconds, to recover from a specified error-disable cause. The range is from 30 to 86400. The default interval is 300.

Command Default

The recovery mechanisms are disabled.

Command Modes

Global configuration (config)

Command History

Release

Modification

15.0(1)M

This command was introduced in a release earlier than Cisco IOS Release 15.0(1)M.

12.2(14)SX

This command was modified. This command was implemented on the Supervisor Engine 720.

12.2(17d)SXB

This command was modified. This command was implemented on the Supervisor Engine 2.

12.2(18)SXD

This command was modified. The arp-inspection keyword was added.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

Usage Guidelines

A cause (bpduguard, channel-misconfig, dhcp-rate-limit, dtp-flap, l2ptguard, link-flap, pagp-flap, psecure-violation, security-violation, rootguard, udld, or unicast-flood) is defined as the reason why the error-disable state occurred. When a cause is detected on an interface, the interface is placed in an error-disable state (an operational state that is similar to the link-down state). If you do not enable error-disable recovery for the cause, the interface stays in the error-disable state until a shutdown and no shutdown occur. If you enable recovery for a cause, the interface is brought out of the error-disable state and allowed to retry operation once all the causes have timed out.

You must enter the shutdown command and then the no shutdown command to manually recover an interface from the error-disable state.


Note


A separate line is required each time you want to enter the errdisable recovery cause command to add a new reason for recovery; each new reason does not get appended to the original single line. This means you must enter each new reason separately.


Examples

This example shows how to enable the recovery timer for the BPDU-guard error-disable cause:

Router(config)#
 errdisable recovery cause bpduguard

This example shows how to set the recovery timer to 300 seconds:

Router(config)#
 errdisable recovery interval 300

Related Commands

Command

Description

show errdisable recovery

Displays the information about the error-disable recovery timer.

show interfaces status

Displays the interface status or a list of interfaces in an error-disabled state on LAN ports only.

shutdown

Disables an interface.

fddi frames-per-token

To specify the maximum number of frames that the FDDI interface transmits per token capture, use the fddiframes-per-token command in interface configuration mode. To revert to the default value, use the no form of this command.

fddi frames-per-token number

no fddi frames-per-token

Syntax Description

number

Maximum number of frames to transmit per token capture. Valid values are from 1 to 10. The default is 3.

Command Default

3 frames

Command Modes

Interface configuration

Command History

Release

Modification

11.2 P

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

Usage Guidelines

Changing the value will increase or decrease the maximum number of frames that the FDDI interface can transmit when it receives a token. Increasing the value does not necessarily mean more frames will be transmitted on each token capture. This is heavily dependent on the traffic load of the specific interface.

When the interface captures a token, it transmits all of the frames that are queued in the interface’s transmit ring, up to a maximum value specified by thefddiframes-per-token command.

If there are no frames ready for transmission, the token is passed on, and no frames are transmitted. If there are less than the fddiframes-per-tokenvaluein the transmit ring, all frames in the transmit ring are transmitted before the token is passed on. If there are more than the fddiframes-per-tokenvalue in the transmit ring, the specified value is transmitted before the token is passed on. The remaining frames in the transmit ring remain queued until the token is captured again.

Examples

The following example shows how to configure the FDDI interface to transmit four frames per token capture:

Router(config-if)# fddi frames-per-token 4

flowcontrol

To configure a port to send or receive pause frames, use the flowcontrol command in interface configuration mode. To return to the default settings, use the no form of this command.

flowcontrol { send | receive } { desired | off | on }

no flowcontrol { send | receive } { desired | off | on }

Syntax Description

send

Specifies that a port sends pause frames.

receive

Specifies that a port processes pause frames.

desired

Obtains predictable results regardless of whether a remote port is set to on, off, or desired.

off

Prevents a local port from receiving and processing pause frames from remote ports or from sending pause frames to remote ports.

on

Enables a local port to receive and process pause frames from remote ports or send pause frames to remote ports.

Command Default

Flow control is disabled.

Flow-control defaults depend upon port speed. The defaults are as follows:

  • Gigabit Ethernet ports default to off for receive and desired for send.

  • Fast Ethernet ports default to off for receive and on for send.

  • On the 24-port 100BASE-FX and 48-port 10/100 BASE-TX RJ-45 modules, the default is off for receive and off for send.

  • You cannot configure how WS-X6502-10GE 10-Gigabit Ethernet ports respond to pause frames. WS-X6502-10GE 10-Gigabit Ethernet ports are permanently configured to respond to pause frames.

Command Modes

Interface configuration (config-if)

Command History

Release

Modification

12.2(14)SX

This command was introduced on the Supervisor Engine 720.

12.2(17d)SXB

This command was implemented on the Supervisor Engine 2.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2(33)SCB

This command was integrated into Cisco IOS Release 12.2(33)SCB.

Usage Guidelines

The send and desired keywords are supported on Gigabit Ethernet ports only.

Pause frames are special packets that signal a source to stop sending frames for a specific period of time because the buffers are full.

Gigabit Ethernet ports on the Catalyst 6500 series switches and on the Cisco 7600 series routers use flow control to inhibit the transmission of packets to the port for a period of time; other Ethernet ports use flow control to respond to flow-control requests.

If a Gigabit Ethernet port receive buffer becomes full, the port transmits a “pause” packet that tells remote ports to delay sending more packets for a specified period of time. All Ethernet ports (1000 Mbps, 100 Mbps, and 10 Mbps) can receive and act upon “pause” packets from other devices.

You can configure non-Gigabit Ethernet ports to ignore received pause frames (disable) or to react to them (enable).

When used with the receivekeyword, the on and desired keywords have the same result.

All the Gigabit Ethernet ports on the Catalyst 6500 series switches and the Cisco 7600 series routers can receive and process pause frames from remote devices.

To obtain predictable results, follow these guidelines:

  • Use sendon only when remote ports are set to receiveon or receivedesired.

  • Use sendoff only when remote ports are set to receiveoff or receivedesired.

  • Use receiveon only when remote ports are set to sendon or senddesired.

  • Use sendoff only when remote ports are set to receiveoff or receivedesired.

Examples

These examples show how to configure the local port to not support any level of flow control by the remote port:

Router# configure terminal
 
Router(config)# interface GigabitEthernet1/9 10.4.9.157 255.255.255.0
 
Router(config-if)# flowcontrol receive off
Router(config-if)# flowcontrol send off

Related Commands

Command

Description

show interfaces flowcontrol

Displays flow-control information.

full-duplex

To specify full-duplex mode on full-duplex single-mode and multimode port adapters, use the full-duplexcommand in interface configuration mode. To restore the default half-duplex mode, use the no form of this command.

full-duplex

no full-duplex

Syntax Description

This command has no arguments or keywords.

Cisco 7500 Series Router

Half-duplex; a Fast Ethernet Interface Processor (FEIP), and serial interfaces that are configured for bisynchronous tunneling

Autonegotiation

Command Modes

Interface configuration

Command History

Release

Modification

11.1

This command was introduced.

11.3

This command was modified to include information on FDDI full-duplex, single-mode, and multimode port adapters.

12.2(31)SB

This command was integrated into Cisco IOS Release 12.2(31)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

Use this command if the equipment on the other end is capable of full-duplex mode.

This command specifies full-duplex mode on full-duplex single-mode and multimode port adapters available on the following networking devices:

  • Cisco 7200 series routers

  • Second-generation Versatile Interface Processors (VIP2s) in Cisco 7500 series routers

  • FEIP ports

  • Serial interface ports that uses bisynchronous tunneling

Refer to the CiscoProductCatalog for hardware compatibility information and for specific model numbers of port adapters.

To enable half-duplex mode, use the nofull-duplex or half-duplex command.


Note


For the Cisco AS5300, the duplexfull| halfauto} command replaces the full-duplex and half-duplex commands. You will get the following error messages if you try to use the full-duplex and half-duplex commands on a Cisco AS5300: Router(config)# interfacefastethernet0 Router(config-if)# full-duplex Please use duplex command to configure duplex mode Router(config-if)# Router(config-if)# half-duplex Please use duplex command to configure duplex mode


Support for This Command

Use the question mark (?) command to find out which port adapters support this command. If the interface does not support full-duplex, an informational message displayed, and no changes are made to the interface. To determine if the interface supports full-duplex, use the showinterfacescommand. For example, the following message is displayed if the interface does not support full-duplex:

% interface does not support full-duplex.

Use on FDDI

Full-duplex on the FDDI full-duplex port adapters allows an FDDI ring with exactly two stations to transform the ring into a full-duplex, point-to-point topology. For the interface to operate in full-duplex mode, there must be only two stations on the ring, the two stations must be capable of operating in full-duplex mode, and both stations must complete a full-duplex autoconfiguration protocol. There is no FDDI token in full-duplex mode. Refer to the CiscoProductCatalog for specific model numbers of port adapters.

Full-duplex autoconfiguration protocol allows an FDDI station to dynamically and automatically operate in either half-duplex (or ring) or full-duplex mode, and ensures that the stations fall back to ring mode when a configuration change occurs, such as a third station joining the ring.

After booting the router, the FDDI stations begin operation in half-duplex mode. While the station performs the full-duplex autoconfiguration protocol, the station continues to provide data-link services to its users. Under normal conditions, the transition between half-duplex mode and full-duplex mode is transparent to the data-link users. The data-link services provided by full-duplex mode are functionally the same as the services provided by half-duplex mode.

If you change the full-duplex configuration (for example, from disabled to enabled) on supported interfaces, the interface resets.

Cisco 10000 Series Router

The Fast Ethernet line card responds only to 802.3x pause frames from another device when it autonegotiates the duplex mode (the default). The line card does not support 802.3x flow control when you manually set half-duplex or full-duplex mode.

Examples

Examples

The following example configures full-duplex mode on the Cisco 7200 series routers:

Router(config)# interface fastethernet 0/1
Router(config-if)# full-duplex

Examples

The following example specifies full-duplex binary synchronous communications (Bisync) mode:

Router(config)# interface serial 0
Router(config-if)# encapsulation bstun
Router(config-if)# full-duplex

Examples

The following example enables full-duplex mode on FDDI interface 0:

Router(config)# interface fddi 0/1/0
Router(config-if)# full-duplex

Related Commands

Command

Description

half-duplex

Specifies half-duplex mode on an SDLC interface or on the FDDI full-duplex, single-mode port adapter and FDDI full-duplex, multimode port adapter on the Cisco 7200 series and Cisco 7500 series routers.

interface

Configures an interface type and enters interface configuration mode.

interface fastethernet

Selects a particular Fast Ethernet interface for configuration.

interface serial

Specifies a serial interface created on a channelized E1 or channelized T1 controller (for ISDN PRI, CAS, or robbed-bit signaling).

show interfaces

Displays statistics for all interfaces configured on the router or access server.

show interfaces fddi

Displays information about the FDDI interface.

hub

To enable and configure a port on an Ethernet hub of a Cisco 2505 or Cisco 2507 router, use the hub command in global configuration mode.

hub ethernet number port [end-port]

Syntax Description

ethernet

Indicates that the hub is in front of an Ethernet interface.

number

Hub number, starting with 0. Because there is only one hub, this number is 0.

port

Port number on the hub. On the Cisco 2505 router, port numbers range from 1 to 8. On the Cisco 2507 router, port numbers range from 1 to 16. If a second port number follows, then this port number indicates the beginning of a port range.

end-port

(Optional) Last port number of a range.

Command Default

No hub ports are configured.

Command Modes

Global configuration

Command History

Release

Modification

10.3

This command was introduced.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

12.2SX

This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.

Usage Guidelines

This command does not have a no form.

Examples

The following example enables port 1 on hub 0:

Router# hub ethernet 0 1
Router(config-hub)# no shutdown

The following example enables ports 1 through 8 on hub 0:

Router# hub ethernet 0 1 8
Router(config-hub)# no shutdown

Related Commands

Command

Description

shutdown (hub)

Shuts down a port on an Ethernet hub of a Cisco 2505 or Cisco 2507 router.

interface

To configure an interface type and to enter interface configuration mode, use the interface command in the appropriate configuration mode.

Standard Syntax

interface type number [name-tag]

Module-Specific and Platform-Specific Syntax

Analysis Module Network Module

interface analysis-module slot /unit

Content Engine Network Module

interface content-engine slot /unit

Cisco 830 Series

interface type [number]

Cisco 2600 Series

interface type slot/ { port-adapter | port . subinterface-number }

Cisco 2600 Series on Voice Interfaces

interface type slot /voice-module-slot /voice-interface-slot

Cisco 3600 Series

interface type slot/ { port | port . subinterface-number }

Cisco 3600 Series on Voice Interfaces

interface type slot /voice-module-slot /voice-interface-slot

Cisco 4400 Series Integrated Services Router (ISR)

interface type number

Cisco 7100 Series

interface type slot/ { port-adapter | port . subinterface-number }

Cisco 7200 Series and Cisco 7500 Series with a Packet over SONET Interface Processor

interface type slot /port

Cisco 7200 VXR Router Used as a Router Shelf in a Cisco AS5800 Universal Access Server

interface type router-shelf /slot /port

Cisco 7500 Series with Channelized T1 or E1

interface serial slot /port : channel-group

Cisco 7500 Series with Ports on VIP Cards

interface type slot /port-adapter /port

Cisco 7600 Series

interface type number

Note: The number format varies depending on the network module or line card type and the router’s chassis slot it is installed in. Refer to the appropriate hardware manual for numbering information

Cisco 7600 Series with Ports on Ethernet Service Cards

interface type slot /bay /port access

Note: The syntax may vary depending on the Ethernet service line card type. Refer to the appropriate hardware manual for numbering information. For example, for the ES20 line card the syntax takes the following format:

Subinterface Syntax Forms in Global Configuration Mode

Cisco 7200 Series

interface type slot /port . subinterface-number [ multipoint | point-to-point ]

Cisco 7500 Series

interface type slot /port-adapter . subinterface-number [ multipoint | point-to-point ]

Cisco 7500 Series with Ports on VIP Cards

interface type slot /port-adapter /port . subinterface-number [ multipoint | point-to-point ]

Cisco ASR 901 Series Aggregation Services Routers

no interface type number

Shared Port Adapters

interface type slot /subslot /port [ . subinterface-number ]

Syntax Description

type

Type of interface to be configured. See the table below.

number

Port, connector, or interface card number. On Cisco 830 series routers, the numberargumentspecifies the ethernet interface number. On Cisco 4700 series routers, the number argument specifies the network interface module (NIM) or network processor module (NPM) number. The numbers are assigned at the factory at the time of installation or when added to a system; they can be displayed with the showinterfaces command. For Cisco ASR 901 Series Aggregation Services Routers, the range is from 1 to 8.

name-tag

(Optional) Specifies the logic name to identify the server configuration so that multiple server configurations can be entered.

This optional argument is for use with the Redundant Link Manager (RLM) feature.

slot

Chassis slot number.

Refer to the appropriate hardware manual for slot information. For SIPs, refer to the platform-specific SPA hardware installation guide or the corresponding "Identifying Slots and Subslots for SIPs and SPAs" topic in the platform-specific SPA software configuration guide.

/ voice-module-slot

Voice module slot number. The slash(/)is required.

Refer to the “Cisco 3700 Series Routers Voice Interface Numbering” section of the “Understanding Interface Numbering and Cisco IOS Basics” chapter in the platform-specific SPA software configuration guide.

/ voice-interface-slot

Voice interface slot number. The slash(/)is required.

Refer to the “Cisco 3700 Series Routers Voice Interface Numbering” section of the “Understanding Interface Numbering and Cisco IOS Basics” chapter in the platform-specific SPA software configuration guide.

/ subslot

Secondary slot number on a SIP where a SPA is installed. The slash (/) is required.

Refer to the platform-specific SPA hardware installation guide and the corresponding "Specifying the Interface Address on a SPA" topic in the platform-specific SPA software configuration guide for subslot information.

/ unit

Number of the daughter card on the network module. For analysis module and content engine (CE) network modules, always use 0. Theslash(/)is required.

/bay

Card interface bay number in a slot. Theslash(/)is required.

Refer to the appropriate hardware manual for bay information.

/ port

Port or interface number. Theslash(/)is required.

Refer to the appropriate hardware manual for port information. For SPAs, refer to the corresponding “Specifying the Interface Address on a SPA” topics in the platform-specific SPA software configuration guide.

router-shelf

Router shelf number in a Cisco AS5800 universal access server. Refer to the appropriate hardware manual for router shelf information.

: channel-group

Channel group number. Cisco 7500 series routers specify the channel group number in the range of 0 to 4 defined with the channel-group controller configuration command.

/ port-adapter

Port adapter number. Refer to the appropriate hardware manual for information about port adapter compatibility. Theslash(/) is required.

. subinterface-number

Subinterface number in the range 1 to 4294967293. The number that precedes the period (.) must match the number to which this subinterface belongs.

access

Creates an access interface for an IP subscriber. The access interface is configured as a subinterface of the physical interface that the IP subscriber is connected to.

multipoint | point-to-point

(Optional) Specifies a multipoint or point-to-point subinterface. There is no default .

Command Default

No interface types are configured.

Command Modes

Global configuration (config)

RITE configuration (config-rite)


Note


To use this command with the RLM feature, the networking device must be in interface configuration mode.


Command History

Release

Modification

10.0

This command was introduced for the Cisco 7000 series routers.

11.0

This command was implemented on the Cisco 4000 series routers.

12.0(3)T

The optional name-tagargument was added for the RLM feature.

12.2(13)T

The content-engine keyword was added.

12.2(15)T

The lex keyword was removed because the LAN Extension feature is no longer available in Cisco IOS software.

12.2(20)S2

This command was implemented for SPAs on the Cisco 7304 router.

12.3(4)T

The serviceengine keyword was added. Support was added for the interface command to be used in RITE configuration mode to support IP trfaffic export profiles.

12.3(7)T

The analysis-module keyword was added.

12.2(22)S

Support for RITE configuration mode and IP traffic export profiles was added.

12.3(14)T

The satellite keyword was added to support satellite interface configuration on network modules.

12.2(18)SXE

This command was implemented for SPAs on the Cisco 7600 series routers and Catalyst 6500 series switches.

12.0(31)S

This command was implemented for SPAs on the Cisco 12000 series routers.

12.2(18)SXF

The tengigabitethernet keyword was added for support of the10 Gigabit Ethernet interface type.

12.2(28)SB

This command was integrated into Cisco IOS Release 12.2(28)SB.

12.2(33)SRA

This command was integrated into Cisco IOS Release 12.2(33)SRA.

Cisco IOS XE 2.1

This command was implemented on Cisco ASR 1000 series routers.

15.1(2)SNG

This command was implemented on Cisco ASR 901 Series Aggregation Services Routers.

Cisco IOS XE Release 3.9S

This command was implemented on Cisco 4400 Series ISR.

15.2(02)SA

This command was implemented on Cisco ME 2600X Series Ethernet Access Switches.

15.1(2)SNG

This command was implemented on Cisco ASR 901 Series Aggregation Services Routers.

Usage Guidelines

This command does not have a no form except for Cisco ASR 901 Series Aggregation Services Routers.

The table below displays the keywords that represent the types of interfaces that can be configured with the interface command. Replace the type argument with the appropriate keyword from the table.

Table 3 Interface Type Keywords

Keyword

Interface Type

analysis-module

Analysis module interface. The analysis module interface is a Fast Ethernet interface on the router that connects to the internal interface on the Network Analysis Module (NAM). This interface cannot be configured for subinterfaces or for speed, duplex mode, and similar parameters. See the command-line interface (CLI) help for a list of valid parameters.

async

Port line used as an asynchronous interface.

atm

ATM interface.

bri

ISDN BRI. This interface configuration is propagated to each of the B channels. B channels cannot be individually configured. The interface must be configured with dial-on-demand commands in order for calls to be placed on that interface.

content-engine

Content engine (CE) network module interface. The CE network module interface cannot be configured for subinterfaces or for speed, duplex mode, and similar parameters. See the command-line interface (CLI) help for a list of valid parameters.

Note   

The content-engine keyword was formerly documented as the interfacecontent-engine command.

dialer

Dialer interface.

ethernet

Ethernet IEEE 802.3 interface.

fastethernet

100-Mbps Ethernet interface. In RITE configuration mode, specifies the outgoing (monitored) interface for exported IP traffic.

Note   

The fastethernet keyword was formerly documented as the interfacefastethernet command.

fddi

FDDI interface.

gigabitethernet

1000-Mbps Ethernet interface.

Note   

The gigabitethernet keyword was formerly documented as the interfacegigabitethernet command.

group-async

Master asynchronous interface.

Note   

The group-async keyword was formerly documented as the interfacegroup-async command.

hssi

High-Speed Serial Interface (HSSI).

loopback

Software-only loopback interface that emulates an interface that is always up. It is a virtual interface supported on all platforms. The number argument is the number of the loopback interface that you want to create or configure. There is no limit on the number of loopback interfaces that you can create.

null

Null interface.

port-channel

Port channel interface.

Note   

The port-channel keyword was formerly documented as the interfaceport-channel command.

pos

Packet OC-3 interface on the Packet-over-SONET (POS) interface processor.

Note   

The pos keyword was formerly documented as the interfacepos command.

Satellite

Satellite network module. Enters satellite configuration mode.

sdcc

Section data communications channel interface.

serial

Serial interface.

service-engine

Network module (NM) or an Advanced Integration Module (AIM), this command may be used for NMs and AIMs only. If your system does not have this hardware, you will be unable to enter this command. The no form of this command (no interface service-engine) is not available. The exit command can be used to exit interface configuration mode.

switch

Switch interface.

tengigabitethernet

10-Gigabit Ethernet interface.

tokenring

Token Ring interface.

tunnel

Tunnel interface; a virtual interface. The number argument is the number of the tunnel interface that you want to create or configure. There is no limit on the number of tunnel interfaces that you can create.

vg-anylan

100VG-AnyLAN port adapter.

Note   

The vg-anylan keyword was formerly documented as the interfacevg-anylan command.

Creating an IP Traffic Export Profile

Ip traffic export is intended only for software switching platforms; distributed architectures are not supported.

After you configure an IP traffic export profile using the iptraffic-exportprofileglobal configuration command, you must also include the interfacecommand after the iptraffic-exportprofilecommand; otherwise, the profile will be unable to export the captured IP packets. If you do not use the interface command, you will receive a warning that indicates that the profile is incomplete.

Subinterfaces

Subinterfaces can be configured to support partially meshed Frame Relay networks. Refer to the “Configuring Serial Interfaces” chapter in the CiscoIOSInterfaceandHardwareComponentConfigurationGuide.

Using the analysis-module Keyword

The analysis module interface is used to access the NAM console for the initial configuration. After the NAM IP parameters are configured, the analysis module interface is typically used only during NAM software upgrades and while troubleshooting if the NAM Traffic Analyzer is inaccessible.

Visible only to the Cisco IOS software on the router, the analysis module interface is an internal Fast Ethernet interface on the router that connects to the internal NAM interface. The analysis module interface is connected to the router’s Peripheral Component Interconnect (PCI) backplane, and all configuration and management of the analysis module interface must be performed from the Cisco IOS CLI.

Using the group-async Keyword

Using the group-async keyword, you create a single asynchronous interface with which other interfaces are associated as members using the group-rangecommand. This one-to-many configuration allows you to configure all associated member interfaces by entering one command on the group master interface, rather than entering this command on each individual interface. You can create multiple group masters on a device; however, each member interface can be associated only with one group.

Using the port-channel Keyword

The Fast EtherChannel feature allows multiple Fast Ethernet point-to-point links to be bundled into one logical link to provide bidirectional bandwidth of up to 800 Mbps. You can configure the port-channel interface as you would any Fast Ethernet interface.

After you create a port-channel interface, you assign upto four Fast Ethernet interfaces to it. For information on how to assign a Fast Ethernet interface to a port-channel interface, refer to the channel-group command in the interface configuration mode.


Caution


The port-channel interface is the routed interface. Do not enable Layer 3 addresses on the physical Fast Ethernet interfaces. Do not assign bridge groups on the physical Fast Ethernet interfaces because doing so creates loops. Also, you must disable spanning tree.



Caution


With Release 11.1(20)CC, the Fast EtherChannel supports Cisco Express Forwarding (CEF) and distributed Cisco Express Forwarding (dCEF). We recommend that you clear all explicitiproute-cachedistributed commands from the Fast Ethernet interfaces before enabling dCEF on the port-channel interface. Clearing the route cache gives the port-channel interface proper control of its physical Fast Ethernet links. When you enable CEF/dCEF globally, all interfaces that support CEF/dCEF are enabled. When CEF/dCEF is enabled on the port-channel interface, it is automatically enabled on each of the Fast Ethernet interfaces in the channel group. However, if you have previously disabled CEF/dCEF on the Fast Ethernet interface, CEF/dCEF is not automatically enabled. In this case, you must enable CEF/dCEF on the Fast Ethernet interface.


As you work with the port-channelkeyword, consider the following points:

  • Currently, if you want to use the Cisco Discovery Protocol (CDP), you must configure it only on the port-channel interface and not on the physical Fast Ethernet interface.

  • If you do not assign a static MAC address on the port-channel interface, the Cisco IOS software automatically assigns a MAC address. If you assign a static MAC address and then later remove it, Cisco IOS software automatically assigns a MAC address.

  • The access keyword creates an ethernet channel access interface for an IP subscriber and is specific to Cisco 7600 series routers only. For more information on access interface, see IP Subscriber Interfaces.

Using the vg-anylan Keyword

The 100VG-AnyLAN port adapter provides a single interface port that is compatible with and specified by IEEE 802.12. The 100VG-AnyLAN port adapter provides 100 Mbps over Category 3 or Category 5 cable with RJ-45 terminators and supports IEEE 802.3 Ethernet packets.

You configure the 100VG-AnyLAN port adapter as you would any Ethernet or Fast Ethernet interface. The 100VG-AnyLAN port adapter can be monitored with the IEEE 802.12 Interface MIB.

Cisco ASR 901 Series Aggregation Services Routers

The first EtherChannel interface configured becomes the bundled master for all EtherChannel interfaces in the group. That is, the MAC address of the first EtherChannel interface is the MAC address for all EtherChannel interfaces in the group. If the first EtherChannel interface is removed at any time, the second EtherChannel interface becomes the bundled master by default.

Repeat this configuration on every EtherChannel port to be bundled into a Fast Ether Channel (FEC) or Gigabit Ether Channel (GEC) group. This configuration must be present on all EtherChannel interfaces before the EtherChannel group can be configured.

Cisco 4400 Series Integrated Services Router (ISR)

The Gigabit Ethernet interface allows you to perform management tasks on the router and is often referred as the management interface port. You can use the Gigabit Ethernet interface to access the router via Telnet and SSH to perform management tasks on the router. The interface is most useful before a router has begun routing, or in troubleshooting scenarios when other forwarding interfaces are inactive. You can configure a Gigabit Ethernet interface on your router using the interface GigabitEthernet0 command in Global configuration mode.

Examples

The following example configures an analysis module interface when the NAM router is in router slot 1:

Router(config)# interface analysis-module 1/0

Examples

The following example shows how to define asynchronous group master interface 0:

Router(config)# interface group-async 0

Examples

The following example configures an interface for a content engine network module in slot 1:

Router(config)# interface content-engine 1/0

Examples

The following example configures a new ethernet2interface on the LAN or on the WAN side of the Cisco 830 series router.

c837# configure terminal
 
Enter configuration commands, one per line.  End with CNTL/Z.
c837(config)# interface ethernet 2

Examples

The following example shows how to configure Ethernet port 4 on the Ethernet Interface Processor (EIP) in slot 2 on the Cisco 7500 series router:

Router(config)# interface ethernet 2/4

Examples

The following example shows how to configure the profile “corp1,” which will send captured IP traffic to host “00a.8aab.90a0” at the interface “FastEthernet 0/1.” This profile is also configured to export one in every 50 packets and to allow incoming traffic only from the access control list “ham_ACL.”

Router(config)# ip traffic-export profile corp1
Router(config-rite)# interface FastEthernet 0/1
Router(config-rite)# bidirectional
Router(config-rite)# mac-address 00a.8aab.90a0
Router(config-rite)# outgoing sample one-in-every 50
Router(config-rite)# incoming access-list ham_acl
Router(config-rite)# exit
Router(config)# interface FastEthernet 0/0
Router(config-if)# ip traffic-export apply corp1

Examples

The following example shows how to configure Fast Ethernet interface 0 on a Cisco 2600 series router:

Router(config)# interface fastethernet0/0

or

Router(config)# interface fastethernet0/0.1

Examples

The following example shows how to configure Fast Ethernet interface 0 on a Cisco 3600 series router:

Router(config)# interface fastethernet0/0

or

Router(config)# interface fastethernet0/0.1

Examples

The following example shows how to configure Fast Ethernet interface 0 for standard ARPA encapsulation (the default setting) on a Cisco 4700 series router:

Router(config)# interface fastethernet 0

Examples

The following example shows how to configure Fast Ethernet interface 0 on a Cisco 7100 series router:

Router(config)# interface fastethernet0/0

or

Router(config)# interface fastethernet0/0.1

Examples

The following example shows how to configure Fast Ethernet interface 6 on a Cisco 12000 series router:

Router(config)# interface fastethernet6/0

or

Router(config)# interface fastethernet6/0.1

Examples

The following example shows how to configure the Gigabit Ethernet interface for slot 0, port 0:

Router(config)# interface gigabitethernet 0/0

Examples

The following example shows how to configure the Gigabit Ethernet Interface. The Gigabit Ethernet Interface or the management port is always GigabitEthernet0.

Router# config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# interface gigabitethernet0
Router(config-if)#

Examples

The following example shows how to specify the second interface (1) on a Gigabit Ethernet SPA installed in the first subslot of a SIP (0) installed in chassis slot 3:

Router(config)# interface gigabitethernet 3/0/1

Examples

The following example shows how to enable loopback mode and assign an IP network address and network mask to the interface. The loopback interface established here will always appear to be up.

Router(config)# interface loopback 0
Router(config-if)# ip address 10.108.1.1 255.255.255.0

Examples

The following example shows how to specify the single Packet OC-3 interface on port 0 of the POS OC-3 port adapter in slot 2:

Router(config)# interface pos 2/0

Examples

The following example shows how to configure a partially meshed Frame Relay network. In this example, subinterface serial 0.1 is configured as a multipoint subinterface with two associated Frame Relay permanent virtual connections (PVCs), and subinterface serial 0.2 is configured as a point-to-point subinterface.

Router(config)# interface serial 0
Router(config-if)# encapsulation frame-relay
Router(config-if)# exit
Router(config)# interface serial 0/0.1 multipoint
Router(config-if)# ip address 10.108.10.1 255.255.255.0
Router(config-if)# frame-relay interface-dlci 42 broadcast
Router(config-if)# frame-relay interface-dlci 53 broadcast
Router(config-if)# exit
Router(config)# interface serial 0/0.2 point-to-point
Router(config-if)# ip address 10.108.11.1 255.255.255.0
Router(config-if)# frame-relay interface-dlci 59 broadcast

Examples

The following example shows how to create a port-channel interface with a channel group number of 1 and add two Fast Ethernet interfaces to port-channel 1:

Router(config)# interface port-channel 1
Router(config-if)# ip address 10.1.1.10 255.255.255.0
Router(config-if)# exit
Router(config)# interface fastethernet 1/0/0
Router(config-if)# channel-group 1
Router(config-if)# exit
Router(config)# interface fastethernet 4/0/0
Router(config-if)# channel-group 1

Examples

The following example configures the first interface (port 0) as a section data communications channel (SDCC) interface on a POS SPA, where the SPA is installed in the top subslot (0) of the MSC, and the MSC is installed in slot 4 of the Cisco 7304 router:

Router(config)# interface sdcc 4/3/0 
Router(config-if)# ip address 10.1.9.2 255.255.255.0 
Router(config-if)# logging event link-status 
Router(config-if)# load-interval 30 
Router(config-if)# no keepalive 
Router(config-if)# no fair-queue 
Router(config-if)# no cdp enable 

Examples

The following example shows how to configure serial interface 0 with PPP encapsulation:

Router(config)# interface serial 0
Router(config-if)# encapsulation ppp

Examples

The following example configures the second interface (port 1) on a 4-Port 10/100 Fast Ethernet SPA for standard ARPA encapsulation (the default setting), where the SPA is installed in the bottom subslot (1) of the MSC, and the MSC is installed in slot 2 of the Cisco 7304 router:

Router(config)# interface fastethernet 2/1/1

Examples

The following example shows how to configure circuit 0 of a T1 link for PPP encapsulation:

Router(config)# controller t1 4/1
Router(config-controller)# circuit 0 1
Router(config-controller)# exit
Router(config)# interface serial 4/1:0
Router(config-if)# ip address 10.108.13.1 255.255.255.0
Router(config-if)# encapsulation ppp

Examples

The following example shows how to configure the Token Ring interface processor in slot 1 on port 0 of a Cisco 7500 series router:

Router(config)# interface tokenring 1/0

Examples

The following example shows how to specify the 100VG-AnyLAN port adapter in the first port adapter in slot 1:

Router(config)# interface vg-anylan 1/0/0

Related Commands

Command

Description

channel-group

Defines the time slots that belong to each T1 or E1 circuit.

channel-group (Fast EtherChannel)

Assigns a Fast Ethernet interface to a Fast EtherChannel group.

clear interface

Resets the hardware logic on an interface.

controller

Configures an E1, J1, T1, or T3 controller and enters controller configuration mode.

group-range

Creates a list of asynchronous interfaces that are associated with a group interface on the same device.

ip traffic-export profile

Create or edit an IP traffic export profile.

mac-address

Sets the MAC layer address.

ppp

Starts an asynchronous connection using PPP.

show controllers content-engine

Displays controller information for CE network modules.

show interfaces

Displays information about interfaces.

show interfaces

Displays information about interfaces.

show interfaces content-engine

Displays basic interface configuration information for a CE network module.

shutdown (RLM)

Shuts down all of the links under the RLM group.

slip

Starts a serial connection to a remote host using SLIP.

interface fastethernet

The interfacefastethernetcommand is now documented as the fastethernetkeyword of the interface command. For more information, see the interface command.

interface gigabitethernet

The interfacegigabitethernetcommand is now documented as the gigabitethernetkeyword of the interface command. For more information, see the interface command.

interface port-channel

The interfaceport-channel command is now documented as the port-channelkeyword of the interface command. For more information, see the interface command.

interface range

To execute commands on multiple subinterfaces at the same time, use the interfacerange command in global configuration mode.

interface range { type number [ [-interface number ] ] [,]... type number | macro word }

no interface range type number

Syntax Description

type number

Interface type and interface or subinterface number. For more information about the numbering syntax for your networking device, use the question mark (?) online help function.

  • You can enter any number of interface type and numbers.

- interface-number

(Optional) Ending interface number.

,

Allows you to configure more interface types.

macro

Specifies a macro keyword.

word

Previously defined keyword, up to 32 characters long.

Command Default

No interface range is set.

Command Modes

Global configuration (config)

Command History

Release

Modification

12.0(7)XE

This command was introduced.

12.1(5)T

This command was integrated into Cisco IOS Release 12.1(5)T.

12.2(2)DD

This command was expanded to support subinterface ranges.

12.2(4)B

This command was integrated into Cisco IOS Release 12.2(4)B.

12.2(8)T

This command was integrated into Cisco IOS Release 12.2(8)T.

12.2(18)SX

This command was integrated into Cisco IOS Release 12.2(18)SX.

12.2(33)SXH

The create keyword was added to enable the creation of VLANs that operate within a specified range of physical interfaces.

Usage Guidelines

Configuration Changes

All configuration changes made to a range of subinterfaces are saved to NVRAM, but the range itself does not get saved to NVRAM. Use the defineinterfacerange command to create and save a range.

You can enter the range in two ways:

  • Specifying up to five interface ranges

  • Specifying a previously defined macro

You can specify either the interfaces or the name of a range macro. A range must consist of the same interface type, and the interfaces within a range cannot span slots.

You cannot specify both the interfacerangeand macro keywords in the same command. After creating a macro, the command does not allow you to enter additional ranges. Likewise, if you have already specified an interface range, the command does not allow you to enter a macro.

The spaces around the hyphen in the interfacerange command syntax are required. For example, using a Catalyst 6500 router, the command interfacerangefastethernet1-6is valid; the command interfacerangefastethernet1-6is not valid.

VLANs

When you define a Catalyst VLAN, valid values are from 1 to 4094. The last VLAN number cannot exceed 4094.

You cannot use the interfacerange command to create switch virtual interfaces (SVIs) in that particular range. You can use the interfacerange command only to configure existing VLAN SVIs within the range. To display VLAN SVIs, enter the showrunning-config command. VLANs not displayed cannot be used in the interfacerange command.

The commands entered under theinterfacerange command are applied to all existing VLAN SVIs within the range.

You can enter the command interfacerangecreatevlanx-y to create all VLANs in the specified range that do not already exist. If you are using discontiguous VLANs, you can use the interfacerangevlan command to configure multiple SVIs without creating unneeded SVIs and wasting interface descriptor blocks (IDBs).

After specifying a VLAN range, you can continue using the interfacerange command to specify another interface (ATM, FastEthernet, GigabitEthernet, loopback, port-channel, or tunnel).

Examples

Examples

The following example shows how to use the interfacerange command to configure a Fast Ethernet range:

Router(config)# interface range fastethernet 5/1 - 4
 

The following example configures the Fast Ethernet subinterfaces within the range 5/1.1 to 5/1.4 and applies the following VLAN IDs to those subinterfaces:

Fast Ethernet5/1.1 = VLAN ID 301 (vlan-id)
Fast Ethernet5/1.2 = VLAN ID 302 (vlan-id = 301 + 2 - 1 = 302)
Fast Ethernet5/1.3 = VLAN ID 303 (vlan-id = 301 + 3 - 1 = 303)
Fast Ethernet5/1.4 = VLAN ID 304 (vlan-id = 301 + 4 - 1 = 304)
Router(config)# interface range fastethernet 5/1 - 4
 
Router(config-if-range)# encapsulation dot1q 301
Router(config-if-range)# no shutdown
 
Router(config-if)#
*Oct  6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/1.1, changed state to up
*Oct  6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/1.2, changed state to up
*Oct  6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/1.3, changed state to up
*Oct  6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet5/1.4, changed state to up
*Oct  6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1.1, changed state to up
*Oct  6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1.2, changed state to up
*Oct  6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1.3, changed state to up
*Oct  6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet5/1.4, changed state to up

Examples

The following example shows how to set a Gigabit Ethernet range:

Router(config)# interface range gigabitethernet 1/1 - 6

Examples

The following example shows how to use the loopback interface:

Router(config)# interface range loopback 34567

Examples

The following example shows how to use the tunnel interface:

Router(config)# interface range tunnel 55555

Examples

The following example shows how to use the port-channel interface:

Router(config)# interface range port-channel 100

Examples

The following example shows how to set a VLAN:

Router(config)# interface range vlan 123

The following example shows how to create a range of VLANs:

Router(config)# interface range create vlan 4

Examples

The following example shows how to execute a range macro:

Router(config)# interface range macro macro1

Related Commands

Command

Description

define interface range

Defines an interface range macro.

encapsulation dot1q

Applies a unique VLAN ID to each subinterface within the range.

interface vlan

Configures a VLAN interface.