的方法
一、交换机的基本配置
Author:chenchao in ZJNU
从本篇文章开始,将连载大概8-9篇自己学习交换与路由的实验报告,但是怕自己能力不行,会出现错误,所以,先载两篇文章,依次颤陆亮为:交换机的基本配置路由器基本配置。本篇为交换茄宽机的基本配置,使用的模拟软体是Cisco的悉迟一款免费软体:Cisco Packet Tracer。想学习的可以在百度自行下载。
下面开始附上实验过程:
实验环境:
Cisco 2950交换机1台,Console电缆1根,PC机一台,网线1根。连线如下图所示:
实验步骤:
一、 交换机的带外配置
1、 在使用者模式、特权模式、全域性模式、介面模式之间转换
Switch>enable
Switch#configure terminal
Enter configuration mands, one perline. End with CNTL/Z.
Switchconfig#interface FastEthernet 0/1
Switchconfig-if#exit
Switchconfig#exit
Switch#
%SYS-5-CONFIG_I: Configured from console byconsole
Switch#exit
Switch con0 is now available
Press RETURN to get started.
Switch>
2、将交换机的名称改为“student”
Switchconfig#hostname student
studentconfig#
3、 为交换机各个模式设定密码“cisco”
特权模式下的密码保护
student#enable
student#configure t
Enter configuration mands, one perline. End with CNTL/Z.
studentconfig#enable password cisco
studentconfig#enable secret cisco1
远端登入口令设定
student#configure t
Enter configuration mands, one perline. End with CNTL/Z.
studentconfig#line console 0
studentconfig-line#line vty 0 4
studentconfig-line#password cisco2
studentconfig-line#login
studentconfig-line#
student#
4、为交换机制定一个IP地址10.10.10.X/24
student#config
Configuring from terminal, memory, ornetwork [terminal]?
Enter configuration mands, one perline. End with CNTL/Z.
studentconfig#interface vlan 1
studentconfig-if#ip address 10.10.10.1255.0.0.0
5、开启交换机的Telnet服务功能,建立Telnet使用者admin,口令cisco,并制定只能从10.10.10.y/24登入Telnet伺服器
student#
student#configure t
Enter configuration mands, one perline. End with CNTL/Z.
studentconfig#user admin password 0 cisco
studentconfig#
6、 检视配置情况
student>enable
Password:
student#show running-c
Building configuration...
hostname student
!
enable secret 5$1$mERr$q.MA2tj.WFptzvbifq/1i.
enable password cisco
!
!
username admin password 0 cisco
interface Vlan1
ipaddress 10.10.10.1 255.0.0.0
!
!
line con 0
!
line vty 0 4
password cisco2
login
line vty 5 15
login
!
!
End
二、交换机的埠配置:
1、 配置介面的描述、关闭借口、启动介面、配置介面的速度为100Mbps、配置介面工作模式为全双工、配置介面的流程控制
student#configure terminal
Enter configuration mands, one perline. End with CNTL/Z.
studentconfig#interface FastEthernet0/1
studentconfig-if#shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to down
studentconfig-if#
studentconfig-if#exit
studentconfig#interface FastEthernet0/1
studentconfig-if#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to up
studentconfig-if#speed 100
studentconfig-if#duplex full
%LINK-5-CHANGED: Interface FastEthernet0/1,changed state to down
%LINEPROTO-5-UPDOWN: Line protocol onInterface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol onInterface Vlan1, changed state to down
studentconfig-if#
2、 配置介面FastEthernet0/10为Access口
student#
student#configure terminal
Enter configuration mands, one perline. End with CNTL/Z.
studentconfig#interface FastEthernet0/10
studentconfig-if#switchport mode access
studentconfig-if#
3、 配置介面FastEthernet0/12为Trunk口
student#
student#configure t
Enter configuration mands, one perline. End with CNTL/Z.
studentconfig#interface fastethernet0/12
studentconfig-if#switchport mode Trunk
studentconfig-if#end
4、 检视配置情况
!
interface FastEthernet0/1
duplex full
speed100
!
interface FastEthernet0/2
!
interface FastEthernet0/9
!
interface FastEthernet0/10
switchport mode access
!
interface FastEthernet0/11
!
interface FastEthernet0/12
switchport mode trunk
!
student#show running-c
Building configuration...
Current configuration : 1275 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname student
!
enable secret 5$1$mERr$q.MA2tj.WFptzvbifq/1i.
enable password cisco
!
!
username admin password 0 cisco
!
!
interface FastEthernet0/1
duplex full
speed 100
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
switchport mode access
!
interface FastEthernet0/11
!
interface FastEthernet0/12
switchport mode trunk
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet1/1
!
interface GigabitEthernet1/2
!
interface Vlan1
ipaddress 10.10.10.1 255.0.0.0
!
!
line con 0
!
line vty 0 4
password cisco2
login
line vty 5 15
login
!
!
end
进入交换机底层,通过修改交换机原始配置文件名字,重启交换机后,交换机找不到原来配置文件情况下,就会加载默认系统文件(即:交换机出厂配置),以达到清除交换机密码的目的。
思科交换机清除配置的方法 篇1本文以Catalyst 2940为例:
1、电脑COM口(没有的使用USB转COM转接头)通过console线连接到交换机console口,并打开超级终端调试窗口。
2、交换机接上电,茄核上电过程中,按住交换机正面"mode"按钮,直到sys灯不闪动为止(即:常亮状态)松开"mode"按钮(也可以关注超级终端界面显示字符了就可以松开"mode"按钮),进入到交换机的底层模式switch:
3、输入命令switch: flash_init回车,初始化flash的文件系统(该模式下,不支持命令的缩写,一定要把命令写全。)
4、输入命令switch: dir flash: 回车,查看交换机配置文件。(注意flash后面是有冒号的)
5、输入命令switch: rename flash:config.text flash:config.bak回车,重命名交换机原始配置文件为config.bak,并使用命令switch:dir flash:查看文件名是否修改成功
6、成功后,输入命令switch: boot,重启交换机。
7、最好在重启后清空当前配置和VLAN数据
Switch#erase startup-config
Switch# flash:vlan.dat
Switch#reload
最颤仿掘后当系统提示是否保存配置时,选择no
思科交换机清除配置的'方法 篇2工具/原料
CISCO系列交换
方法/步骤
大物1、首先备份之前的配置信息
copy flash:config.text config.old
2、清除交换机配置命令:write erase
当然也可以使用erasestartup-config就可以实现清除了
3、reload
重启查看
END
删除vlan
察看当前VLAN配置Cat2950#show vlan
察看Flash中的文件名称(交换机的配置文件和ios都保存在Flash中)Cat2960#dir flash: 看一下VLAN文件在FLASH里的具体名称,一般的都是VLAN.DAT
3、删除vlan.dat (交换机的VLAN信息保存在vlan.dat中)Cat2960# flash:vlan.dat
4、删除VLAN信息后再次察看当前的VLAN配置Cat2960#show vlan
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)