Network Switch configuration tips

Source: Internet
Author: User
Tags cisco switch

The configuration of a vswitch has always been mysterious, not only for general users, but also for the vast majority of network administrators. It is also an important and basic indicator for measuring the level of network management. This is mainly due to two reasons: first, the switches configured by the vast majority of enterprises are non-Network-connected vswitches on the desktop, and do not require any configuration at all. They are purely "Dummies". Like hubs, they are connected to the power supply, plug in the network cable to work normally. On the other hand, most CEOs of medium and small enterprises are not very comfortable with their network administrators. Therefore, even if the purchased switch is of the Network Manager type, they are not allowed to configure it by their network administrators, instead, ask the manufacturer's engineers or other professional personnel for configuration. Therefore, it is difficult for these network administrators of small and medium-sized enterprises to have the opportunity to manually configure a switch.
The detailed configuration process of a vswitch is complex, and the specific configuration method varies depending on different brands and vswitches of different generations. This article only teaches you the general configuration method, with these general configuration methods, we will be able to link them together.
You can configure a vswitch in two ways: local configuration and remote network configuration, however, note that the latter configuration method is only available after the previous configuration is successful.
1. Local Configuration
For local configuration, we need to first encounter the physical connection mode, and then we need to face the software configuration, in terms of software configuration, let's take the most common Cisco "Catalyst 1900" switch as an example. The local configuration of the vswitch involves hardware and software connections. The following two steps describe the basic connection process.
1. physical connection
Because of the portable performance of the laptop, the switch is usually configured with a laptop. In the absence of a laptop, you can also use a desktop, but it is more difficult to move. The local configuration of a vswitch is to communicate directly through the "Console" Port of the computer and the vswitch, as shown in figure 1.


Figure 1
There is usually a "Console" port on the vswitch that can manage the network. This is already described in the previous section of the hub, and the same is true for the vswitch ), it is used to configure and manage vswitches. Connecting to and configuring a vswitch through the Console port is required to configure and manage the vswitch. Although there are several other ways to configure and manage vswitches, such as Web and Telnet), these methods must be configured through the Console port. Because the IP address, domain name, or device name is required for other methods, the newly purchased switch obviously cannot have these parameters, therefore, connecting to and configuring a vswitch through the Console port is the most common and basic management and configuration method that must be mastered by the network administrator.
Different types of switch Console ports are located in different locations, some on the front panel such as Catalyst 3200 and Catalyst 4006), and some on the rear panel such as Catalyst 1900 and Catalyst 2900XL ). Generally, most modular switches are located on the front panel, while most fixed configuration switches are located on the rear panel. However, you don't have to worry about the failure to find the Console port. On the top or side of the port, there will be an identifier similar to "CONSOLE", as shown in 2.

Figure 2
In addition to location differences, the Console port type is also different, the vast majority of the Catalyst 1900 and Catalyst 4006) are using RJ-45 Port 2 ), but there are also a few using DB-9 serial port such as Catalyst 3200) or DB-25 serial port such as Catalyst 2900 ).
Whether the switch uses a DB-9 or DB-25 serial interface or a RJ-45 interface, you need to connect to a serial port configured with a computer, usually called a terminal, through a dedicated Console line. The Console line corresponds to the different Console ports of the vswitch. There are also two types of Console lines: one is a serial line, that is, both ends are serial interfaces and both ends are master ports ), the two ends can be inserted into the computer's serial port and the Console port of the switch; the other is the two ends are RJ-45 joint RJ-45-to-RJ-45) flat line. Since both ends of the flat line are RJ-45 interfaces, you cannot connect directly to the computer's serial port, so you must also use an adapter for a RJ-45-to-DB-9 or RJ-45-to-DB-25 shown in 3 at the same time. Typically, such a Console line and the corresponding DB-9 or DB-25 adapter are randomly presented in the switch box.

Figure 3

2. Software Configuration
After the physical connection is complete, we need to turn on the computer and switch power for software configuration. Next we will describe this configuration process with a Cisco netmanager switch "Catalyst 1900. Before entering the configuration, we also need to enter the system. The steps are as follows:
Step 2: power on the computer connected to the vswitch and run one of Windows 95, Windows 98, or Windows 1st.
Step 2: Check whether the "Super Terminal" Hyper Terminal) component is installed. If the component is not found in the "attachment" Accessories), you can Add the Windows component by adding/deleting programs Add/Remove Program.
All right, after the "Super Terminal" is installed, we can communicate with the switch. Of course, we need to connect and turn on the switch power). The following steps are officially configured. Before using a Super Terminal to establish a communication with a vswitch, you must first set the Super Terminal.
All default configurations of the Catalyst 1900 switch before configuration are as follows: all ports have no port names; all ports have Normal priority and all 10/100 Mbps Ethernet ports are set to Auto, all 10/100 Mbps Ethernet ports are set to half duplex mode and no virtual subnet is configured. The steps for formal configuration are as follows ):
Step 4: Click the start button and click Super Terminal in the attachment option of the program menu. The page shown in Figure 4 is displayed.


