0% found this document useful (0 votes)
25 views

02-Interface Configuration Commands

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

02-Interface Configuration Commands

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Interface Configuration Commands

Table of Contents

Table of Contents
Chapter 1 Interface Configuration Commands ................................................................................... 1
1.1 Interface Configuration Commands ...................................................................................... 1
1.1.1 async mode ................................................................................................................ 2
1.1.2 bandwidth ................................................................................................................... 2
1.1.3 channel-group ............................................................................................................ 3
1.1.4 clock ........................................................................................................................... 4
1.1.5 controller E1 ............................................................................................................... 5
1.1.6 delay ........................................................................................................................... 6
1.1.7 description .................................................................................................................. 6
1.1.8 duplex ......................................................................................................................... 7
1.1.9 encapsulation ............................................................................................................. 8
1.1.10 framing...................................................................................................................... 9
1.1.11 interface .................................................................................................................. 10
1.1.12 linecode .................................................................................................................. 12
1.1.13 mtu.......................................................................................................................... 13
1.1.14 physical-layer mode ............................................................................................... 13
1.1.15 physical-layer speed............................................................................................... 14
1.1.16 physical-interface fiber ......................................................................................... 15
1.1.17 show interface ........................................................................................................ 16
1.1.18 shutdown (E1 controller) ........................................................................................ 17
1.1.19 shutdown (interface) ............................................................................................... 18
1.1.20 speed ...................................................................................................................... 18
1.1.21 tunnel ...................................................................................................................... 19

-I-
02-Interface Configuration Commands

Chapter 1 Interface Configuration Commands


Basic commands for different interface types are described in this document. For
detailed configuration, see the content in the following table:

Type Reference Content

General interface Interface Configuration Introduction

Ethernet interface Configuring the Ethernet Interface

Serial interface Configuring Serial Interface

Logic interface Configuring Logic Interface

Dialer interface Configuring Dialer Interface

E1 interface Configuring E1 Interface

1.1 Interface Configuration Commands


The interface configuration commands include:
 
 async mode
 
 bandwidth
 
 channel-group
 
 clock
 
 controller E1
 
 description
 
 duplex
 
 encapsulation
 
 framing
 
 interface
 
 linecode
 
 mtu
 
 physical-layer mode
 
 physical-layer speed
 
 physical-interface fiber
 
 show interface
 
 shutdown (E1 controller)
 
 shutdown (interface)
 
 speed
 
tunnel

-1-
02-Interface Configuration Commands

1.1.1 async mode

To set the communication mode of the asynchronous port, run the following command:
[no] async mode [interactive | dedicated] [reverse-telnet]

Parameter

Parameter Description

interactive Uses the port as a command-interactive port. All users connecting the port
through the back-to-back cable or the Modem dialer connection can
configure the router (similar to the console port).

dedicated The port can be generally used in package mode of the link layer, such as
PPP.

reverse-telnet Enables the port for reverse telnet. It is configured only after the
interactive parameter is configured.

Default

None

Command mode

Port configuration mode (asynchronous)

Example

router_conf_s1/0#physical-layer mode async


router_conf_s1/0#async mode interactive
The previous example shows how to modify port S1/0 to the interactive mode. Port
S1/0 corresponds to an asynchronous line, line tty 1. You can perform corresponding
configuration on line tty 1.

1.1.2 bandwidth

To configure the bandwidth value, run bandwidth kilobps. You can run no terminal
length to resume the default value.
bandwidth kilobps
no bandwidth

Parameter

Parameter Description

Kilobps Set bandwidth whose unit is kilobps For the Ethernet interface, the entered
value is 10,000.

-2-
02-Interface Configuration Commands

Default

The default bandwidth value is set during interface creation. You can run show
interface to display relative information about the interface or run bandwidth ? to
show information in the “<minimum value-maximum value [current value]>” format.

Command mode

Interface configuration mode

Instruction

