Router_SwitchBoard Configuration & lt; 16 & gt;

Source: Internet
Author: User

Basic configuration of the lab Switch

Target:


The basic configuration of the vswitch.

Purpose:

Measure the test taker's knowledge about the differences between the various operation modes of the vswitch command line.


Background description:

You are a new network manager of a company. The company requires you to be familiar with network products. The company uses a full range of ruijie network products. First, you are required to log on to the vswitch to learn about and master the command line operation skills of the vswitch, and how to use some basic commands for configuration.


Requirement Analysis:

You need to be familiar with different configuration modes on the vswitch and how to switch between configuration modes, use commands for basic configuration, and be familiar with the operation skills on the command line interface.


Tutorial topology:


650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/04264211U-0.png "title =" 002.png" alt = "162127649.png"/>


Lab device:

One layer-3 Switch


Prerequisites

The command line interface and basic operations of the vswitch.


Tutorial principle:

Vswitches can be managed in two ways: in-band management and out-of-band management. The Management Switch through the Console port of the switch is an out-of-band management that does not occupy the network interface of the switch. It features the need to use the configuration cable for close-range configuration. You must use the Console port to configure the vswitch for the first time.

The command line operation modes of vswitches include user mode, privileged mode, global configuration mode, and port mode.

The first operation mode obtained after entering the vswitch in user mode. In this mode, you can simply view the vswitch's software and hardware version information and perform a simple test. User mode prompt: switch>

In the privileged mode, you can manage the configuration files of the vswitch, view the configuration information of the vswitch, and test and debug the network. The privileged mode prompt is switch #

The global configuration mode is the lower-level mode in privileged mode. In this mode, global parameters such as host name and logon information of the vswitch can be configured ). In this mode, you can enter the configuration mode of the next level to configure the specific functions of the switch. The global mode prompt is switch (config )#

The port mode is in the lower-level mode of global mode. In this mode, you can configure parameters for the vswitch ports. Port mode prompt: switch (config-if )#

Basic vswitch operation Commands include:

The Exit command is returned to the upper-level operation mode.

The End command means that the user directly returns to the privileged mode from the following level.

The switch command line can be used to obtain help information, abbreviated commands, auto-completion of commands, and shortcut keys.

The device name of the configuration switch and the description of the configuration switch must be executed in global configuration mode.

Hostname: The device name of the vswitch.

When a user logs on to a vswitch, you may need to inform the user of necessary information. You can set the title to achieve this goal. You can create two types of titles: Daily notification and logon title.

The daily message "motd message of the day" is displayed on the Banner motd configuration switch.

The Banner login configuration switch logon prompt is located after the daily prompt.

To view the system and configuration information of a vswitch, run the command in privileged mode.

A) view the vswitch version. You can view the vswitch hardware version information and software version information, which is used for the basis for upgrading the vswitch operating system.

B) Show mac-address-table: view the current MAC address table of the vswitch.

C) Show running-config.


Tutorial steps:

Step 1: directly switch between different operation modes of the vswitch

Swtich> enable

! Use the enable command to enter privileged mode from user mode

Swtich # configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

! Use the configure terminal command to switch from privileged mode to global configuration mode

Swtich (config) # interface fastEthernet 0/1

! Use the interface command to enter the interface Configuration Mode

Swtich (config-if )#

Swtich (config-if) # exit

! Use the exit command to return to the upper-level operation mode.

Swtich (config) # interface fastEthernet 0/2

Swtich (config-if) # end

Swtich #

! Use the end command to directly return to the privileged Mode

Step 2: basic functions of the vswitch command line interface

Switch>?

! Display All executable commands in Current Mode

Disable Turn off privileged commands

Enable Turn on privileged commands

Exit Exit from the EXEC

Help Description of the interactive help system

Ping Send echo messages

Rcommand Run command on remote switch

Show Show running system information

Telnet Open a telnet connection

Traceroute Trace route to destination

Swtich> en <tab>

Swtich> enable

! Use the tab key to complete the command

Swtich # con?

Configure connect

! Use? Display All commands starting with "con" in Current Mode

Swtich # conf t

Enter configuration commands, one per line. End with CNTL/Z.

Swtich (config )#

! Abbreviated command

Swtich (config) # interface?

! Executable parameters after the interface command is displayed

Aggregateport Aggregate port interface

Dialer interface

FastEthernet Fast IEEE 802.3

GigabitEthernet Gbyte Ethernet interface

Loopback interface

Multilink-group interface

Null interface

Tunnel interface

Virtual-ppp Virtual PPP interface

