Port Basic Configuration

Overview of Basic Port Settings

You can perform the following basic settings on a port:

  • Entering interface configuration mode: Interface configuration mode is supported only on Ethernet ports.

  • Enabling a port: By default, all device ports are enabled or in link-up state when a device is online. However, for security reasons, certain ports are disabled or in link-down state even when a device is online.

  • Configuring port description: You can configure a port's description to identify the port.

  • Configuring port speed: You can configure a port's speed to configure the rate of data flow.

  • Configuring speed control: For every 2-Gigabits ports that are connected, and speeds configured in force mode, you need to configure one port in primary mode and the other in secondary mode to enable them to dock successfully.

How to Configure Basic Port Settings

The following sections provide configuration information for basic port settings.

Enter Interface Configuration Mode

To enter interface configuration mode, perform this procedure.

Procedure

  Command or Action Purpose
Step 1

enable

Example:

Device> enable 

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal 

Enters global configuration mode.

Step 3

interface ethernet port-number

Example:

Device(config)# interface ethernet 1/1

Enters interface configuration mode

Step 4

interface range ethernet port-number to ethernet port-number

Example:

Device(config-if-ethernet-1/1)# interface range ethernet 1/1 to ethernet 1/4 

Enters bulk port mode.

Enable a Port

To enable a port, perform this procedure.

Procedure

  Command or Action Purpose
Step 1

enable

Example:

Device> enable 

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal 

Enters global configuration mode.

Step 3

interface ethernet port-number

Example:

Device(config)# interface ethernet 1/1

Enters interface configuration mode.

Step 4

no shutdown

Example:

Device(config-if-ethernet-1/1)# no shutdown 

Enables the port.

Use the shutdown command to disable the port.

Configure an Interface Description

To configure an interface description, perform this procedure.

Procedure

  Command or Action Purpose
Step 1

enable

Example:

Device> enable 

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal 

Enters global configuration mode.

Step 3

interface ethernet port-number

Example:

Device(config)# interface ethernet 1/1 

Enters interface configuration mode

port-number : The port ID.

Step 4

[no] description string

Example:

Device(config-if-ethernet-1/1)# description cisco 

Configures an interface description.

string : The port description. The format is string. Range is from 1 to 128.

Use the no description command to delete the interface description.

Configure Interface Speed

To configure interface speed, perform this procedure.

Procedure

  Command or Action Purpose
Step 1

enable

Example:

Device> enable 

Enables privileged EXEC mode.

Enter your password, if prompted.

Step 2

configure terminal

Example:

Device# configure terminal 

Enters global configuration mode.

Step 3

interface ethernet port-number

Example:

Device(config)# interface ethernet 1/1 

Enters interface configuration mode.

Step 4

[no] speed {1000 | 10000 | auto}

Example:

Device(config-if-ethernet-1/1)# speed 1000 

Configures the interface speed.

  • 1000 : Port speed is 1000, in Mbps

  • 10000 : Port speed is 10000, in Mbps

  • auto : Port speed is automatic.

Use the no speed command to restore the default speed. The default is 10000.

Monitor Interfaces

Use the following commands to monitor interfaces.

Table 1. Commands to Monitor Interfaces

Command

Purpose

show interface ethernet port-number

Display the interface's detailed configurations.

show interface brief ethernet port-number

Display the interface's brief configurations.

show description interface ethernet port-number

Displays the interface description.

show port-control mode

Displays the configured port-control mode.

Configuration Example: Basic Port Settings

The following example shows how to configure the description.

Device> enable
Device# configure terminal 
Device(config)# interface ethernet 1/1
Device(config-if-ethernet-1/1)# description test
Device(config-if-ethernet-1/1)# exit

The following example shows how to modify the priority:

Device(config)# interface ethernet 1/1
Device(config-if-ethernet-1/1)# priority 7
Device(config-if-ethernet-1/1)# exit

The following example shows how to configure the interface-only accept tag frame:

Device(config)# interface ethernet 1/1
Device(config-if-ethernet-1/1)#  ingress acceptable-frame tagged
Device(config-if-ethernet-1/1)# exit

The following example shows how to disable ingress filtering:

Device(config)# interface ethernet 1/1
Device(config-if-ethernet-1/1)#  no ingress filtering 
Device(config-if-ethernet-1/1)#  exit

The following example shows how to create VLAN 100, and only include interface 2 with interface 2 adopting trunk mode:

Device(config)#  vlan 100
Device(config-if-vlan)#  switchport ethernet 1/2
Device(config-if-vlan)#  interface ethernet 1/2
Device(config-if-ethernet-1/2)# switchport mode trunk
Device(config-if-ethernet-1/2)# exit