The bandwidth command is set with only one information parameter. You cannot use
this command to set the actual bandwidth of the interface. For some media such as
Ethernet, the bandwidth is fixed. For other media such as serial line, you can modify
the actual bandwidth by rearranging the hardware. For these two types of media, you
can run bandwidth to transmit the current bandwidth to the upper-layer protocol.
Note:
It is a routing parameter which does not affect the actual communication rate of the
physical interface. You need physical-layer speed to set the actual communication
run rate.

Example

The following example shows how to set the bandwidth of the E1 port.
!
interface serial
1/0 bandwidth
2000
!

Related command

show interface
physical-layer speed

1.1.3 channel-group
To configure the channel of the E1 port, run channel-group. The channel can occupy
any undistributed time slot and merge any time slot. After the E1 channel is configured,
new interface is generated. You can use the “no” form of the command to clear the
channel and the corresponding interface.
channel-group channel-group timeslots { number | number1-number2 } [,number |
number1-number2 ... ]
no channel-group channel-group

Parameter

Parameter Description

channel-group Number of the E1 channel, ranging between 0 to 30

-3-
02-Interface Configuration Commands

number,number1,n Number of the E1 time slot, ranging between 1 and 31. It can be arranged
umber2... randomly.

Default

None

Command mode

E1 configuration mode

Instruction

Under the channelized mode of the E1 interface, after the channel-group parameter is
configured, the system generates a new interface. The logic characteristics of the new
interface are same to those of the synchronous port. Its name is
serial<slot>/<group>:<channel-group> among which <slot>/<group> is same to
controller E1 <slot>/<group>.
Under the unchannelized mode of the E1 interface, the system generates a new
interface. Its name is serial<slot>/<group>:0.
You can encapsulate the link-layer protocols such as PPP and HDLC.

Example

The following example shows how to configure one channel:


Router_config#controller E1 2/0
Router_config_controller_E1_2/0#channel 0 timeslots 1-31
Router_config_controller_E1_2/0#interface s2/0:0
Router_config_interface_s2/0:0#
The following example shows how to delete channel 0:
Router_config#controller E1 2/0
Router_config_controller_E1_2/0#no channel 0

Related command

controller E1

1.1.4 clock

To configure the synchronous mode of the link, run clock. You can use the “no” form
of the command to resume the default synchronous signal.
clock {external|internal}
no clock

Parameter

Parameter Description

external Sets the synchronous signal of the reception line for the link.

-4-
02-Interface Configuration Commands

internal Sets the synchronous signal within the chip for the link.

Default

The synchronous signal of the reception line is used.

Command mode

E1 configuration mode

Example

The following example shows how to set the synchronous signal within the chip for the
link:
Router_config#controller E1 2/0
Router_config_controller_E1_2/0#clock internal

Related command

None

1.1.5 controller E1
To configure the E1 interface, run controller E1.
controller E1 <slot>/<group>

Parameter

Parameter Description

slot Number of the slot where the E1 controller lies

group Number of the link of the E1 controller

Default

None

Command mode

Global configuration mode

Instruction

To configure the E1 interface, you need run controller E1 in global configuration mode
to enter the E1 configuration mode.

Example

The following example shows how to configure E1 2/0.


Router_config#controller E1 2/0
Router_config_controller_E1_2/0#

-5-
02-Interface Configuration Commands

Related command

framing
channel-group

1.1.6 delay

To set the delay of the interface, run delay. You can run no delay to resume the
default value.
delay tens-of-microseconds
no delay

Parameter

Parameter Description

tens-of-microsecon Delay of the designated interface, whose unit is ten microseconds


ds

Default

The default delay is set during interface creation. You can run show interface to
display relative information about the interface or run delay ?to show information in
the “<minimum value-maximum value [current value]>” format.

Command mode

Interface configuration mode

Instruction

The delay command is set with only one information parameter. You cannot use this
command to set the actual delay of the interface. The delay command is used only
when the configured delay is transferred to the upper-level protocol.

