Interface Configuration I Table of Contents Table of Contents Chapter 1 Overview.........................................................................................................................................1 1.1 Supported Interface Types.............................................................................................................. 1 1.2 Interface Configuration Introduction...............................................................................................1 Chapter 2 Interface Configuration.................................................................................................................3 2.1 Configuring Interface Common Attribute....................................................................................... 3 2.1.1 Adding Description.................................................................................................................3 2.1.2 Configuring Bandwidth..........................................................................................................3 2.1.3 Configuring Time Delay........................................................................................................ 3 2.2 Monitoring and Maintaining the Interface...................................................................................... 3 2.2.1 Browsing the state of an interface.......................................................................................4 2.2.2 Initializing and deleting the port...........................................................................................4 2.2.3 Closing and Restarting the Port...........................................................................................4 2.3 Setting the Ethernet Interface......................................................................................................... 4 2.3.1 Choosing an Ethernet Interface...........................................................................................4 2.3.2 Setting the Rate..................................................................................................................... 5 2.3.3 Setting the Duplex Mode of an Interface............................................................................5 2.3.4 Setting Flow Control on an Interface.................................................................................. 5 2.4 Configuring Logical Interface...........................................................................................................6 2.4.1 Configuring Aggregation Interface...................................................................................... 6 2.4.2 Configuring VLAN Interface................................................................................................. 6 Chapter 3 Interface Configuration Example................................................................................................ 7 3.1 Configuring Public Attribute of Interface........................................................................................7 3.1.1 Example for Interface Description....................................................................................... 7 3.1.2 Example of Interface Shutdown...........................................................................................7 II Interface Configuration Chapter 1 Overview 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. The introduction includes communication information that can be applied to all interface types. 1.1 Supported Interface Types For information about interface types, please refer to the following table. Interface type Task Reference Configures fast Ethernet interface. Ethernet interface Configures gigabit Ethernet Setting the Ethernet Interface interface. Aggregation interface Logical interface Configuring Logical Interface VLAN interface 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. The supported Ethernet interfaces of our switch include:  Fast Ethernet  Gigabit Ethernet interface The supported logical interface of our switch include:  Aggregation interface  vlan interface 1.2 Interface Configuration Introduction The following description applies to the configuration process of all interfaces. Take the following steps to perform interface configuration in global configuration mode. 1) 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_config#show interface g0/2 GigaEthernet0/2 is administratively down, line protocol is down 1 Interface Configuration Hardware is Giga-Combo-FX, address is 00e0.0f8d.e0e1 (bia 00e0.0f8d.e0e1) MTU 1500 bytes, BW 10000 kbit, DLY 10 usec Encapsulation ARPA port info 1 0 2 1 Auto-duplex, Auto-speed flow-control off 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 0 sqettest, 0 deferred 0 single, 0 multiple, 0 excessive, 0 late 0 L3 forwards Note: There is no need to add blank between interface type and interface number. For example, in the above line, g 0/2 or g 0/2 is both available. (1) You can configure the interface configuration commands in interface configuration mode. Various commands define protocols and application programs to be executed on the interface. These commands will stay until user exits the interface configuration mode or switches to another interface. (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. 2 Interface Configuration Chapter 2 Interface Configuration 2.1 Configuring Interface Common Attribute 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. 2.1.1 Adding Description 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 Purpose 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’. 2.1.2 Configuring Bandwidth The upper protocol uses bandwidth information to perform operation decision. Use the following command to configure bandwidth for the interface: Command Purpose 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. 2.1.3 Configuring Time Delay 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 Purpose delay tensofmicroseconds Configures time delay for the currently configured interface. The configuration of time delay is just an information parameter. Use this command cannot adjust the actual time delay of an interface. 2.2 Monitoring and Maintaining the Interface To maintain and monitor the interface, perform the following tasks:  Browsing the state of an interface  Initializing and deleting the port 3 Interface Configuration  Closing and restarting the port 2.2.1 Browsing the state of an interface Our switches support those commands to display interface information, including the version ID of hardware and software, and the interface state. The following table presents you some port monitor commands: For more details, please refer to the "Interface Configuration Command". Run the following commands: Command Purpose show interface [type [slot|port]] Displays the state of a port. show running-config Displays the current settings. show version Displays the memory configuration, the software version and the startup mirror. 2.2.2 Initializing and deleting the port The logic interface can be dynamically created and deleted. So it is with the sub-interface and the channelized interface. The physical interface which cannot be deleted dynamically can return to the default setting of the interface. In global configuration mode, run the following command to initialize and delete an interface: Command Purpose no interface [type [slot|port]] Initializes a physical interface or deletes a virtual interface. 2.2.3 Closing and Restarting the Port You can disable the interface, so that all functions on this interface can be disabled, and then all monitor commands will label this interface as unavailable. This information can be transmitted to other devices through the dynamic routing protocol. The modification on any route will not affect this port. Run the following commands in interface configuration mode to shut down an interface and then restart it. Command Purpose shutdown Disable the interface. no shutdown Restarting the interface To check whether an interface is shut down, you can run show interface and show running-config. After the show interface command is run, a disabled interface will be presented as “administratively down”. For more examples, please refer to "Interface Shutdown Example". 2.3 Setting the Ethernet Interface In this section the procedure of setting the Ethernet interface will be described. The detailed configuration includes the following steps, among which step 1 is obligatory while other steps are optional. 2.3.1 Choosing an Ethernet Interface 4 Interface Configuration Run the following command in global configuration mode to enter the Ethernet interface configuration mode: Command Purpose interface fastethernet [slot|port ] Enters the fast-Ethernet interface configuration mode. interface gigaethernet [slot|port ] Enters the gigabit-Ethernet interface configuration mode. The show interface fastethernet command can be used to show the state of the Ethernet interface, while the show interface gigaethernet command can be used to show the state of the gigabit-Ethernet interface. 2.3.2 Setting the Rate The Ethernet rate can be realized not only through auto-negotiation but also through interface configuration. Command Purpose Speed {10|100|1000|auto} Sets the rate of fast Ethernet to 10M, 100M, 1000M or auto-negotiation. No speed Resumes the default settings. The rate is auto-negotiation. Note: The speed of the optical interface varies with the device. For example, the speed of GE-FX is 1000M, while the speed of FE-FX is 100M. If the speed command for an optical interface has the auto parameter, the optical interface has the automatic negotiation function, or the optical interface is mandatory and cannot be negotiated. The gigabit TX port supports the working mode of 10M, 100M, 1000M. The gigabit TX port must work in auto mode. Do the configuration as the prompt of each port. 2.3.3 Setting the Duplex Mode of an Interface By default, the Ethernet interface can be auto, half duplex or full duplex. The duplex mode for the gigbit interface is always auto. Command Purpose duplex {full|half|auto} Sets the duplex mode of an Ethernet interface. No duplex Resumes the default settings. The duplex mode is auto-negotiation. 2.3.4 Setting Flow Control on an Interface When an interface is in full duplex mode, flow control is realized through the 802.3X-defined PAUSE frame; when an interface is in half duplex mode, flow control is realized through backpressure. Command Purpose flow-control on/off /auto Enables or disables flow control on an interface. no flow-control Resumes the default settings, that is, there is no flow control on an interface. 5 Interface Configuration 2.4 Configuring Logical Interface This section describes how to configure a logical interface. The contents are as follows: Configuring aggregation interface Configuring VLAN interface 2.4.1 Configuring Aggregation Interface The aggregator interface is introduced in the background that the bandwidth of a single Ethernet interface is insufficient. It can bind together multiple full-duplex interfaces of the same rate to multiply the bandwidth. Run the following command to define the aggregation interface: Command Function Interface port-aggregator number Configuring aggregation interface 2.4.2 Configuring VLAN Interface 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. Run the following command to define VLAN interface: Command Purpose Interface vlan number Configuring VLAN interface 6 Interface Configuration Chapter 3 Interface Configuration Example 3.1 Configuring Public Attribute of Interface 3.1.1 Example for Interface Description The following example shows how to add a description for an interface. interface vlan 1 ip address 192.168.1.23 255.255.255.0 3.1.2 Example of Interface Shutdown The following example shows how to disable GigaEthernet interface 0/1. interface GigaEthernet0/1 shutdown The following example shows how to restart the interface. interface GigaEthernet0/1 no shutdown 7