




已阅读5页,还剩31页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
. 网络互联技术实验手册- 2011-2012学年第二学期 -目录一、交换机基本命令-03二、交换机的访问控制-05三、交换机系统文件的备份和还原-08四、交换机VLAN的划分-11五、跨交换机相同VLAN之间通信-14六、MAC 地址功能扩展-17七、交换机的DHCP功能-20八、生成树实验-22九、交换机链路聚合-25十、三层交换机的路由功能-28十一、私有VLAN-32十二、动态vlan-36一、交换机基本命令一、快捷键的使用Tab制表: 用于补齐命令上光标 :显示上一个命令下光标 :显示下一个命令Ctrl+P :相当于上光标Ctrl+n :相当于下光标Ctrl+z :从其他配制模式(除一般用户配制模式)直接退出到特权配制模式Ctrl+c :打断交换机的ping 进程二、检查输入错误原因Unrecognized command or illegal parameter! 命令不存在,或者参数的范围,类型,格式有错误。Ambiguous command 根据已有的输入可以产生至少两种不同的解释Invalid command or parameter 命令解析成功/但没有任何有效的参数纪录Shell task error 多任务时,新的shell 任务启动失败This command is not exist in current mode 命令可解析,但当前模式下不能配制该命令Please configurate precursor comand “*” at fist! 当前输入可以被正确解析,但其前导命令尚未配制。Syntx error:missing “” beforce the end old command line ! 输入中使用了引号,但没有成对出现。三、常用命令 ? 描述命令可使用的参数或者提示信息 Help 提示帮助信息 Show version 显示交换机版本信息 Show running-config 显示当前运行状态下生效的交换机参数配置 Show startup-config 显示当前运行状态下写在闪存中的交换机参数配置 Show interface Ethernet 0/0/01显示指定交换机端口信息Show flash 显示保存在FLASH中的文件及大小 Show arp 显示ARP映射表 Show history 显示用户最近输入的历史命令 Show rom 显示启动文件及大小四、将交换机恢复出厂设置 switch#set default /将设备恢复出厂设置 switch#write /保存设置switch#reload /重启交换机switch /一般用户模式switch# /特权配置模式switch(Config)# /全局配置模式五、交换机的访问权限设置1.设置enable 密码 switch(Config)#enable password level admin /设置管理级别密码Current password: /输入当前密码,当前密码都是空直接回车即可New password:* /输入要设置的新密码Confirm new password:* /确认新密码,switch(Config)#exit /退出到一般用户模式switch#exitswitchswitchenable /在进入特权模式,就要求你输入密码Password:*switch(Config)#enable password level visitor /设置访问级别密码New password:* /直接输入新密码Confirm new password:* /确认新密码switch(Config)#exit /退出到一般用户模式switch#exitswitchswitchenable level visitor /进入访问级别Password:* /要求输入密码2.清除enable 密码 /使用取消命令 no 清除管理级别密码switch(Config)#no enable password level admin Input password:* /清除访问级别密码,无须输入密码直接使用该命令即可。 switch(Config)#no enable password level visitor 六、忘记交换机密码设置以上方法是知道密码的前提下的清楚方法,如果是忘记密码的情况下,可以重起交换机按住:ctrl+B 进入bootrom模式使用 nopassword命令。(此清除密码的方法只是让同学们了解无须操作)二、交换机的访问控制一 实验目的:掌握交换机的带外访问和带内访问二 实验设备DCRS-3926 或者dcrs-5526 交换机 Console 线 网线三 实验拓扑结构switch Console线 网线PC设备交换机PCIP地址0本地IP地址四 实验要求 使用计算机对交换机进行连接控制五 实验步骤 1switchenable switch# /进入特权模式switch# configswitch(Config)# /进入全局模式/思考1:如何给交换机分配IP地址?/方法:进入相应的vlan接口进行IP 地址分配。switch(Config)#interface vlan 1switch(Config-If-Vlan1)# /进入VLAN接口配置模式2. switch(Config-If-Vlan1)#ip address 0 /配置交换机Ip地址3. 进行计算机与交换机的连通性测试/思考2: 若线路连接正常,命令配置正确,还是ping不通,则问题可能出在哪里? /方法:关闭本地防火墙。步骤:本地连接 属性 高级选项卡 Window防火墙设置 关闭防火墙4. switch(Config)#telnet-server enableTelnetd already enabled. /开启telnet 服务5 switch(Config)#telnet-user jincong password 0 123456 /设置telnet 服务的用户名和密码/注:0代表明文加密,7代表密文加密。6进行telnet 连接7switch(Config)#ip http serverweb server is on /开机交换机web 服务switch(Config)#web-user chen password 0 123/设置web 服务的用户名和密码8测试web 访问进入WEB访问页面/思考3:switch(Config)#interface vlan 1与switch(Config)#vlan 1有何区别?进入interface vlan 1: /进入VLAN 的接口进行配置,如配置IP地址。switch(Config)#interface vlan 1switch(Config-If-Vlan1)#? arp - arp exit - Exit Interface mode help - help interface - Select an interface to configure ip - Internet Protocol no - Negate a command or set its default shutdown - Shutdown the selected interface vlan - Vlan Commands进入vlan 1: /进入VLAN 内部进行配置switch(Config)#vlan 1switch(Config-Vlan1)#? exit - 退出Vlan模式 help - 帮助 interface - 选择一个配置接口 name - 设置Vlan名称 no - 取消某命令或配置交换机缺省值 private-vlan - 配置私有Vlan switchport - 交换端口信息 vlan - VLAN命令/思考4:交换机中若有其他vlan,能否直接进入其vlan接口? 答案:不行switch(Config)#interface vlan 1switch(Config-If-Vlan1)# /进入vlan 1 接口,其为默认接口switch(Config)#vlan 2switch(Config-Vlan2)#interface vlan 2L3 interface table is fullinterface error!/方法:先关闭原有的vlan接口,再进入相应的vlan接口进行IP 地址分配。switch(Config)#no interface vlan 1 /关闭vlan 1 接口switch(Config)#interface vlan 200:23:12: %LINK-5-CHANGED: Interface Vlan2, changed state to UPswitch(Config-If-Vlan2)#/思考5:如何重新启用interface vlan 1 接口?switch(Config)#no interface vlan 2 /关闭vlan 2 接口switch(Config)#interface vlan 1 00:25:59: %LINK-5-CHANGED: Interface Vlan1, changed state to UP%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to UP三、交换机系统文件的备份和还原一、 实验目的:交换机FTP服务器的配置二、 实验设备1、 DCRS-3926S三层交换机2台2、 PC机器1台三、 实验拓扑结构交换机A vlan 1 0/24 交叉线 PC1 3/24交换机B vlan 1 0/24 PC2 4/24设备交换机A交换机BPC1PC2IP地址0/240/243/24PC2 4/24四、 实验要求1、 在交换机上启动FTP服务。2、 实现交换机系统文件的上传与下载3、 系统文件包括:nos.img、startup-config、running-configswitch#show flashfile name file lengthnos.img 1720035 bytes !交换机软件系统startup-config 0 bytes !启动配置文件running-config 783 bytes !当前配置文件五、 试验步骤(一)将交换机A上的配置更新到交换机B上1 交换机A恢复出厂设置。 switch#set default switch#writeswitch#reload2 交换机A的配置 switchA(Config)#interface vlan 102:23:05: %LINK-5-CHANGED: Interface Vlan1, changed state to UPswitchA(Config-If-Vlan1)#ip address 0 /设置VLAN的IP地址switchA(Config)#ftp-server enable /启动FTP服务ftp server has startedswitchA(Config)#ip ftp-server username jincong password 0 123456 /设置FTP服务的用户名和密码。/注意在交换机A 上,Write前show flash查看文件资料,Write后show flash查看文件资料,注意两者不同之处。switchA#show flashfile name file lengthnos.img 1833058 bytesstartup-config 0 bytesrunning-config 884 bytesswitchA#write /写入配置文件信息switchA#show flashfile name file lengthnos.img 1833058 bytesstartup-config 884 bytesrunning-config 884 bytes3交换机B恢复出厂设置。 switch#set default switch#writeswitch#reload4交换机B的配置 switchB(Config)#interface vlan 102:23:05: %LINK-5-CHANGED: Interface Vlan1, changed state to UPswitchB(Config-If-Vlan1)#ip address 0 /设置VLAN的IP地址 switchB#copy ftp:/jincong:1234560/startup-config startup-config Confirm copy startup-config fileY/N:y /从交换机A还原到交换机B或者称为更新/注意FTP和生成树有冲突,同时,还原过去后要把交换机间互联的网线拔除,以避免冲突(因为两台交换机IP一样)。5重启交换机B,查看更新后的结果交换机B中显示结果:switchB#reload /重启交换机BswitchA#show running-config /交换机B的配置更换成交换机A 的配置current configuration:! hostname AAAA! ip ftp-server username jincong password 0 123456 ftp-server enableinterface Vlan1 interface vlan 1 ip address 0 (二)将交换机A上的配置备份到本地电脑C盘根目录下6备份交换机的系统文件到计算机上switchA(Config)#interface vlan 102:23:05: %LINK-5-CHANGED: Interface Vlan1, changed state to UPswitchA(Config-If-Vlan1)#ip address 0 /设置VLAN的IP地址switchA(Config)#ftp-server enable /启动FTP服务ftp server has startedswitchA(Config)#ip ftp-server username jincong password 0 123456 /设置FTP服务的用户名和密码。7在PC上运行cmd进入DOS窗口C:ftpftp open 0 /打开FTPConnected to 0.220 welcome your using ftp server.User (0:(none): jincong /输入用户名和密码331 User name okay,need passwordPassword:230 User logged in,proceedftp dir /查看交换机系统文件200 PORT Command successful150 ascii type in transfer filefile name file lengthnos.img 1688115 /nos.img 系统文件nos.rom 568224 /nos.rom 系统启动文件startup-config 0 /startup-config 启动配置文件running-config /running-config 运行配置文件226 transfer complete.ftp: 收到 134 字节,用时 0.00Seconds 134000.00Kbytes/sec.ftp get nos.img c:nos.img /下载并保存交换机系统文件在C:200 PORT Command successful150 ASCII type in transfer file226 transfer complete.ftp: 收到 1688131 字节,用时 2.20Seconds 766.29Kbytes/sec. 四、交换机VLAN的划分一、 实验目的:了解VLAN 工作原理(每个vlan就是一个广播域,划分vlan可以隔离广播风暴);熟练掌握二层交换机VLAN的划分方法;了解如何验证VLAN 的划分;二、 实验设备:1DCS-3926S交换机1台2PC机1台3Console 线、直通双绞线三、 实验拓扑:Console 线 网线PC1四、 实验要求: VlanIP端口号Vlan 101-8Vlan 100无9-16Vlan 200无17-24 PC1位置动作结果1-7端口PC1 ping 交换机通8-16端口PC1 ping 交换机不通17-24端口PC1 ping 交换机不通1-7端口交换机 ping PC1通8-16端口交换机 ping PC1不通17-24端口交换机 ping PC1不通五、 实验步骤:1.交换机恢复出厂设置。 switch#set default switch#writeswitch#reload2.对交换机设置IP地址即管理IP地址 switch#configswitch(Config)#interface vlan 1switch(Config-If-Vlan1)#ip address 0 switch(Config-If-Vlan1)#exitswitch#write3. 在交换机中创建vlan 100和vlan 200 switch(Config)#vlan 100 switch(Config-Vlan100)#exit /分别建立了 100和200两个vlanswitch(Config)#vlan 200switch(Config-Vlan200)#exit4查看验证已经建立好的两个VLANswitch#show vlanVLAN Name Type Media Ports- - - - -1 default Static ENET Ethernet0/0/1 Ethernet0/0/2 Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7 Ethernet0/0/8 Ethernet0/0/9 Ethernet0/0/10 Ethernet0/0/11 Ethernet0/0/12 Ethernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16 Ethernet0/0/17 Ethernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethernet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24100 VLAN0100 Static ENET /已经创建了VLAN100,但是VLAN中没有端口200 VLAN0200 Static ENET /已经创建了VLAN200,但是VLAN中没有端口5给VLAN 100和VLAN 200添加端口 switch(Config)#vlan 100 /进入VLAN 100的配置模式 switch(Config-Vlan100)#switchport interface ethernet 0/0/8-16Set the port Ethernet0/0/8 access vlan 100 successfully ./并把8-16的端口划分给VLAN 100Set the port Ethernet0/0/12 access vlan 100 successfullySet the port Ethernet0/0/13 access vlan 100 successfullySet the port Ethernet0/0/14 access vlan 100 successfullySet the port Ethernet0/0/15 access vlan 100 successfullySet the port Ethernet0/0/16 access vlan 100 successfullyswitch(Config-Vlan100)#exitswitch(Config)#vlan 200 /进入VLAN 200的配置模式switch(Config-Vlan200)#switchport interface ethernet 0/0/17-24Set the port Ethernet0/0/17 access vlan 200 successfully ./ 并把17-24的端口划分给VLAN 200Set the port Ethernet0/0/22 access vlan 200 successfullySet the port Ethernet0/0/23 access vlan 200 successfullySet the port Ethernet0/0/24 access vlan 200 successfullyswitch(Config-Vlan200)#exit/思考1:switchport interface ethernet 0/0/1中,ethernet 0/0/1分别代表什么含义?/ ethernet 0/0/1 中:第一个0 表示堆叠中的第一台交换机,如果是1,就表示第2 台交换机;第二个0 表示交换机上的第1 个模块(DCS-3926s 交换机有3 个模块:网络端口模块(M0),模块1(M1),模块2(M2);第三个1 表示当前模块上的第1 个网络端口。0/0/1 表示用户使用的是堆叠中第一台交换机网络端口模块上的第一个网络端口。默认情况下,如果不存在堆叠,交换机总会认为自己是第 0 台交换机。6. 查看验证是否已经按照要求把端口划分给两个VLAN switch#show vlanVLAN Name Type Media Ports- - - - -1 default Static ENET Ethernet0/0/1 Ethernet0/0/2 Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7100 VLAN0100 Static ENET Ethernet0/0/8 Ethernet0/0/9 Ethernet0/0/10 Ethernet0/0/11 Ethernet0/0/12 Ethernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16200 VLAN0200 Static ENET Ethernet0/0/17 Ethernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethernet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24/思考2:请同学们考虑怎么取消VLAN 或者删除VLAN ,怎么取消VLAN 中的某些端口。switch(Config)#no vlan 100 /删除VLAN 100switch(Config-Vlan200)#no switchport interface ethernet 0/0/24 /删除VLAN 200中的24号端口switch(Config)#interface ethernet 0/0/24 /进入24号端口switch(Config-Ethernet0/0/24)#shutdown /关闭24号端口01:34:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0/24,changed state to DOWN01:34:53: %LINK-5-CHANGED: Interface Ethernet0/0/24, changed state to administratively DOWN五、跨交换机相同VLAN 之间通信一、 试验目的:1 掌握跨二层交换机相同VLAN间通信的调试方法。2 了解交换机接口的trunk 模式和access 模式 (trunk 模式:中继模式 access 模式:访问模式)二、 试验设备:1 DCS-3926S交换机2台2 PC机2台3 Console 线、直通双绞线三、 试验拓扑:console线双绞线 PC1(VLAN100) 0/24交换机APC4(VLAN200) PC3(VLAN200) 0/24 0/24双绞线 交换机Bconsole线PC2(VLAN100) 0/24/思考1:相同设备(交换机与交换机)互联要用交叉线还是直通线?SwitchVlanIPPC端口号交换机AVlan 101PC1Console口Vlan 1000(PC1)PC19-16Vlan 2000(PC3)PC317-22交换机BVlan 102PC2Console口Vlan 1000(PC2)PC29-16Vlan 2000(PC4)PC417-22四、 试验要求1 在交换机A和B上,分别划分两个基于端口的VLAN: VLAN100和VLAN200。使得VLAN100的成员可以互PING。VLAN100和VLAN200之间不能互PING。2 通过调试设置,跨交换机的相同VLAN100的成员之间可以互PING。五、 试验步骤3 交换机恢复出厂设置。 switch#set default switch#writeswitch#reload4 给交换机设置标识符和管理IP交换机Aswitch(Config)#hostname switchAswitchA(Config)#interface vlan 1switchA(Config-If-Vlan1)#ip address 01 switchA(Config-If-Vlan1)#exitswitchA(Config)#交换机B switch(Config)#hostname switchBswitchB(Config)#interface vlan 1switchB(Config-If-Vlan1)#ip address 02 switchB(Config-If-Vlan1)#exitswitchB(Config)#5 在交换机中创建VLAN100和VLAN200,并添加端口 switchA(Config)#vlan 100switchA(Config-Vlan100)#switchport interface ethernet 0/0/9-16Set the port Ethernet0/0/9 access vlan 100 successfullySet the port Ethernet0/0/10 access vlan 100 successfullySet the port Ethernet0/0/11 access vlan 100 successfullySet the port Ethernet0/0/12 access vlan 100 successfullySet the port Ethernet0/0/13 access vlan 100 successfullySet the port Ethernet0/0/14 access vlan 100 successfullySet the port Ethernet0/0/15 access vlan 100 successfullySet the port Ethernet0/0/16 access vlan 2 successfullyswitchA(Config-Vlan100)#exitswitchA(Config)#vlan 200switchA(Config-Vlan200)#switchport interface ethernet 0/0/17-22Set the port Ethernet0/0/17 access vlan 200 successfullySet the port Ethernet0/0/18 access vlan 200 successfullySet the port Ethernet0/0/19 access vlan 200 successfullySet the port Ethernet0/0/20 access vlan 200 successfullySet the port Ethernet0/0/21 access vlan 200 successfullySet the port Ethernet0/0/22 access vlan 200 successfully/思考1:此时在交换机A上,PC1上能否ping 通01?能否ping 通PC3?连通性测试PC1 ping 01PC1 ping PC2PC1 ping PC3PC1 ping PC4Ping(通/不通)不通不通不通不通原 因处于不同vlan未启动trunk处于不同vlan处于不同vlan交换机B配置同交换机A/思考2:此时在交换机B上,PC2上能否ping 通02?能否ping 通PC4?连通性测试PC2 ping 02PC2 ping PC1PC2 ping PC3PC2 ping PC4Ping(通/不通)不通不通不通不通原 因处于不同vlan未启动trunk处于不同vlan处于不同vlan6 设置交换机Trunk 端口交换机AswitchA(Config)#interface ethernet 0/0/24switchA(Config-Ethernet0/0/24)#switchport mode trunkSet the port Ethernet0/0/24 mode TRUNK successfullyswitchA(Config-Ethernet0/0/24)#交换机B 相同配置。7 验证试验结果:PC1能否Ping 通PC
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【《某水电站枢纽布置及挡水、泄水建筑物设计计算案例》7900字】
- 【《某四旋翼飞行器滑模控制器设计案例概述》1500字】
- 2025年初识火电运行值班员工作职责与考试要点解析
- 阳光版小学一班级下册 跳跃类游戏
- 【教案版】小学一班级上册 跳绳
- 17水平二技巧《前滚翻1》教案
- 2025年农村水源保护及治理工作面试题集及答案解析
- 2025年软件测试工程师技能进阶教程及实战经验
- 2025年网络安全工程师专业模拟题与答案解析
- 电信运营行业知识培训课件
- 钢材中稀土赋存状态分析研究
- 心外科进修汇报护理
- 2025至2030年中国拉菲草行业投资前景及策略咨询报告
- 学历案与深度学习:读书感悟与教育启示
- 医院患者病情评估制度
- 钢栏杆安装工程施工方案
- 秘书岗位复习试题附答案(一)
- 2025年幼儿教师师德培训案例集
- 2024年《数字影像设计与制作》考试题库及答案含各题型
- 高中数学开学第一课课件(初高中衔接)
- GB/T 33130-2024高标准农田建设评价规范
评论
0/150
提交评论