Figure 4
Step 2: double-click the "Hypertrm" icon to bring up the dialog box 5 shown. This dialog box is used to oppose a new super terminal connection item.


Figure 5
Step 2: In the "name" text box, type the name of the connection item for creating a super-level terminal. This is mainly for easy identification and there are no special requirements. Here we enter "Cisco ", if you want to select an icon that you like for this connection item, you can also select one in the icon bar and click "OK" to bring up the dialog box 6.


Figure 6
Step 2: select the serial port of the computer connected to the vswitch from the "connect to use" drop-down list box. Click OK to bring up the dialog box 7.


Figure 7
Step 2: Select "5th" in the "baud rate" drop-down list box, because this is the highest Communication Rate of the serial port, all other options use the default value. Click "OK". If the communication is normal, the main configuration interface similar to the following is displayed, and the initial configuration of the switch is displayed in this window.

Catalyst 1900 Management Console
Copyright c) Cisco Systems, Inc. 1993-1999
All rights reserved.
Standard Edition Software
Ethernet address: 00-E0-1E-7E-B4-40
PCA Number: 73-2239-01
PCA Serial Number: SAD01200001
Model Number: WS-C1924-A
System Serial Number: FAA01200001
---------------------------------------
User Interface Menu
[M] Menus // main configuration menu
[I] IP Configuration // IP address and other configurations
[P] Console Password // control Password configuration
Enter Selection: // Enter a shortcut letter for the item to be selected, and press Enter to confirm
Note: The content following "//" is the author's explanation of the preceding statement, the same below.
Now, the vswitch configuration page is officially entered. The following work will officially configure the vswitch.
3. Basic vswitch Configuration
After entering the configuration page, if this is the first configuration, You need to configure the IP address first, which is mainly for remote configuration later. The IP address configuration method is as follows:
Enter "I" in "Enter Selection:" On the configuration page that appears, and click Enter. The following configuration information is displayed:
The IP Configuration Menu appears.
Catalyst 1900-IP Configuration
Ethernet Address: 00-E0-1E-7E-B4-40
------------- Settings ------------------
[I] IP address
[S] Subnet mask
[G] Default gateway
[B] Management Bridge Group
[M] IP address of DNS server 1
[N] IP address of DNS server 2
[D] Domain name
[R] Use Routing Information Protocol
------------- Actions -------------------
[P] Ping
[C] Clear cached DNS entries
[X] Exit to previous menu
Enter Selection:
Enter "Enter Selection:" at the end of the configuration interface and Enter the "I" letter again. Select the "IP address" option in the configuration menu to configure the IP address of the switch, after you click the Enter key, the following configuration page is displayed:

Enter administrative IP address in dotted quad format nnn. Nnn. Nnn. Nnn): // press "nnn. Nnn. Nnn. Nnn "format input IP Address
Current setting ==> 0.0.0.0 // the IP address before the switch is not configured is "0.0.0.0", representing any IP Address
New setting ==> // enter a New IP address here
If you want to configure the subnet mask and default gateway of the vswitch, select "S" and "G" on the IP configuration page. Now let's take a look at the Password Configuration:
In the IP configuration menu above, select "X" to return to the switch configuration interface described above.
Enter the "P" letter and press the Enter key. Then, at the prompt that appears, enter a 4-to 8-bit password. The password is displayed as "*" on the screen ), after entering the information, press enter to confirm and return to the logon page.
After you have configured the IP address and password, the switch can work properly according to the default configuration. To change the vswitch configuration and monitor the network conditions, you can use the control command menu, or use WEB-based Catalyst 1900 Switch Manager anywhere.
If the switch is running Cisco Catalyst 1900/2820 Enterprise Edition Software. You can change the configuration through command-line interface CLI. After entering the configuration main interface, the item "Command Line" is added to the display menu, while the item "Console Password" is missing, which is carried out in the lower menu.
1 users) now active on Management Console.
User Interface Menu
[M] Menus
[K] Command Line
[I] IP Configuration
Enter Selection:
The configuration method in this version is basically the same as the configuration method described earlier. The difference is that in this version, you can select the "[K] Command Line" item by using the Command method) perform some advanced configurations. The following is a brief introduction. In the next section, we will introduce a common advanced configuration, that is, VLAN configuration.

