交换机的基本配置
一、实验名称
交换机的基本配置 二、实验目的
掌握交换机命令行各种操作模式的区别,能够使用各种帮助信息,以及用命令进行基本的配置。 三、背景描述
某公司新来一位网管,公司要求其熟悉网络产品,并采用全系列锐捷网络产品。首先要登录交换机,了解并掌握交换机的命令行操作技巧,以及使用一些基本命令进行配置。 四、需求分析
需要在交换机上熟悉各种不同的配置模式,以及如何在配置模式间切换,使用命令进行基本的配置,并熟悉命令行界面的操作技巧。 五、实验拓扑
实验拓扑图如图1-1所示。
图 1-1
六、实验设备
三层交换机1台。 七、预备知识
交换机的命令行界面和基本操作。 八、实验原理
交换机的管理方式基本分为带内管理和带外管理两种。通过交换机的Console口管理交换机就属于带外管理,不占用交换机的网络接口,其特点是需要使用配置线缆,近距离配置。第一次配置交换机时必须利用Console端口进行配置。
交换机的命令行操作模式,主要包括:用户模式、特权模式、全局配置模式、端口模式等几种。 九、实验步骤
步骤1:
System bootstrap ...
Nor Flash ID: 0x00010049, SIZE: 2097152Bytes Press Ctrl+B to enter Boot Menu ...... Load Ctrl Program ...
Load CTRL with ECC......
Executing program, launch at: 0x01000000
Ctrl Version: RGOS 10.3(4b3), Release(65758)
MTD_DRIVER-5-MTD_NAND_FOUND: 1 NAND chips(chip size : 33554432) detected Press Ctrl+C to enter Ctrl Menu
====== Ctrl Menu(\"Ctrl+Z\" to upper level) ====== ************************************************ TOP menu items.
************************************************ 0. Tftp utilities. 1. XModem utilities. 2. Run Main.
3. Run an Executable file. 4. File management utilities.
5. Scattered utilities.
************************************************ Press a key to run the command: 4
====== Ctrl Menu(\"Ctrl+Z\" to upper level) ====== ************************************************ File management utilities.
************************************************ 0. List information about the files. 1. Remove a file.
2. Rename or Move a file.
3. Format flash filesystem.
************************************************ Press a key to run the command: 1
The filename you want to remove:config.text
====== Ctrl Menu(\"Ctrl+Z\" to upper level) ====== ************************************************ File management utilities.
************************************************ 0. List information about the files. 1. Remove a file. 2. Rename or Move a file. 3. Format flash filesystem.
************************************************ Press a key to run the command:
Hot Commands:
------------------------------------------------------------
------------------------------------------------------------
Ctrl>load
Executing program, launch at: 0x00010000 Ruijie General Operating System Software
Release Software (tm), RGOS 10.3(4b3), Release(65758), Compiled Fri Sep 25 15:01 :04 CST 2009 by ngcf32
Copyright (c) 1998-2009s by Ruijie Networks. All Rights Reserved.
Decompiling or Reverse Engineering is Not Allowed.
*Dec 26 20:01:11: %MTD_DRIVER-5-MTD_NAND_FOUND: 1 NAND chips(chip size : 3355443 2) detected
*Dec 26 20:01:26: %DEVICE-5-CHANGED: Device S3760-24 (1) changed state to up. *Dec 26 20:01:41: %SYS-5-COLDSTART: System coldstart.
Ruijie> Ruijie>enable
Ruijie#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Ruijie(config)#interface fastEthernet 0/1 Ruijie(config-if-FastEthernet 0/1)#exit Ruijie(config)#interface fastEthernet 0/2
Ruijie(config-if-FastEthernet 0/2)#end
Ruijie#*Dec 26 20:05:34: %SYS-5-CONFIG_I: Configured from console by console 步骤2: Ruijie#?
Exec commands:
<1-99> Session number to resume
cd Change current working directory clear Reset functions
clock Manage the system clock configure Enter configuration mode
copy Copy from one file to another
cp Copy file from source to destine file or dir. debug Debugging functions (see also 'undebug') del Delete files
dir List directory contents disable Turn off privileged commands
disconnect Disconnect an existing network connection enable Turn on privileged commands execute Execute scripts
exit Exit from the EXEC
help Description of the interactive help system ip Internet protocol
ipv6 Internet protocol version 6
ln Create a link to the specified target with link_name
lock Lock the terminal ls List directory contents
makefs Format a device with specified filesystem mkdir Make directories
more Print logging information in flash Ruijie#en Ruijie#enable Ruijie#con? Configure
Ruijie#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Ruijie(config)#
Ruijie(config)#interface ?
Aggregateport Aggregate port interface Dialer Dialer interface FastEthernet Fast IEEE 802.3
GigabitEthernet Gbyte Ethernet interface Loopback Loopback interface
Multilink Multilink-group interface Null Null interface
Tunnel Tunnel interface Virtual-ppp Virtual PPP interface Virtual-template Virtual Template interface Vlan Vlan interface
range Interface range command
Ruijie(config)#interface % Incomplete command.
Ruijie#*Dec 26 20:13:36: %SYS-5-CONFIG_I: Configured from console by console
Ruijie#ping 1.1.1.1
Sending 5, 100-byte ICMP Echoes to 1.1.1.1, timeout is 2 seconds: < press Ctrl+C to break > ..
Success rate is 0 percent (0/2) 步骤3:
Ruijie#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Ruijie(config)#hostname sw-1
configure terminal
sw-1(config)#banner motd $
Enter TEXT message. End with the character '$'. $
sw-1(config)#exit
sw-1#*Dec 26 20:25:00: %SYS-5-CONFIG_I: Configured from console by console
sw-1#exit
sw-1 CON0 is now available
Press RETURN to get started 步骤4: sw-1>enable
sw-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. sw-1(config)#interface fastEthernet 0/1 sw-1(config-if-FastEthernet 0/1)#speed 10 sw-1(config-if-FastEthernet 0/1)#duplex half
sw-1(config-if-FastEthernet 0/1)#no shutdown
sw-1(config-if-FastEthernet 0/1)#description \"This is a Accessport.\" sw-1(config-if-FastEthernet 0/1)#end
sw-1#*Dec 26 20:34:14: %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 DOWN , line protocol is DOWN 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: FIFO Output queue 0/0, 0 drops; Input queue 0/75, 0 drops
Switchport attributes:
interface's description:\"\"This is a Accessport.\"\" medium-type is copper
lastchange time:0 Day: 0 Hour: 0 Minute:14 Second
Priority is 0
admin duplex mode is Force Half Duplex, oper duplex is Unknown admin speed is 10M, oper speed is Unknown
flow control admin status is OFF,flow control oper status is Unknown
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# sw-1#
sw-1#enable
sw-1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. sw-1(config)#interface fastEthernet 0/1
sw-1(config-if-FastEthernet 0/1)#default bandwidth
sw-1(config-if-FastEthernet 0/1)#default description sw-1(config-if-FastEthernet 0/1)#default duplex sw-1(config-if-FastEthernet 0/1)#end
sw-1#*Dec 26 20:39:43: %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 DOWN , line protocol is DOWN Hardware is marvell FastEthernet 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: FIFO Output queue 0/0, 0 drops; Input queue 0/75, 0 drops Switchport attributes:
interface's description:\"\" medium-type is copper
lastchange time:0 Day: 0 Hour: 0 Minute:14 Second
Priority is 0
admin duplex mode is AUTO, oper duplex is Unknown admin speed is 10M, oper speed is Unknown
flow control admin status is OFF,flow control oper status is Unknown
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 步骤5:
sw-1#show version
System description : Ruijie Dual Stack Multi-Layer Switch(S3760-24) By Ruij ie Network
System start time : 2011-12-26 20:1:11 System uptime : 0:0:41:45 System hardware version : 1.71
System software version : RGOS 10.3(4b3), Release(65758) System BOOT version : 10.3.65758 System CTRL version : 10.3.65758 System serial number : 2935DH6130589 sw-1#
sw-1#show running-config
Building configuration...
Current configuration : 1217 bytes
!
version RGOS 10.3(4b3), Release(65758)(Fri Sep 25 15:01:04 CST 2009 -ngcf32) hostname sw-1 ! ! ! ! vlan 1 ! !
no service password-encryption !
interface FastEthernet 0/1 speed 10
!
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 ^C ! End
步骤6:
sw-1#copy running-config startup-config
Building configuration...
[OK]
sw-1#write memory
Building configuration...
[OK]
sw-1#write
Building configuration...
[OK]
因篇幅问题不能全部显示,请点此查看更多更全内容