Example

The following example shows how to set the serial interface 1/2 to a delay of 3000
microseconds:
!
interface serial 1/2
delay 300
!

Related command

show interface

1.1.7 description

To set the description of the interface, run description. To delete the description
information about the interface, run no description.

-6-
02-Interface Configuration Commands

description line
no description

Parameter

Parameter Description

line Description of the designated interface, which can be random characters

Default

The description of the interface is null.

Command mode

Interface configuration mode

Instruction

The description command is used to set the description of the interface which does
not affect any function of the interface. You can run show interface or show running-
config to display the interface's description information.

Example

The following example shows how to set the description of serial interface 1/2:
!
interface serial 1/2 description
Connect to Beijing
!

Related command

show interface
show running-config

1.1.8 duplex

To set the duplex mode of the Ethernet interface, run duplex. You can run no duplex
to resume the default value.
duplex duplex-type

Parameter

Parameter Description

duplex-type Duplex type, which can be half-duplex or full-duplex

-7-
02-Interface Configuration Commands

Default

The default duplex is related with the speed of the interface. For example, if the fast
Ethernet is auto-adaptation, the command is invalid; if the Ethernet interface is a 10M
one, it is in half-duplex mode.

Command mode

Interface configuration mode

Instruction

The command is used after the system enters the corresponding interface
configuration mode.

Example

The following example shows how to set the full-duplex mode of the 10M Ethernet
interface 1/0:
!
interface ethenet
1/0 duplex full
!
The following example shows how to set the default duplex mode of the 10M Ethernet
interface 1/0:
!
interface ehenet 1/0
no duplex
!

Related command

speed

1.1.9 encapsulation

To set the encapsulation protocol of the interface, run encapsulation. You can run no
encapsulation to resume the default value.
encapsulation encapsulation-type

Parameter

Parameter Description

encapsulation-type Encapsulation type, which can be one of the following types:

Hdlc: the HDLC protocol of the serial interface, which provides the
synchronous frame and error check to the HDLC protocol without the
window-free or retransmission-free mechanism
Ppp: the PPP protocol, which is used for serial interfaces
Sdlc: the SDLC protocol for the serial interface

Dot1Q: the encapsulation type of Ethernet sub-interface (used for Ethernet

-8-
02-Interface Configuration Commands

sub-interface)

Default

The default protocol is related with the interface type. For example, the default protocol
of the synchronous serial interface is HDLC, while that of the asynchronous interface
and the dialer interface is PPP.

Command mode

Interface configuration mode

Instruction

To support multiple encapsulations simultaneously, you can run autoselect. To see


the main encapsulation of the interface, you can run show interface. The command is
valid only on the serial interface.

Example

The following example shows how to set the PPP encapsulation on the serial interface
1/1:
!
interface serial 1/1
encapsulation ppp
!
The following example shows how to set the default encapsulation of the Ethernet
interface 1/0:
!
interface GigaEthernet0/1.1
ip address 1.1.1.1
255.255.255.0 no ip directed-
broadcast encapsulation dot1Q
2 bandwidth 1000000
delay 1

Related command

show interface

1.1.10 framing

To configure the link checkup method, run framing. To resume the crc4 checkup of
the link, run no framing.
framing {crc4 | no-crc4}
no framing

Parameter

Parameter Description

-9-
02-Interface Configuration Commands

crc4 Sets the link checkup method to crc4.

no-crc4 Sets the link checkup method not to be crc4.

Default

The crc4 checkup is used.

Command mode

E1 configuration mode

Instruction

None

Example

The following example shows how to set the crc4 checkup of the link:
Router_config#controller E1 2/0
Router_config_controller_E1_2/0#framing crc4

Related command

None

1.1.11 interface

To configure the interface type and enter the interface configuration mode, run
interface. To delete the interface or initialized interface, run no interface.
interface type interface-number
To configure the sub-interface, run the following command in global configuration mode:
interface serial slot/port.subinterface-number {multipoint | point-to-point}