4. Common commands for advanced Switch configuration
In advanced configurations of A vswitch, you can use the "[K] Command Line" item in the preceding configuration menu.
The software system used by the Cisco switch is Catalyst IOS. CLI is called "Command-Line Interface", and the Chinese name is called "Command Line Interface". It is a software system mode based on doscommand Line, is case insensitive ). In this mode, not only switches, routers, and firewalls, but also a series of related commands. However, unlike the doscommand, CLI can be abbreviated as commands and parameters, as long as it contains enough characters to distinguish it from other currently available commands and parameters. Although vswitches can be configured and managed in multiple ways, you can use command lines and Menu menus in the form of pure characters ), you can also use a graphical Web browser or specialized network management software such as CiscoWorks 2000 ). In comparison, the command line method is more powerful, but more difficult to grasp. The following describes some common configuration commands of vswitches.
Cisco IOS has six different command modes: User EXEC mode, Privileged EXEC mode, VLAN dataBase mode, Global configuration mode, Interface configuration mode, and Line configuration mode. In different modes, different prompts are displayed on the CLI interface. Table 1 lists the usage, prompts, access, and exit methods of the six CLI command modes for your convenience.

Table 1: CLI command mode feature table

Mode

Access Method

Prompt

Exit Method

Purpose

User Exec

Start a process

Switch>

Type "logout" or "quit"

Change terminal settings and execute basic test to display system information

Privilege-d Exec

In "User Exec" mode, type the "enable" command.

Switch #

Type "disable" to exit

Verify the input command. Password-protected mode

VLAN Database

In "Privileged Exec" mode, type the "vlan database" command.

Switch (vlan )#

Type "exit" and return to the "Privileged Exec" mode.

Configure VLAN Parameters

Global Configura-tion

In "privileged Exec" mode, type the "configure" command.

Switch (config )#

Type "exit" or "end" or press "Ctrl-Z" to return to the "privileged EXEC" status.

Apply the configured parameters to the entire vswitch.

Interface Configura-tion

In "Global Configuration" mode, type the "interface" command

Switch (config-if )#

Type exit and return to "Global Configuration" mode. Press "Ctrl-Z" or press "end" to return to "Pprivileged Exec" mode.

Configure parameters for "Ethernet interfaces"

Line Configura-tion

In the "Global Configuration" mode, specify a line for the "line console" command

Switch (config-line )#

Type "exit" and return to "Global Configuration" mode. Press "Ctrl-Z" or enter "end", and return to "Privileged Exec" mode.

Configure parameters for "terminal line"

Cisco IOS commands can only be executed in their respective command modes. Therefore, to execute a command, you must first enter the corresponding configuration mode. For example, the "interface type_number" command can only be executed in "Global configuration" mode, while the "duplex full-flow-control" command can only be executed in "Interface configuration" mode.

In the switch CLI command, there is a basic command, that is, the Help Command "? ", In any command mode, just type "? ", That is, all available commands in this command mode and their usage are displayed. This is the help command of the switch. In addition, you can add "? "To seek help.

For example, if you want to see which commands are available in the "Privileged Exec" mode, you can type them at the "#" prompt "? ", And press Enter. For another example, if you want to continue viewing the "Show" command usage, you only need to type "show? "And press Enter. In addition ,"? "The local keyword search function is also available. That is to say, if you only remember the first few characters of a command, you can use "? "Let the system list all commands starting with this character or string. But in the last character and "? There must be no space between them. For example, type "c?" in "Privileged Exec" mode? ", The System Displays all commands starting with" c.

Note that Cisco IOS commands support short commands. That is to say, unless you are familiar with typing, you do not need to enter the complete commands and keywords, as long as the characters in the entered command are long enough to distinguish it from other commands. For example, the "show configure" command can be abbreviated as "sh conf", and the "show configure" command can be abbreviated as "sh conf" and then press enter to execute the command.

The preceding describes common configuration commands in command mode. The configuration process is complex and is not described in detail here.

