Section 4-2. Port Selection


4-2. Port Selection

  • When configuring a Layer 2 port or interface, the port must first be selected or identified.

  • COS switches allow a single port, a list of ports, a range of ports, or a combination of these in a single command.

  • IOS switches allow only a single interface to be specified at a time.

  • Catalyst 6000 IOS switches allow a range of interfaces to be defined. Any subsequent interface configuration commands are applied to the range of interfaces.

Configuration

1.

Select a port:

COS

 set ... mod/port ... 

IOS

 (global) interface type mod/num 


A COS switch port is identified by its module number mod and port number port. This nomenclature applies to any COS port command. An IOS switch port is called an interface, and is identified by its type (fastethernet, gigabitethernet, and so on), module number mod, and port number num.

TIP

Often, you will make the same configuration changes to several ports on a switch. On a COS switch, you can easily reference multiple ports in a single command (see the next step). However, IOS switches only allow interfaces to be configured one at a time. This makes changing the access VLAN or port speed on all 48 ports of a Catalyst 3548XL switch very tedious.

Instead of typing in 48 individual port configurations, consider using a text editor on a PC to create a configuration template. You can copy and paste commands and use global change or replace functions to change large numbers of parameters. Then you can copy and paste the file into a terminal emulator or upload the file into the switch through TFTP.

Another alternative is to use the web interface into a cluster of switches. Individual port configuration changes can be quickly made using the graphical tools.

2.

Select a range of ports:

COS

 set ... mod/port ... 

IOS

 (global) interface range port-range 

-OR-

 (global) define interface-range macro-name port-range (global) interface range macro macro-name 


COS switches allow multiple ports to be specified by separating them with commas (no spaces). A range of port numbers on the same module can be given by separating them with a dash. For example, module 4 port 1 and module 5 port 1 would be listed as 4/1,5/1; whereas ports 1 through 4 on modules 4 and 5, along with module 6, port 3 would be specified as 4/1-4,5/1-4,6/3. You can use a list or range of ports wherever a module and port number are needed in any COS command.

The Catalyst 6000 IOS switches allow lists or ranges of interfaces to be given once, so that subsequent commands are applied to each of the interfaces. A port-range is defined as the interface type (ethernet, fastethernet, gigabitethernet, tengigabitethernet, or vlan) followed by the module number, a slash (/), and the starting port number. The end of the range is given by a space, a hyphen, another space, and the ending port number. If additional ranges are given, the ranges must be separated by a comma.

The basic range format is type slot/first-port - last-port [,type slot/first-port - last-port ...], where up to five different ranges can be listed. Following the interface range command, you are placed into interface configuration mode.

If you need to make several configuration changes to a range of interfaces, you can define a macro that contains a list of interface ranges. Use the define interface-range command, with a macro-name (arbitrary text name) and a port-range (list of interface ranges as defined earlier). This macro can be saved in the switch configuration so that it can be referenced in the future. To invoke the interface range macro, use the interface range macro command, along with the macro-name.

Port Selection Example

Module 1 ports 1 and 2, along with module 6 ports 1 through 4, are to have their port speed set to autonegotiate mode. (Any port configuration function could be used; port speed is shown here only as a demonstration of port selection.) The COS switch allows all the ports to be configured in a single command. The IOS switch (Catalyst 2900/3500XL) must have each interface configured individually. Finally, the Catalyst 6000 IOS switch allows the ports to be identified as two ranges and their speeds to be set with a single interface configuration command:

COS

 set port speed 1/1-2,6/1-4 auto 

IOS

 (global) interface gig 1/1 (interface) speed auto (global) interface gig 1/2 (interface) speed auto (global) interface gig 6/1 (interface) speed auto (global) interface gig 6/2 (interface) speed auto (global) interface gig 6/3 (interface) speed auto (global) interface gig 6/4 (interface) speed auto 

Catalyst 6000 IOS

[View full width]

 (global) interface range gigabitethernet 1/1  2 , gigabitethernet 6/1  4 (interface) speed auto 

-OR-

[View full width]

 (global) define interface-range AnnexPorts  gigabitethernet 1/1  2, gigabitethernet 6/1  4 (global) interface range macro AnnexPorts (interface) speed auto 




Cisco Field Manual. Catalyst Switch Configuration
Cisco Field Manual. Catalyst Switch Configuration
ISBN: 1587050439
EAN: N/A
Year: 2001
Pages: 150

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net