Interface Configuration Commands
Table of Contents
Table of Contents
Chapter 1 Interface Configuration Commands .................................................................................. 1
1.1 Interface Configuration Commands ..................................................................................... 1
1.1.1 interface..................................................................................................................... 1
1.1.2 description ................................................................................................................. 2
1.1.3 bandwidth .................................................................................................................. 3
1.1.4 delay .......................................................................................................................... 3
1.1.5 shutdown ................................................................................................................... 4
1.1.6 show interface ........................................................................................................... 5
1.1.7 show running-config interface ................................................................................... 6
1.2 Configuration Example ........................................................................................................ 7
-I-
Interface Configuration Commands
Chapter 1 Interface Configuration Commands
1.1 Interface Configuration Commands
The following are interface configuration commands:
Interface
description
bandwidth
delay
shutdown
show interface
show running-config interface
1.1.1 interface
Syntax
[no] interface port
To enter the interface configuration mode, run the above-mentioned command. If the
logical port is inexistent, you have to create this port first and then enter the port mode.
If the physical port is inexistent, the command will fail to be executed. The negative
form of this command has different functions for the physical port and the logical port.
The no interface physical-port command is used to resume the default settings of
the physical port.
The no interface logical-port command is used to delete the logical port.
Parameter
Parameter Description
Port Stands for the existent physical or logical port.
Default value
The default mode is not the port mode.
-1-
Interface Configuration Commands
Remarks
When you execute this command in configuration mode, you have to enable this
command to be in port configuration mode first. When the port command is configured,
you shall use the exit command to exit from the port mode.
Example
The following example shows how to enter the port mode of port g0/1.
Switch_config#
Switch_config#interface gigaEthernet0/1
Switch_config_g0/1#exit
Switch_config#
1.1.2 description
Syntax
[no] description line
To set the description information of a port, run the above-mentioned command.
Parameter
Parameter Description
Stands for the character string of the description information,
line
among which space may exist.
Default value
There is no description information by default.
Remarks
This command is configured in port configuration mode.
Example
The following example shows how to set the description information of port g0/1 to up
link.
Switch_config# interface gigaEthernet0/1
Switch_config_g0/1# description uplink
-2-
Interface Configuration Commands
1.1.3 bandwidth
Syntax
[no] bandwidth kilobps
To set the bandwidth of an interface, ran the above-mentioned command.
Parameter
Parameter Description
Means the bandwidth of port, which ranges from 1 to 10000000
kilobps
kbps.
Default value
The default bandwidths of the 100M port, gigabit port and 10G port are 100000kbps,
1000000kbps and 10000000kbps respectively.
Remarks
This command is configured in port configuration mode.
Note:
The configured bandwidth does not mean the actual bandwidth of a port, but is used
by some protocol to calculate the port cost.
Example
The following example shows how to set port g0/1 to 10000000.
Switch_config # interface gigaEthernet0/1
Switch_config_g0/1# bandwidth 10000000
1.1.4 delay
Syntax
[no] delay tensofmicroseconds
To set the delay of an interface, run the above-mentioned command.
Parameter
Parameter Description
-3-
Interface Configuration Commands
tensofmicroseconds 端口延迟,取值范围为1-10000000 (十微秒)。
Default value
The default value of the delay is 1.
Remarks
This command is configured in port configuration mode.
Example
The following example shows how to set the delay of an interface to 10.
Switch_config_g0/1# delay 10
1.1.5 shutdown
Syntax
[no] shutdown
To close a port, run shutdown; to restart a port, run no shutdown.
Parameter
N/A
Default value
The physical port is in enabled status by default.
Remarks
This command can be used in port mode to open or close a port.
Example
The following example shows how to enable port g0/1.
Switch_config_g0/1#
Switch_config_g0/1# no shutdown
Switch_config_g0/1#
-4-
Interface Configuration Commands
1.1.6 show interface
Syntax
show interface <port>
To browse the state of an interface, run the above-mentioned command.
Parameter
Parameter Description
Port Name of an interface If a specific port is not in the command,
the system will show the statuses of all ports.
Default value
N/A
Remarks
This command can be used in EXEC and configuration modes to show the physical
status and packet reception statistics of a port.
Example
The following example shows the information about port g0/1:
Switch_config# show interface gigaEthernet 0/1
GigaEthernet0/1 is administratively down, line protocol is down
Hardware is Giga-Combo-FX, address is 00e0.0fe4.d083 (bia 00e0.0fe4.d083)
MTU 1500 bytes, BW 1000000 kbit, DLY 10 usec
Encapsulation ARPA
Auto-duplex, Auto-speed
flow-control off
5 minutes input rate 0 bits/sec, 0 packets/sec
5 minutes output rate 0 bits/sec, 0 packets/sec
Received 0 packets, 0 bytes
0 broadcasts, 0 multicasts
0 discard, 0 error, 0 PAUSE
0 align, 0 FCS, 0 symbol
0 jabber, 0 oversize, 0 undersize
0 carriersense, 0 collision, 0 fragment
0 L3 packets, 0 discards, 0 Header errors
Transmited 0 packets, 0 bytes
0 broadcasts, 0 multicasts
0 discard, 0 error, 0 PAUSE
-5-
Interface Configuration Commands
0 sqettest, 0 deferred
0 single, 0 multiple, 0 excessive, 0 late
0 L3 forwards
1.1.7 show running-config interface
Syntax
show running-config interface port
To display the settings of a port, run the above-mentioned command.
Parameter
Parameter Description
Port Stands for the existent port.
Default value
N/A
Remarks
This command can be executed in EXEC or configuration mode to browse the settings
of a port.
Example
The following example shows the settings of port g1/1:
Switch_config#show running-config interface g0/1
Building configuration...
Current configuration:
!
interface GigaEthernet0/1
shutdown
description uplink
bandwidth 10000000
delay 10
Switch_config#
-6-
Interface Configuration Commands
1.2 Configuration Example
The following example shows how to create a VLAN port, set its description information
and IP address and browse the status and settings of this port.
Switch_config#
Switch_config# interface vlan1
Switch_config_v1# description uplink
Switch_config_v1#
Switch_config_v1# ip address 192.168.1.1 255.255.255.0
Switch_config_v1# exit
Switch_config#
Switch_config# show running-config interface vlan1
Building configuration...
Current configuration:
interface VLAN1
description uplink
ip address 192.168.1.1 255.255.255.0
Switch_config# show interface vlan1
VLAN1 is up, line protocol is down
Description uplink
Hardware is EtherSVI, Address is 00e0.0fe4.d06a(00e0.0fe4.d06a)
Interface address is 192.168.1.1/24
MTU 1500 bytes, BW 1000000 kbit, DLY 2000 usec
Encapsulation ARPA
ARP type: ARPA, ARP timeout 04:00:00
Peak input rate 0 pps, output 0 pps
0 packets input, 0 bytes
Received 0 broadcasts, 0 multicasts
0 mpls unicasts, 0 mpls multicasts, 0 mpls input discards
-7-
Interface Configuration Commands
0 input errors, 0 input discards
0 packets output, 0 bytes
Transmited 0 broadcasts, 0 multicasts
0 mpls unicasts, 0 mpls multicasts, 0 mpls output discards
0 output errors, 0 discards
Switch_config#
-8-