
White Paper
All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 21 of 51
IOS(config)#int range fa3/1—48,gi1/1—2
IOS(config-if)#switchport
IOS(config-if)#switchport mode access
IOS(config-if)#switchport access vlan 2
IOS(config-if)#spanning-tree portfast
IOS(config-if)#no shut
Note: For Cisco IOS Software images before Release 12.2(18)SXE, the space before the dash
is required, up to five comma-separated ranges are supported, and spaces are not required before
or after the comma.
The range command works for Fast Ethernet, Gigabit Ethernet, and 10 Gigabit Ethernet interfaces
as seen above. It also works with VLAN interfaces if the SVIs are created:
IOS(config)#int range vlan2—4
IOS(config-if)# description Floor 1 access VLANs
Interface Range Macros can be used to identify frequently grouped ports. A specific range of
ports is defined in a macro and given a name. After the macro is created, the macro name can be
used to refer to the port grouping rather than explicitly typing in each port. This is useful when
configuration changes frequently apply to the same group of ports (for example, all 10/100 server
ports). This feature is not available in the Cisco Catalyst OS. The following example defines an
interface-range macro named “servers” that corresponds to ports 3/1 through 3/8.
IOS# configure terminal
IOS(config)#define interface-range servers fastethernet 3/1—8
IOS(config)#int range macro servers
IOS(config-if-range)#
To display the macro:
IOS# show running-config | include define
define interface-range servers fastethernet 3/1—8
Monitoring Interfaces in the Cisco Catalyst OS and Cisco IOS Software
The following commands are commonly used for monitoring interfaces:
CatOS> (enable) show port
Port Name Status Vlan Duplex Speed Type
----- -------------------- ---------- ---------- ------ ----- -------
1/1 connected 1 full 1000 1000BaseSX
1/2 notconnect 1 full 1000 No Connector
11/1 notconnect 1 auto auto 10/100/1000
11/2 notconnect 1 auto auto 10/100/1000
11/3 notconnect 1 auto auto 10/100/1000
11/4 notconnect 1 auto auto 10/100/1000
11/5 notconnect 1 auto auto 10/100/1000
11/6 notconnect 1 auto auto 10/100/1000
11/7 notconnect 1 auto auto 10/100/1000
11/8 notconnect 1 auto auto 10/100/1000
Komentáře k této Příručce