Ii. Remote Configuration
We have already introduced that in addition to the direct connection between a vswitch and a computer through the Console port, the vswitch can also be connected through the common port of the vswitch. For the stack type, you can also configure several switches together, because they are actually a whole, and generally only one has the network management capability. In this case, the Super Terminal is no longer used when the switch is managed through a common port, but the communication with the managed switch is implemented through Telnet or Web browser. Because we have configured an IP address for the vswitch in the previous local configuration method, we can communicate with the vswitch through the IP address. However, note that this management function is also available only for the vswitch with the network tube type. This remote configuration method can be implemented in two different ways, so we will introduce it separately.
1. Telnet Mode
Telnet is a remote access protocol that can be used to log on to a remote computer, network device, or a dedicated TCP/IP network. Windows 95/98 and later Windows systems, UNIX/Linux and other systems have built-in Telnet client programs, we can use it to achieve communication with remote switches.
Before using Telnet to connect to a vswitch, make sure that you have prepared the following:
· Install the TCP/IP protocol on the computer used for management and configure the IP address information.
· IP address information has been configured on the managed vswitch. If you have not configured the IP address, you must use the Console port to configure the IP address.
· A User Account with administrative permissions is created on the managed vswitch. If no new account is created, the default Administrator Account of the Cisco switch is "Admin".
Run the Telnet client program on the computer. This program is available in Windows and UNIX and Linux systems, and its usage is basically compatible, especially in Windows 2000 ), and log on to the remote switch. If the IP address of the vswitch has been set to 61.159.62.182, the following describes how to enter the configuration interface. As for how to configure the vswitch, it depends on the actual situation, this document is not detailed. The steps for entering the configuration page are simple, just two simple steps:
Step 2: Click the start button and select the run menu item. Then, in the dialog box, press telnet 61.159.62.182 to enter the logon address. You can also choose not to enter the IP address, after entering the telnet main interface, connect again, but this will take another step. It is better to directly enter the IP address to be connected), as shown in figure 8. If you have configured a name for the vswitch, you can enter the name of the vswitch with a blank space after the "Telnet" command.


Figure 8
The Telnet command is generally formatted as follows:
Telnet [Hostname/port]. Note that "Hostnqme includes the vswitch name, but we have configured an IP address for the vswitch in front of it, therefore, the IP address of the vswitch is more important here. Generally, the "Port" after the format is not required. It is used to set the Port used for Telnet communication. Generally, the Telnet communication Port is specified in the TCP/IP protocol, it is port 23, so we do not need to change it. That is to say we can ignore this parameter.
Step 2. After entering the information, click "OK" or click the Enter key to establish a connection with the remote switch. 9 shows the interface displayed when you establish a connection with a computer through the Tetnet and the Catalyst 1900 switch.


Figure 9
The following figure shows the configuration Menus including Menus and Command Line. Then, you can configure and manage the vswitch as needed.

2. Web Browser
After using the Console port to set IP address information for the switch and enable the HTTP service, you can access the switch through a Web browser that supports JAVA, you can also modify the parameters of a vswitch through a Web browser and manage the vswitch. In fact, you can modify and set many important parameters of a vswitch on the Web interface, and view the running status of the vswitch in real time. However, before using a Web browser to access a vswitch, make sure that the following preparations have been made:
· Install the TCP/IP protocol on the computer used for management, and the IP address information has been configured on the computer and the managed switch.
· The computer for management is installed with Web browsers that support JAVA, such as Internet Explorer 4.0 and later, Netscape 4.0 and later, and Oprea with JAVA.
· Create a user account and password with administrative permissions on the managed vswitch.
· Cisco IOS of the managed switch supports the HTTP service and has enabled the service. Otherwise, you should upgrade Cisco IOS or enable the HTTP service through the Console port.
The method for configuring through a Web browser is as follows:
Step 2: connect the computer to a common port of the switch and run the Web browser on the computer. In the address field of the browser, type the IP address of the managed switch, for example, 61.159.62.182) or the specified name. Click Enter. the dialog box 10 is displayed.


Figure 10
Step 2: In the "user name" and "password" boxes, enter the user name and password with administrative permissions. User name/password pairs should be set through the Console port in advance.
Step 2: click "OK" to establish a connection with the managed switch. The management interface of the switch is displayed in the Web browser. The page shown in 11 shows the configuration page in the Web browser after establishing a connection with Cisco Catalyst 1900. First, you need to enter the user account and password. Then, you need to enter the vswitch configured above to configure the Super User account and password to enter the system.


Figure 11
Next, you can view the parameters and running status of the vswitch step by step through the prompts on the Web interface, and make necessary modifications to some parameters of the vswitch as needed.
This article briefly introduces the basic configuration methods of vswitches. The next article will introduce common applications of vswitches-VLAN network division and configuration methods in detail.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.