3.1. Configuring Interface
Overview
Function Introduction
Interface status, speed and duplex are configurable.
When the interface is configured as no shutdown
, it can work
normally after cable is connected. When the interface is configured as shutdown
, no matter the cable is connected or not, the interface can not work.
If the device supports combo-port, user can choose to enable copper or fiber mode. The two modes of one port can not work together at same time. The configuration of speed or duplex at combo ports cannot be effective when combo port is working at fiber mode.
The rule of physical port name is as following: interface name format is eth-[slot]-[port]; [slot] is 0 for single pizza-box switch; when stacking is enabled, the [slot] number is according to the configuration. The [port] number is begin with 1, and increase from up to down, from left to right. The following figure shows the interface name of the device:
To get more information about the interface type and number please reference to the product spec.
Principle Description
N/A
Configuration
Configuring Interface State
step 1 Enter the configure mode
Switch# configure terminal
step 2 Turn on an interface
Switch(config)# interface eth-0-1
Switch(config-if)# no shutdown
step 3 Shut down an interface
Switch(config-if)# interface eth-0-2
Switch(config-if)# shutdown
step 4 Exit the configure mode
Switch(config-if)# end
step 5 Validation
Use the following command to display the status of the interfaces:
Switch# show interface status
Port Status Duplex Speed Mode Type
------------------------------------------------------------
eth-0-1 up a-full a-1000 access 1000BASE_T
eth-0-2 admin down auto auto access 1000BASE_T
Configuring Interface Speed
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set the speed
Set speed of interface eth-0-1 to 100M:
Switch(config)# interface eth-0-1
Switch(config-if)# speed 100
Switch(config-if)# no shutdown
Set speed of interface eth-0-2 to 1000M:
Switch(config-if)# interface eth-0-2
Switch(config-if)# no shutdown
Switch(config-if)# speed 1000
Set speed of interface eth-0-3 to auto:
Switch(config-if)# interface eth-0-3
Switch(config-if)# no shutdown
Switch(config-if)# speed auto
step 3 Exit the configure mode
Switch(config-if)# end
step 4 Validation
Use the following command to display the status of the interfaces:
Switch# show interface status
Port Status Duplex Speed Mode Type
------------------------------------------------------------
eth-0-1 up a-full 100 access 1000BASE_T
eth-0-2 up a-full 1000 access 1000BASE_T
eth-0-3 up a-full a-1000 access 1000BASE_T
Configuring Interface Duplex
There are 3 duplex mode supported on the device:
full mode: the interface can transmit and receive packets at same time.
half mode: the interface can transmit or receive packets at same time.
auto mode: the interface should negotiate with the other side to decide the duplex mode.
User can choose proper duplex mode according to the network state.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set the duplex
Set duplex of interface eth-0-1 to full:
Switch(config)# interface eth-0-1
Switch(config-if)# no shutdown
Switch(config-if)# duplex full
Set duplex of interface eth-0-1 to half:
Switch(config-if)# interface eth-0-2
Switch(config-if)# no shutdown
Switch(config-if)# duplex half
Set duplex of interface eth-0-1 to auto:
Switch(config)# interface eth-0-3
Switch(config-if)# no shutdown
Switch(config-if)# duplex auto
step 4 Validation
Use the following command to display the status of the interfaces:
Switch# show interface status
Port Status Duplex Speed Mode Type
------------------------------------------------------------
eth-0-1 up full a-1000 access 1000BASE_T
eth-0-2 up half a-100 access 1000BASE_T
eth-0-3 up a-full a-1000 access 1000BASE_T
Application cases
N/A