




已阅读5页,还剩5页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
9计算机网络技术实训指导书 实验 交换机基本操作实训目的实训任务背景知识实训材料实训步骤1. 了解 NetSim 模拟软件Boson NetSim 是 Boson 公司出品的一款 Cisco 路由器、交换机模拟程序。它的目标用户是 准备 CCNA、CCNP 考试的学习者,它提供了一个虚拟的实验设备和实验环境。本书的电子版以 Boson NetSim v5.27 为例,讲解本书纸质版本的相应内容,可以认为是本书的 Cisco 版本。 Boson NetSim 有两个组成部分:实验拓扑图设计软件(Boson Network Designer)和实验 环境模拟器(Boson NetSim)。Boson NetSim 支持以下网络设备:800 系列、1000 系列、1600 系列、1700 系列、2500 系列、2600、3600、4500 系列路由器,支持 1912、2950、3550 和 5002 交换机。Boson NetSim 最大的优点就是能够自定义网络拓扑结构,可以模拟出各种实验环境。因为 Boson NetSim 仅仅是一个模拟器,所以有一些命令不能使用。2. 设计网络拓扑结构利用 Boson Network Designer 设计一个与本书 纸版实训相同的网络拓扑结构(图 2.3-1),即在一台 虚拟的交换机上连接 4 台计算机。从【开始】【Boson Software】【Boson NetSim】【Boson Network Designer】打开网络拓扑结构设 计器,从设计器的左边窗口选择需要的设备拖入右 边窗口中,为简单起见,设备名使用默认值。图 2.3-1 网络拓扑结构与连线图 2.3-2 添加设备图 2.3-3 添加连接线先后添加 3550 交换机一台,PC 机 4 台(图 2.3-2),然后再添加 4 条以太网连接线,分别将 PC 机和交换机连接。添加以太网连接线时,需要指定连接线的两端分别与设备连接的端口(图 2.3-3)。这些步骤相对应于硬件的安装和连接,从而形成一个图 2.3-1 所示的模拟网络实 验环境(不包括配置用计算机)。配置结束将网络拓扑结构保存到硬盘,文 件后缀名为.top。3. 使用模拟器(1) 启动从【开始】【Boson Software】【Boson NetSim】【Boson Network】打开网络模拟器, 从菜单【File】【Load NetMap】打开前一步 骤设计的网络拓扑结构文件。(2) 配置 PC 机在工具栏上的 eStations 中选择 PC1(图2.3-4),进入 PC 机配置界面。输入“?”显示 当前可用命令:Boson BOSS 5.0Copyright 1998-2003 Boson Software, Inc.Use the command help to get startedPress Enter to beginC:?#帮助dir显示 TFTP 配置文件help帮助,与?相同ip配置 IP 地址ipconfig查看 TCP/IP 配置ping测试网络连通状态show显示配置tracert路由跟踪type查看指定的 TFTP 配置ver版本winipcfg配置 TCP/IP图 2.3-4 配置 PC 机图 2.3-5 配置 TCP/IP按图 2.3-1 的要求,使用命令 winipcfg 配置各个 PC 机的的 IP 地址和子网掩码(图 2.3-5)。配置完成后,各台 PC 机之间应该 ping 通。(3) 进入交换机配置界面在工具栏上的 eSwitches 中选择 Switch 1,进入交换机配置界面。这时的界面相当于是交 换机启动后,通过超级终端看到的界面。4. 使用交换机的命令行Cisco 交换机和路由器同样是通过命令完成配置任务的,在 Cisco 的术语中,华为的视图 称为模式,常用的模式有用户模式、特权模式、配置模式等。第一次进入交换机时的界面为普 通用户模式(图 2.3-6):Switch#是普通用户模式的提示符,Switch 是交换机名Switchen#进入特权模式,en 是 enable 的缩写Switch#是特权模式的提示符Switch#conf t#进入配置模式,conf t 表示 configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#这是配置模式的提示符Switch(config)#exit#退出配置模式Switch#exit#退出特权模式Router con0 is now availablePress RETURN to get started.Switch(1) 命令行在线帮助图 2.3-6 NetSim 模拟器的命令行界面在任何模式下,键入问号“?”可以获得帮助。帮助可分为:1) 完全帮助:直接键入“?”获取该模式下所有命令及其简单描述;Switch?access-enableCreate a temporary Access-List entryconnectOpen a terminal connectionenableTurn on privileged commands 进入特权模式(system-view)exitExit from the EXEC(quit,该字体表示华为的对应命令)helpDescription of the interactive help systemlockLock the terminallogoutExit from the EXECpingSend echo messagesrcommandRun command on remote switchshowShow running system information(display)systatDisplay information about terminal linestelnetOpen a telnet connectiontracerouteTrace route to destinationtunnelOpen a tunnel connectionSwitch2) 部分帮助:键入有效命令或命令的一部分,再键入“?”获取该命令的帮助。Switchsh?#输入命令的一部分,加?,显示命令的拼写showSwitchshow ?#命令后加空格,再加?,显示命令的参数access-listsList access listsarpARP tablecdpCDP informationclockDisplay the system clockconfigurationContents of Non-Volatile memorycontrollersInterface controller statusflashdisplay information about flash: file systemhistoryDisplay the session command historyhostsIP domain-name, nameservers, and host tableinterfacesInterface status and configurationipIP informationntpNetwork time protocolprotocolsActive network routing protocolsrunning-configCurrent operating configurationsessionsInformation about Telnet connectionsspanning-treeSpanning tree subsystemstartup-configContents of startup configurationterminalDisplay terminal configuration parametersterminalDisplay console/RS-232 port configurationusersDisplay information about terminal linesversionSystem hardware and software statusvlanVTP VLAN statusvtpVTP informationSwitchshow c?#对于参数,直接加?,同样显示其拼写cdp clock controllers configuration#有 4 种参数Switchshow clock ?#空格后加?,显示更多参数或用法Switchshow clock*00:22:48 UTC March 1 19933) 命令自动填充:仅输入命令单词的开始部分,接着按下Tab键,交换机或路由器会自动填充其余的部分,前提是已输入的部分命令没有二义性,即只有一种填充可能的情况。Switchsh#按Tab键Switchshow ver#自动补足“show ”,再输入 ver,按Tab键Switchshow version#自动补足#下述是输出的版本信息Boson Operating Simulation Software#显示的是模拟器的版本BOSS (tm) C3500 Software (C3500-Enterprise), Version 12.1, RELEASE SOFTWARECopyright (c) 1998-2003 by Boson Software, Inc.BOSS ROM: System Bootstrap, Version 12.2, RELEASE SOFTWARESwitch uptime is 27 minutesSystem restarted by power-onSystem image file is flash:c3500-enterprise.12.1.boss, booted via flashBoson 3500 (BOSS) processor (revision 5.0).12 FastEthernet/IEEE 802.3 interface(s)#12 个快速以太网接口2 Gigabit/IEEE 802.3 interface(s)#2 个千兆以太网接口32K bytes of simulated non-volatile configuration memory.8192K bytes of simulated System flash (Read/Write)Configuration register is 0X2102(2) 命令行显示特性当显示的信息超过一屏时,提供了暂停功能,用户可以有三种选择:键入 Ctrl+C 退出显 示、键入空格键显示下一屏、键入回车键显示下一行。(3) 命令行历史命令交换机或路由器将自动保存用户最近输入的 10 条命令,使用如下命令:Switch#show history#显示最近输入的 10 条命令quitenableexitexitshow clockshow versionenshow intshow intshow historySwitch#也可以使用上光标或下光标键将以前执行过的命令从历史记录中调出来,直接重新执行或修改后再执行。(4) 命令的编辑可以使用的编辑键包括退格键 Backspace、删除键 Del、左光标键、右光标键、上光标键或以及下光标键或。(5) 命令的缩写例如 exit 的缩写是 ex,enable 的缩写是 en, interface 的缩写是 int,ethernet 的缩写是 e,show 的缩写是 sh,show interface 的缩写是 sh int,等等。(6) 错误信息显示所有用户键入的命令,如果通过语法检查,则正确执行,否则向用户报告错误信息,常见 错误信息如表 2.3-1 所示。表 2.3-1 命令行常见错误信息表英文错误信息错误原因% Ambiguous command: xxx命令或参数 xxx 不明确,有二义性% Invalid input detected at marker.在所指的位置发现错误的输入5. 基本操作命令(1) 修改系统名称交换机和路由器的默认名称是 Switch 或 Router,在配置模式下用 hostname 命令修改名称:Switch#config t#进行配置之前必须先进入配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname Wxit#在特权模式下设置系统名称Wxit(config)#系统的提示符用新的名字显示(2) 设置特权密码用下述命令设置进入系统视图时所用的密码(例如改为 12345,本例演示如何使用帮助来 进行操作):Wxit(config)#enable ?#用?显示 enable 的帮助信息passwordAssign the privileged level password#设置明文密码secretAssign the privileged level secret#设置密文密码Wxit(config)#enable password ?levelSet exec level password#小写的是关键字,设置指定优先级的进入密码LINEThe UNENCRYPTED (cleartext) enable password#大写的是参数值Wxit(config)#enable password 12345#设置明文密码为 12345Wxit(config)#exitWxit#exitRouter con0 is now availablePress RETURN to get started.Wxiten#退出后重新进入Enter password:#这时需要提供密码Wxit#config tEnter configuration commands, one per line. End with CNTL/Z.Wxit(config)#enable secret abcde#设置密文密码为 abcdeWxit(config)#exitWxit#exitRouter con0 is now availablePress RETURN to get started.WxitWxitenEnter password:#当同时存在明文和密文密码时,需要密文密码Wxit#config tEnter configuration commands, one per line. End with CNTL/Z.Wxit(config)#no enable secret abcde#用 no 命令删除密文密码Wxit(config)#exitWxit#exitRouter con0 is now availablePress RETURN to get started.WxitenEnter password:#这时需要明文密码Wxit#(3) 查看配置配置分为二种,已保存的配置是指开机时的配置,或开机后修改过并且用保存命令保存过 的配置,而当前配置是当前使用的配置(很可能是还没有保存的)。用下述命令查看当前配置:Wxit#show running-config#查看当前的配置,只能在特权模式下使用!Version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname Wxitip name-server enable secret 5 $sdf$6978yhg$jnb76sd#这是密文密码,内容为 abcdeenable password 12345#这是明文密码(以下输出略)用下述命令保存当前配置为开机配置:Wxit#copy running-config startup-configDestination filename startup-config?Building configuration.OK用下述命令查看已保存的配置:Wxit#show startup-config#查看已保存的配置(输出内容略,输出格式同前)(4) 其它查看命令show 命令可以查看交换机或路由器的许多信息:Switch#show ?access-listsList access listsarpARP tablecdpCDP informationclockDisplay the system clockconfigurationContents of Non-Volatile memorycontrollersInterface controller statusflashdisplay information about flash: file systemhistoryDisplay the session command historyhostsIP domain-name, nameservers, and host tableinterfacesInterface status and configurationipIP informationntpNetwork time protocolprotocolsActive network routing protocolsrunning-configCurrent operating configurationsessionsInformation about Telnet connectionsspanning-treeSpanning tree subsystemstartup-configContents of startup configurationterminalDisplay terminal configuration parametersterminalDisplay console/RS-232 port configurationusersDisplay information about terminal linesversionSystem hardware and software statusvlanVTP VLAN statusvtpVTP informationSwitch#练习一下下述几个显示命令,研究一下输出的信息:show version show protocols show flashshow clock show usersshow interfaces(5) 重启动在特权模式下,用下述命令重启动交换机:Wxit#reload如果需要将交换机恢复到出厂时的配置,可以先清除已保存的配置,然后重启动交换机:Wxit#erase startup-config#删除已保存的配置Erasing the nvram filesystem will remove all files! Continue? confirm#按回车键确认OK#其它键放弃Erase of nvram: completeWxit#Wxit#reload#重启动6. 认识和操作端口本节将了解端口,并简单比较一下交换机和路由器在端口上的区别。(1) 查看端口端口的配置是配置交换机或路由器的重要一环,首先通过查看端口来了解交换机或路由器 的端口及其状态。输入下述命令将会列出所有的端口及其状态(下述是交换机的输出):Wxit#show interfaces#这部分是交换机的总体情况Vlan 1 is administratively down, line protocol is down#虚拟局域网 DOWNHardware is CPU Interface, address is 000C.9668.4813 (bia 000C.9668.4813)MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,reliability 255/255, txload 1/255, rxload 1/255Auto-duplex, Auto-speedEncapsulation ARPA, loopback not setARP type: ARPA, ARP Timeout 04:00:00Last input 02:29:44, output never, output hang neverLast clearing of show interface counters neverInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: fifoOutput queue :0/40 (size/max)5 minute input rate 0 bits/sec, 0 packets/sec#一些统计信息5 minute output rate 0 bits/sec, 0 packets/sec269 packets input, 71059 bytes, 0 no bufferReceived 6 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored7290 packets output, 429075 bytes, 0 underruns0 output errors, 3 interface resets0 output buffer failures, 0 output buffers swapped out#这部分是 0 号以太网接口的情况FastEthernet0/1 is up, line protocol is up#状态是 UPHardware is Fast Ethernet, address is 000C.9668.4814 (bia 000C.9668.4814)MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec,reliability 255/255, txload 1/255, rxload 1/255Auto-duplex, Auto-speed#双工是自动协商,速率是自动协商Encapsulation ARPA, loopback not setARP type: ARPA, ARP Timeout 04:00:00Last input 02:29:44, output never, output hang neverLast clearing of show interface counters neverInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: fifoOutput queue :0/40 (size/max)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec269 packets input, 71059 bytes, 0 no bufferReceived 6 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored7290 packets output, 429075 bytes, 0 underruns0 output errors, 3 interface resets0 output buffer failures, 0 output buffers swapped out(以下输出略)该命令显示所有端口的状态,显示的信息达 40 多屏,按空格键显示下一屏,按回车键显示下一行,按 Ctrl+C 键退出显示。也可用下述命令显示端口信息的摘要:Wxit#show interfaces statusPortNameStatusVlanDuplexSpeed Type端口名状态双工速度 类型Fa0/1connected1a-fulla-100 10/100BaseTXFa0/2connected1a-fulla-100 10/
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论