Parameter

Parameter Description

type Interface type which is designated for configuration

interface-number Number of the logic interface

slot Number of the slot or card

port Number of the port of the slot or card

channel-group Sets the number of the E1 channel group ranging between 0 and 30.

subinterface-number Number of the sub-interface ranging between 1 and 32767

multipoint| Specifies the point-to-multipoint or point-to-point interface. The


point-to-point parameter must be specified with a value for it has no default value.

- 10 -
02-Interface Configuration Commands

Default

No interface is configured.

Command mode

Global configuration mode

Instruction

The sub-interface can be used to configure the full-connection-free frame-relay


network.
Table 1-1 Keyword and corresponding description of the interface type

Keyword Type

async Asynchronous interface

gigaEthernet 1000M Ethernet interface

fastethernet fast-Ethernet port

loopback Loopback interface which is realized by software and always enabled in


simulation interface-number stands for the number of the
to-be-configured loopback interface.

null Null interface

serial Serial interface

Multilink Multilink interface

Virtual-template Virtual-template interface

Virtual-tunnel Virtual-tunnel interface

Tunnel Tunnel interface

For the physical interface and the sub-interface, run no interface to resume the default
configuration of the interface. For other interfaces, run no interface to delete them.

Example

The following example shows how to use PPP to encapsulate serial interface 1/0:
!
interface serial 1/0
encapsulation ppp
!
The following example shows how to configure the loopback interface and distribute an
IP address and mask for the interface:
!
interface loopback 0
ip address 192.168.1.1 255.255.255.0
!
The following example shows how to use PPP to encapsulate channel group 0 of E1
link:
!

- 11 -
02-Interface Configuration Commands

controller E11 2/0 channel-


group 0 timeslots 1-31
!
interface serial 2/0:0
ip address 192.168.3.1 255.255.255.0
encapsulation ppp
!

Related command

show interface

1.1.12 linecode

To configure the link encoding mode, run linecode. To resume the hdp3 encoding of
the link, run no linecode.
linecode{ hdb3| ami}
no linecode

Parameter

Parameter Description

hdb3 Sets the link to adopt the HDB3 encoding.

Ami Sets the link to adopt the AMI encoding.

Default

The HDB3 encoding is used.

Command mode

E1 configuration mode

Instruction

None

Example

The following example shows how to set the hdb3 encoding of the link:
Router_config#controller E1 2/0
Router_config_controller_E1_2/0#linecode hdb3

Related command

None

- 12 -
02-Interface Configuration Commands

1.1.13 mtu

To adjust the maximum group size or MTU size, run MTU. To resume the default MTU
value, run no mtu.
mtu bytes
no mtu

Parameter

Parameter Description

bytes Size of the required MTU (unit: byte)

Default

Except that the MTU of the loopback interface is 1514 bytes, the default MTU of other
interfaces is 1500 bytes.

Command mode

Interface configuration mode

Instruction

In general, the default value of each interface is the MTU for the interface type. The
MTU size is changing among the values larger than 68 bytes on the serial interface.
You can run show interface to browse the current MTU configuration. If you run mtu
?, the information will be shown in the “<minimum value-maximum value [current
value]>” format.
Note:
The MTU value change through the mtu command will affect the value of the specific
version of the protocol (such as ip mtu). In the case that the value specified by the ip
mtu command is same to the value specified by the mtu command, ip mtu will
automatically match the new MTU if the value of the mtu command is changed.
However, if the value the ip mtu command is modified, the value of the mtu command
will not be affected.

Example

The following example shows how to specify the 576-byte MTU.


!
interface serial 1/0
mtu 576
!

Related command

ip mtu

1.1.14 physical-layer mode

To specify the asynchronous/synchronous mode of the serial interface, run physical-


layer mode. To resume the default synchronous mode of the interface, run