Virtual-template Virtual Template interface

Vlan interface

Range Interface range command

Switch (config) # interface

Swtich (config) # interface fastEthernet 0/1

Switch (config-if) # ^ Z

Switch #

! You can use the shortcut key "Ctrl + Z" to directly return to the privileged mode.

Switch # ping 1.1.1.1

Sending 5, 100-byte ICMP Echos to 1.1.1.1,

Timeout is 2000 milliseconds.

. ^ C

Switch #

! Run the ping 1.1.1.1 command in vswitch privileged mode to find that the target address cannot be pinged. By default, the vswitch needs to send 5 packets, if you do not want to wait until five packets cannot ping the target address, you can terminate the current operation by pressing Ctrl + C before five packets are sent.

Step 3: configure the vswitch name and daily prompt information

Switch (config) # hostname SW-1

! Use the hostname command to change the vswitch name

SW-1 (config) # banner motd $

! Run the banner command to set the daily prompt information of the vswitch. The motd parameter specifies the ending character of the message.

Enter TEXT message. End with the character '$ '.

Welcome to SW-1, if you are admin, you can config it.

If you are not admin, please EXIT!

$

SW-1 (config )#

SW-1 (config) # exit

SW-1 # Nov 25 22:04:01 SYS-5-CONFIG_ I: Configured from console by console

SW-1 # exit

SW-1 CON0 is now available.

Press RETURN to get started

Welcome to SW-1, if you are admin, you can config it.

If you are not admin, please EXIT!

SW-1>

Step 4: configure the interface status

The Fastethernet interface of the full range of ruijie switches is a 10 M/100 Mbit/s adaptive port by default, and the duplex mode is also adaptive port rate and duplex mode configurable ). By default, all vswitch ports are enabled.

If there are some old models of hosts in the network and 10 Mbit/s half-duplex NICs are still in use, in order to achieve normal access between hosts, configure the vswitch to set the port speed of the vswitch to 10 Mbit/s and the transmission mode to half duplex.

SW-1 (config) # interface fastEthernet 0/1

! Enter the configuration mode of port F0/1

SW-1 (config-if) # speed 10

! Configure the port speed to 10 M

SW-1 (config-if) # duplex half

! The duplex mode of the configured port is half duplex.

SW-1 (config-if) # no shutdown

! Enable the port to forward data. The switch port is enabled by default.

SW-1 (config-if) # description "This is a Accessport ."

! The description of the configured port, which can be used as a prompt.

SW-1 (config-if) # end

SW-1 # Nov 25 22:06:37 SYS-5-CONFIG_ I: Configured from console by console

SW-1 #

SW-1 # show interface fastEthernet 0/1

Index (dec): 1 (hex): 1

FastEthernet 0/1 is UP, line protocol is UP

Hardware is marvell FastEthernet

Description: "This is a Accessport ."

Interface address is: no ip address

MTU 1500 bytes, BW 10000 Kbit

Encapsulation protocol is Bridge, loopback not set

Keepalive interval is 10 sec, set

Carrier delay is 2 sec

RXload is 1, Txload is 1

Queueing strategy: WFQ

Switchport attributes:

Interface's description: "" This is a Accessport .""

Medium-type is copper

Lastchange time: 329 Day: 22 Hour: 5 Minute: 2 Second

Priority is 0

Admin duplex mode is Force Half Duplex, too duplex is Half

Admin speed is 10 M, invalid speed is 10 M

Flow control admin status is OFF, flow control ready status is OFF

Broadcast Storm Control is OFF, multicast Storm Control is OFF, unicast Storm Control is OFF

5 minutes input rate 0 bits/sec, 0 packets/sec

5 minutes output rate 0 bits/sec, 0 packets/sec

0 packets input, 0 bytes, 0 no buffer, 0 dropped

Received 0 broadcasts, 0 runts, 0 giants

0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort

0 packets output, 0 bytes, 0 underruns, 0 dropped

0 output errors, 0 collisions, 0 interface resets

SW-1 #

To restore the configuration of the switch port to the default value, use the default command.

SW-1 (config) # interface fastEthernet 0/1

SW-1 (config-if) # default bandwidth

! Recover the default bandwidth settings of the port

SW-1 (config-if) # default description

! Description of the canceled Port

SW-1 (config-if) # default duplex

! Restore Default port duplex settings

SW-1 (config-if) # end

SW-1 # Nov 25 22:11:13 SYS-5-CONFIG_ I: Configured from console by console

SW-1 #

SW-1 # show interface fastEthernet 0/1

