CCNA实验攻略1:配置Cisco交换机

要配置好Cisco交换必须熟悉IOS命令及相关的知识。

交换机启动:

C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
Compiled Mon 22-Jul-02 18:57 by miwang
Cisco WS-C2950-24 (RC32300) processor (revision C0) with 21039K bytes of memory.
2950-24 starting...
Base ethernet MAC Address: 000C.CF79.47D3
Xmodem file system is available.
Initializing Flash...
flashfs[0]: 1 files, 0 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 64016384
flashfs[0]: Bytes used: 3058048
flashfs[0]: Bytes available: 60958336
flashfs[0]: flashfs fsck took 1 seconds.
...done Initializing Flash.

Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4


Loading "flash:/c2950-i6q4l2-mz.121-22.EA4.bin"...
########################################################################## [OK]
              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706



Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

Cisco WS-C2950-24 (RC32300) processor (revision C0) with 21039K bytes of memory.
Processor board ID FHK0610Z0WC
Running Standard Image
24 FastEthernet/IEEE 802.3 interface(s)

63488K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address: 000C.CF79.47D3
Motherboard assembly number: 73-5781-09
Power supply part number: 34-0965-01
Motherboard serial number: FOC061004SZ
Power supply serial number: DAB0609127D
Model revision number: C0
Motherboard revision number: A0
Model number: WS-C2950-24
System serial number: FHK0610Z0WC

Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

Press RETURN to get started!

一、几种配置命令模式:

Switch>用户命令模式
Switch>
Switch>en
Switch>en
Switch>enable 进入特权命令模式
Switch#
Switch#dis
Switch#disa
Switch#disable 退出特权命令模式
Switch>
Switch>enab
Switch>enable 
Switch#
Switch#confi
Switch#config 进入端口配置命令模式
Configuring from terminal, memory, or network [terminal]? 这里有三种模式
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#hostna 
Switch(config)#hostname bindu 改名
bindu(config)#
bindu(config)#int
bindu(config)#interface f0/0
%Invalid interface type and number
bindu(config)#interface f0/1 
bindu(config-if)#

二、检查、查看命令:查看当前配置状况,通常是以show(sh)为开始命令

  在特权命令模式下使用

  show version 查看IOS的版本

  show flash 查看flash内存使用状况

  show mac-address-table 查看MAC地址列表

三、密码设置命令

  首先设置进入特权模式的密码:

Switch_bindu(config)#enable password able 设置进入特权模式的密码
Switch_bindu(config-line)# 可以通过console端口连接设备及Telnet远程登录时所需的密码
bindu(config)#hostname Switch_bindu
Switch_bindu(config)#ena
Switch_bindu(config)#enable pass
Switch_bindu(config)#enable password able
Switch_bindu(config)#lin
Switch_bindu(config)#line con
Switch_bindu(config)#line console 0
Switch_bindu(config-line)#pass
Switch_bindu(config-line)#password line
Switch_bindu(config-line)#logi
Switch_bindu(config-line)#login 
Switch_bindu(config-line)#line vty
Switch_bindu(config-line)#line vty 0 4
Switch_bindu(config-line)#pass
Switch_bindu(config-line)#password vty
Switch_bindu(config-line)#login
Switch_bindu(config-line)#exit
Switch_bindu(config)#

 默认情况下,这些密码都是以明文的形式存储的,所有很容易查看到。为了避免这种情况,我们可以以秘文的形式存储各种密码:

  service password-encryption

猜你喜欢

转载自www.cnblogs.com/1218-mzc/p/9777935.html