- 13 -
02-Interface Configuration Commands

no physical-layer mode. (Interface created by HIC only supports the synchronic


mode)
physical-layer mode {sync |
async} no physical-layer mode

Parameter

Parameter Description

sync Sets the interface to the synchronous mode.

async Sets the interface to the asynchronous mode.

Default

Synchronous mode

Command mode

Interface configuration mode

Instruction

When an interface is in asynchronous mode, it supports all commands available for the
standard asynchronous interface. When the synchronous/asynchronous mode is
switched each other, the encapsulation protocol which does not exist in new mode will
be permanently deleted. If all these things do not exist, the encapsulation turns to be
the default encapsulation in new mode.

Example

The following example shows how to change a serial interface from the synchronous
mode to the asynchronous mode:
!
interface serial 1/2 physical-
layer mode async
!

Related command

None

1.1.15 physical-layer speed


To specify the rate of the serial interface, run physical-layer speed.
physical-layer speed speed

Parameter

- 14 -
02-Interface Configuration Commands

Parameter Description

speed Rate of the interface

Table 1-2 Rates of the synchronous/asynchronous interface

Synchronous Interface Asynchronous Interface

1200, 2400, 4800, 9600, 14400, 19200, 1200, 2400, 4800, 9600, 14400, 19200, 38400,
38400, 64000, 115200, 128000, 256000, 57600, 115200
512000, 1024000, 2048000

Default

The default rate in synchronous mode is 64000bps.


The default rate in asynchronous mode is 9600bps.

Command mode

Interface configuration mode

Instruction

The baud rate of the asynchronous serial ports at the ends of the asynchronous serial
line must be set to be same. After the synchronous mode is changed to the
asynchronous mode, the router automatically sets the baud rate to 9600 bps.
When two serial ports connect, the baud rate of the line is decided by the DCE side of
the line. Hence, when the synchronous serial port works under the DCE mode, the
baud rate need be set; when the synchronous serial port works under the DTE mode,
the baud rate need not be set. After the asynchronous mode is changed to the
synchronous mode, the router automatically sets the baud rate to 64000 bps.

Example

The following example shows how to set the rate of the serial interface to 57600 bps:
!
interface serial 1/2 physical-
layer speed 57600
!

Related command

physical-layer mode

1.1.16 physical-interface fiber

To configure the optical port mode of the Ethernet, run physical-interface in global
configuration mode.

Parameter

None

- 15 -
02-Interface Configuration Commands

Default

None

Command mode

Interface configuration mode

Instruction

The command is run in configuration mode of the corresponding port.

Example

None

Related command

None

1.1.17 show interface


To configure the interface state, run show interface in global configuration mode.
show interface
show interface type interface-number
show interface type slot/port (used on the router with the unchannelized E1 interface)
show interface serial slot/port:channel-group (used for the unchannelized E1
interface)

Parameter

Parameter Description

type Interface type which is designated for configuration

interface-number Number of the logic interface

slot Number of the slot or card

port Number of the port

channel-group Number of the E1 channel group defined by the channel-group


command, whose value ranges between 0 and 30

Default

None

Command mode

EXEC

- 16 -
02-Interface Configuration Commands

Instruction

If the show interface command has no any parameter followed, the information about
all interfaces is shown.

Example

None

Related command

None

1.1.18 shutdown (E1 controller)

To Disable the E1 interface, run shutdown. To restart up the disabled E1 interface,


run no shutdown.
shutdown
no shutdown

Parameter

None

Default

All interfaces are enabled.

Command mode

E1 configuration mode

Instruction

The shutdown command is used to disable all functions on the specified E1 interface.

Example

The following example shows how to Disable interface E1 1/0.


Router_config#controller E1 2/0
Router_config_controller_E1_2/0#shutdown
The following example shows how to restart up the interface:
Router_config#controller E1 2/0
Router_config_controller_E1_2/0#no shutdown

Related command