Index (dec): 1 (hex): 1

FastEthernet 0/1 is UP, line protocol is UP

Hardware is marvell FastEthernet

Interface address is: no ip address

MTU 1500 bytes, BW 100000 Kbit

Encapsulation protocol is Bridge, loopback not set

Keepalive interval is 10 sec, set

Carrier delay is 2 sec

RXload is 1, Txload is 1

Queueing strategy: WFQ

Switchport attributes:

Interface's description :""

Medium-type is copper

Lastchange time: 329 Day: 22 Hour: 11 Minute: 13 Second

Priority is 0

Admin duplex mode is AUTO, invalid duplex is Full

Admin speed is AUTO, invalid speed is 100 M

Flow control admin status is OFF, flow control ready status is ON

Broadcast Storm Control is OFF, multicast Storm Control is OFF, unicast Storm Control is OFF

5 minutes input rate 0 bits/sec, 0 packets/sec

5 minutes output rate 0 bits/sec, 0 packets/sec

0 packets input, 0 bytes, 0 no buffer, 0 dropped

Received 0 broadcasts, 0 runts, 0 giants

0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort

0 packets output, 0 bytes, 0 underruns, 0 dropped

0 output errors, 0 collisions, 0 interface resets

SW-1 #

Step 5: view the system and configuration information of the vswitch

SW-1 # show version

! View the system information of a vswitch

System description: Ruijie Dual Stack Multi-Layer Switch (S3760-24) By Ruijie Network

! Vswitch description and Model)

System start time: 21:58:44

System hardware version: 1.0

! Hardware version information of the device

System software version: RGNOS 10.2.00 (2), Release (27932)

! Operating system version information

System boot version: 10.2.27014

System CTRL version: 10.2.24136

System serial number: 0000000000000

SW-1 #

SW-1 # show running-config

! View vswitch configuration information

Building configuration...

Current configuration: 1279 bytes

!

Version RGNOS 10.2.00 (2), Release (27932) (Thu Dec 13 10:31:41 CST 2007-ngcf32)

Hostname SW-1

!

Vlan 1

!

No service password-encryption

!

Interface FastEthernet 0/1

!

Interface FastEthernet 0/2

!

Interface FastEthernet 0/3

!

Interface FastEthernet 0/4

!

Interface FastEthernet 0/5

!

Interface FastEthernet 0/6

!

Interface FastEthernet 0/7

!

Interface FastEthernet 0/8

!

Interface FastEthernet 0/9

!

Interface FastEthernet 0/10

!

Interface FastEthernet 0/11

!

Interface FastEthernet 0/12

!

Interface FastEthernet 0/13

!

Interface FastEthernet 0/14

!

Interface FastEthernet 0/15

!

Interface FastEthernet 0/16

!

Interface FastEthernet 0/17

!

Interface FastEthernet 0/18

!

Interface FastEthernet 0/19

!

Interface FastEthernet 0/20

!

Interface FastEthernet 0/21

!

Interface FastEthernet 0/22

!

Interface FastEthernet 0/23

!

Interface FastEthernet 0/24

!

Interface GigabitEthernet 0/25

!

Interface GigabitEthernet 0/26

!

Interface GigabitEthernet 0/27

!

Interface GigabitEthernet 0/28

!

!

Line con 0

Line vty 0 4

Login

!

!

Banner motd ^ C

Welcome to SW-1, if you are admin, you can config it.

If you are not admin, please EXIT!

^ C

!

End

Step 6: Save the Configuration

The following three commands can save the configuration.

SW-1 # copy running-config startup-config

SW-1 # write memory

SW-1 # write

Note]

1. When the command line operation is automatically completed or the command is abbreviated, the abbreviated letters must be unique to distinguish the command. For example, switch # conf can represent configure, but switch # co cannot represent configure, because the commands starting with co have two copies and configure, and the devices cannot be different.

2. Note that the types of commands that can be executed in each operation mode are different. The switch cannot run commands in different modes.

3. Set the valid characters of the device name to 22 bytes.

4. When configuring the daily prompt, note that the terminator cannot appear in the description text. If the characters are still entered after the end Terminator is entered, these characters are discarded by the system.

5. The switch port is enabled by default, and the AdminStatus is UP. If the port is not actually connected to other devices, the OperStatus is down.

6. show running-config displays the configuration information currently in effect, which is stored in RAM Random storage.) When the switch loses power, the new configuration information is generated again when it is restarted.


This article is from the "Security_net" blog, please be sure to keep this http://yxh1157686920.blog.51cto.com/7743046/1300664

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.