03 Interface Configuration
03 Interface Configuration
Table of Contents
Table of Contents
Chapter 1 Introduction .......................................................................................................................................................... 1
1.1 Supported Interface Types .................................................................................................................................... 1
1.2 Interface Configuration Introduction ...................................................................................................................... 2
Chapter 2 Interface Configuration......................................................................................................................................... 4
2.1 Configuring Interface Common Attribute ............................................................................................................... 4
2.1.1 Adding Description .................................................................................................................................... 4
2.1.2 Configuring Bandwidth .............................................................................................................................. 4
2.1.3 Configuring Time Delay............................................................................................................................. 4
2.2 Monitoring and Maintaining Interface .................................................................................................................... 5
2.2.1 Checking Interface State........................................................................................................................... 5
2.2.2 Initializing and Deleting Interface .............................................................................................................. 5
2.2.3 Shutting down and Enabling Interface....................................................................................................... 5
2.3 Configuring Logistical Interface ............................................................................................................................. 6
2.3.1 Configuring Null Interface.......................................................................................................................... 6
2.3.2 Configuring Loopback Interface ................................................................................................................ 6
2.3.3 Configuring Aggregation Interface............................................................................................................. 7
2.3.4 Configuring VLAN Interface....................................................................................................................... 7
2.3.5 Configuring Super VLAN Interface............................................................................................................ 7
Chapter 3 Interface Configuration Example.......................................................................................................................... 9
3.1 Configuring Public Attribute of Interface ................................................................................................................ 9
3.1.1 Interface Description Example .................................................................................................................. 9
3.1.2 Interface Shutdown Example .................................................................................................................... 9
-I-
Interface Configuration
Chapter 1 Introduction
This section helps user to learn various kinds of interface that our switch supports and
consult configuration information about different interface types.
For detailed description of all interface commands used in this section, refer to
Interface configuration command. For files of other commands appeared in this section,
refer to other parts of the manual.
For information about interface types, please refer to the following table.
The two supported kinds of interface: Ethernet interface and logical interface. The
Ethernet interface type depends on one device depends on the standard
communication interface and the interface card or interfaced module installed on the
switch. The logical interface is the interface without the corresponding physical device,
which is established by user manually.
z Ethernet interface
z loopback interface
z null interface
-1-
Interface Configuration
z aggregation interface
z VLAN interface
The following description applies to the configuration process of all interfaces. Take the
following steps to perform interface configuration in global configuration mode.
(1) Run the interface command to enter the interface configuration mode and start
configuring interface. At this time, the switch prompt becomes ‘config_’ plus the
shortened form of the interface to be configured. Use these interfaces in terms of
their numbers. Numbers are assigned during installation(exworks) or when an
interface card are added to the system. Run the show interface command to
display these interfaces. Each interface that the device supports provides its
own state as follows:
Switch#show interface
GigaEthernet1/1 is down, line protocol is down
Hardware is Fast Ethernet, Address is 0009.7cf7.7dc1
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Auto-duplex, Auto-speed
input flow-control is off, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 17:52:52, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
1 packets input, 64 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
1 packets output, 64 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 PAUSE output
0 output buffer failures, 0 output buffers swapped out
To configure gigabit Ethernet interface g1/1, enter the following content:
-2-
Interface Configuration
interface GigaEthernet0/1
The switch prompts “config_g0/1”.
Note:
There is no need to add blank between interface type and interface number. For example, in the above
line, g 1/1 or g 1/1 is both right.
(2) Once the interface configuration has been completed, use the show command in
the following chapter ‘Monitoring and Maintaining Interface’ to test the interface
state.
-3-
Interface Configuration
The following content describes the command that can be executed on an interface of any type
and configures common attributes of interface. The common attributes of interface that can be
configured include: interface description, bandwidth and delay and so on.
Adding description about the related interface helps to memorize content attached to
the interface. This description only serves as the interface note to help identify uses of
the interface and has no effect on any feature of the interface. This description will
appear in the output of the following commands: show running-config and show
interface. Use the following command in interface configuration mode if user wants to
add a description to any interface.
Command Description
description string Adds description to the currently-configured interface.
For examples relevant to adding interface description, please refer to the following
section ‘Interface Description Example’.
The upper protocol uses bandwidth information to perform operation decision. Use the
following command to configure bandwidth for the interface:
Command Description
bandwidth kilobps Configures bandwidth for the currently configured
interface.
The bandwidth is just a routing parameter, which doesn’t influence the communication
rate of the actual physical interface.
The upper protocol uses time delay information to perform operation decision. Use the
following command to configure time delay for the interface in the interface
configuration mode.
Command Description
delay tensofmicroseconds Configures time delay for the currently configured
interface.
The configuration of time delay is just an information parameter. Use this command
cannnot adjust the actual time delay of an interface.
-4-
Interface Configuration
Command Description
show interface [type [slot|port]] Displays interface state.
You can dynamically establish and delete logical interfaces. This also applies to the
sub interface and channalized interface. Use the following command to initialize and
delete interface in global configuration mode:
Command Description
no interface type [slot|port] Initializes physical interface or deletes virtual
interface.
When an interface is shut down, all features of this interface are disabled, and also this
interface is marked as unavailable interface in all monitor command displays. This
information can be transmitted to other switches via dynamic routing protocol.
Command Description
shutdown Shuts down an interface.
-5-
Interface Configuration
You can use the show interface command and the show running-config command
to check whether an interface has been shut down. An interface that has been shut
down is displayed as ‘administratively down’ in the show interface command display.
For more details, please refer to the following example in ‘Interface Shutdown
Example’.
This section describes how to configure a logical interface. The contents are as
follows:
The whole system supports only one null interface. Its functions are similar to those of
applied null devices on most operating systems. The null interface is always available,
but it never sends or receives communication information. The interface configuration
command no ip unreachable is the only one command available to the null interface.
The null interface provides an optional method to filtrate communication. That is, the
unwanted network communication can be routed to the null interface; the null interface
can function as the access control list.
You can run the following command in global configuration mode to specify the null
interface:
Command Description
interface null 0 Enters the null interface configuration state.
The null interface can be applied in any command that takes the interface type as its
parameter.
The following case shows how to configure a null interface for the routing of IP
192.168.20.0.
ip route 192.168.20.0 255.255.255.0 null 0
The loopback interface is a logistical interface. It always functions and continues BGP
session even in the case that the outward interface is shut down. The loopback
interface can be used as the terminal address for BGP session. If other switches try to
reach the loopback interface, a dynamic routing protocol should be configured to
broadcast the routes with loopback interface address. Messages that are routed to the
loopback interface can be re-routed to the switch and be handled locally. For
messages that are routed to the loopback interface but whose destination is not the IP
address of the loopback interface, they will be dropped. This means that the loopback
interface functions as the null interface.
-6-
Interface Configuration
Command Description
interface loopback number Enter the loopback interface configuration state.
The inadequate bandwidth of a single Ethernet interface gives rise to the birth of the
aggregation interface. It can bind several full-duplex interface with the same rate
together, greatly improving the bandwidth.
Command Description
Interface port-aggregator number Configures the aggregation interface
V VLAN interface is the routing interface in switch. The VLAN command in global
configuration mode only adds layer 2 VLAN to system without defining how to deal
with the IP packet whose destination address is itself in the VLAN. If there is no VLAN
interface, this kind of packets will be dropped.
Command Description
Interface vlan number Configures VLAN interface.
The Super VLAN technology provides a mechanism: hosts in different VLANs of the
same switch can be allocated in the same Ipv4 subnet and use the same default
gateway; lots of IP addresses are, therefore, saved. The Super VLAN technology puts
different VLANs into a group where VLANs use the same management interface and
hosts use the same IPv4 network section and gateway. VLAN belonging to Super
VLAN is called as SubVLAN. No SubVLAN can possess the management interface by
configuring IP address.
You can configure a Super VLAN interface through a command line. The procedure of
configuring a Super VLAN interface is shown as follows:
Command Description
[no] interface Enter the Super VLAN interface configuration mode. If the specified Super VLAN
supervlan index interface does not exist, the system will create a Super VLAN interface..
index is the index of the Super VLAN interface. Its effective value ranges from 1
to 32.
[no] subvlan [setstr] Configure SubVLAN in Super VLAN. The added Sub VLAN cannot possess a
[add addstr] [remove management interface or cannot belong to other Super VLANs. In original state,
remstr] Super VLAN does not contain any Sub VLAN. Only one sub command can only be
-7-
Interface Configuration
setstr means to set the Sub VLAN list. For example, List 2,4-6 indicate VLAN 2, 4,
5 and 6.
add means to add VLAN list in the original SubVLAN list. addstr means the
character string whose format is the same as the above.
remove means to delete VLAN list in the original SubVLAN list. remstr is the list’s
character string whose format is the same as the above.
After you configure the Super VLAN interface, you can configure the IP address for the
Super VLAN interface. The Super VLAN interface is also a routing port, which can be
configured as other ports are.
-8-
Interface Configuration
The following example shows how to add description related to an interface. This
description appears in the configuration file and interface command display.
interface vlan 1
ip address 192.168.1.23 255.255.255.0
The following example shows how to shutdown the Ethernet interface 0/1:
interface GigaEthernet0/1
shutdown
-9-