None

- 17 -
02-Interface Configuration Commands

1.1.19 shutdown (interface)

To disable an interface, run shutdown (interface). To restart up the disabled


interface, run no shutdown.
shutdown
no shutdown

Parameter

None

Default

All interfaces are enabled.

Command mode

Interface configuration mode

Instruction

The shutdown command is used to disable all functions on the specified CPOS
interface. On the serial interface, the command reduces the power of the DTR signal.
At the same time, the command is also used to label which interface is unavailable. To
check up whether the interface is disabled, run show interface. The disabled interface
is displayed as “administratively down”.

Example

The following example shows how to diable fast Ethernet interface 1/1:
!
interface fastEthernet 1/1
shutdown
!
The following example shows how to restart up the interface:
!
interface fastEthernet 1/1
no shutdown
!

Related command

show interface

1.1.20 speed
To configure the Ethernet, run speed. You can run no speed to resume the default
configuration.
speed (10|100)
no speed

- 18 -
02-Interface Configuration Commands

Parameter

Parameter Description

10 Specifies the fast-Ethernet port to work under the 10M mode.

100 Specifies the fast-Ethernet port to work under the 100M mode.

Default

Auto-adaptation

Command mode

Interface configuration mode

Instruction

None

Example

The following example shows how to configure Fast-Ethernet interface 1/0 to work
under the 10M mode.
!
interface fastethernet 1/0
speed 10
!
The following example shows how to resume the interface to auto-adaptation:
!
interface fastethernet 1/1
no speed
!

Related command

None

1.1.21 tunnel

To configure relative parameters of the tunnel interface, run tunnel. To resume the
default values of these parameters, run no tunnel.
tunnel { checksum | destination ip-address | duplicate | key key-number | mode type
| source {ip-address | interface} | vrf vrf-name | speed-up }
no tunnel { checksum | destination | key | mode | sequence-datagrams | source |
vrf vrf-name | speed-up }

Parameter

Parameter Description

checksum Specifies the end-to-end packet checkup.

- 19 -
02-Interface Configuration Commands

destination Configures the destination address of the tunnel.

key Configures the key of the tunnel.

key-number Number of the key in the decimal system

mode Configures the encapsulation protocol of the tunnel.

type Type of the encapsulation protocol

gre ip : GRE

ipip : IP

source Configures the source address of the tunnel.

interface Interface of the current router

vrf Configures the VRF member.

speed-up Checks the validity of speed-up route

Default

Default Description

checksum Disable

destination Disable

key None

mode Gre/ip encapsulation protocol

source None

vrf None

Speed-up Enable

Command mode

Interface configuration mode (exists only on the tunnel interface)

Instruction

The tunnel command only exists on the tunnel interface. To run a protocol of the
tunnel interface (protocol up), the following parameters must be configured:
 
 IP address of the interface
 
 Source address of the tunnel
 
Destination address of the tunnel

The valid route to reach the destination address of the tunnel must exist.
On the current version, the encapsulation protocols that the tunnel supports include
GRE and IPIP.
After the GRE protocol is configured, you can identify the VRF routes through
configuring different KEY values if the tunnel interface with the same destination and
source addresses.

- 20 -
02-Interface Configuration Commands

Example

The following example shows how to enable tunnel interface 100:


!
interface fastEthernet1/1
ip address 10.1.1.1 255.255.255.0
!
interface Tunnel100
ip address 192.168.20.202 255.255.255.0
tunnel source fastEthernet1/1
tunnel destination 10.1.1.2
!
Because the default encapsulation protocols for the tunnel interface are GRE or IP, the
commands to resume the default encapsulation protocols for the tunnel interface are
same to the commands to configure the GRE or IP protocol.
router_config#interface Tunnel100
router_config_t100#no tunnel mode

Same to
router_config#interface Tunnel100
router_config_t100#tunnel mode gre ip

Related command

interface tunnel

- 21 -

You might also like