Switchport basic configuration

In this article we will talk about how to troubleshoot, choose, and configure an interface/s on an IOS based switch.

Interface surveying

You have multiple tools to list the status and different parameters of all interfaces on an IOS based switch, or module.

show interfaces status

This command will show:

Port
Port number
Name
Name of the interface as defined using the description command
Status
Status of the interface

Vlan :VLAN number the interface belongs to

Duplex
Duplex status
Speed
Operational speed of the interface
Type
Physical media type

* For example

Port Name Status Vlan Duplex Speed Type

Fa0/1 > To the GW connected trunk a-full a-100 10/100BaseTX

You can show the error status of all interfaces:

show interfaces status err-disable

Or interfaces status of single module:

show interfaces status module

Or status for a single interface:

show interfaces {type mod/num} status

You can also show the configuration of an interface by showing the running-config relates to that interface:

show running-config interface {type mod/num}

Selecting interfaces

Either by selecting single interface:

interface {type mod/num}

Or by selecting multiple interfaces contiguously:

interface range {type mod/start num - end num}

  • For example, selecting interfaces from 1 to 5

interface range fastethernet 0/1 - 5

Or non-contiguously:

interface range {type mod/start num - end num , num}

  • For example, selecting interfaces from 1 to 5, 9 and 17 from the first module, 15 to 21, 25 and 29 from the second module.

interface range fastethernet 0/1 - 5 , 9 , 17 , fastethernet 1/15 - 21 , 25 , 29

If you repeatedly configure multiple interfaces like in previous example, and have to select them very often, you can simplify this operation by defining a macro:

Defining macros

define interface-range laith fastethernet 0/1 - 5 , 9 , 17 , fastethernet 1/15 - 21 , 25 , 29

Then simply instead of choosing the interfaces, just type the name of the group defined in the macro.

Basic interfaces configuration

You better hard code all essential configuration of interfaces on both sides to avoid mismatch parameters.

interface fastethernet 0/1 - 48

duplex {auto|full|half}
speed {auto|10|100|1000}
mdix auto
no shutdown

To be continued

Assigned Categories

Referenced By

  • None