ImageVerifierCode 换一换
格式:DOCX , 页数:41 ,大小:868.32KB ,
资源ID:6429281      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/6429281.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(路由器交换机配置命令及模拟软件中的实验内容.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

路由器交换机配置命令及模拟软件中的实验内容.docx

1、路由器交换机配置命令及模拟软件中的实验内容路由器、交换机配置命令计算机命令:PCA login: root ;使用root用户 password: linux ;口令是linux# shutdown -h now ;关机# init 0 ;关机# logout# login# ifconfig ;显示IP地址# ifconfig eth0 netmask ;设置IP地址# ifconfig eht0 netmask down ; 删除IP地址# route add 0.0.0.0 gw # route del 0.0.0.0 gw # route add default gw ;设置网关# r

2、oute del default gw ;删除网关# route ;显示网关# ping # telnet ;建立telnet之前先ping一下交换机基本状态:switch: ;ROM状态, 路由器是rommonhostname ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ; 接口状态交换机口令设置:switchenable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enab

3、le secret xxx ;设置特权加密口令为 xxxswitch(config)#enable password xxx ;设置特权非密口令为 xxxswitch(config)#line console 0 ;进控制台口(Rs232)初始化switch(config-line)#line vty 0 4 ;进入虚拟终端virtual tty switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VL

4、AN设置switch(vlan)#vlan 2 ;建VLAN 2 switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口1加入VLAN 2switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap

5、dot1q ;设置vlan 中继switch(config)#vtp domain ; 设置发vtp域名switch(config)#vtp password switch(config)#vtp mode serverswitch(config)#vtp mode client交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address ;添加远程登录IP switch(config)#ip default-gateway ;添加默认网关 switch#dir flash: ;查看内存交换机显示

6、命令:switch#write ;写入保存 switch#show vtpswitch#show run ;查看当前配置信息switch#show vlan ;看VLANswitch#show interface ;显示所有端口信息 switch#show int f0/0 ;显示端口0的信息路由器显示命令:router#show run ;显示接口router#show interface ;显示接口router#show ip route ;显示路由router#show cdp nei ;看邻居router#reload ;重新起动设置口令:routerenable ;进入特权模式rou

7、ter#config terminal ;进入全局配置模式router(config)#hostname ;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令为 xxxrouter(config)#enable password xxx ;设置特权非密口令为 xxxrouter(config)#line console 0 ;进控制台口(Rs232)初始化router(config-line)#line vty 0 4 ;进入虚拟终端virtual tty router(config-line)#login ;允许登录router(confi

8、g-line)#password xx ;设置登录口令xxrouter(config)# (Ctrl+z) ; 返回特权模式router#exit ;返回命令配置IP地址:router(config)#int s0/0 ;进行串Serail接口router(config-if)#no shutdown ;起动接口router(config-if)#clock rate 64000 ;设置时钟router(config-if)#ip address 10.1.1.1 255.255.0.0 ;设置IP地址和子网掩码router(config-if)#ip add 10.1.1.2 255.255

9、.0.0 second;router(config-if)#int f0/0.1 ; 进入子接口router(config-subif.1)#ip address ;router(config-subif.1)#encapsulation dot1q ;router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导复制操作:router#copy running-config startup-config ;存配置router#copy

10、 running-config tftp ;上载router#copy startup-config tftp router#copy tftp flash: ;特权模式下升级IOSrouter#copy tftp startup-config ;下载配置文件到nvramROM状态:Ctrl+Break ;进入ROM监控状态 rommonconfreg 0x2142 ;跳过配置,26 36 45xxrommonconfreg 0x2102 ;使用配置,恢复工作状态rommonreset ;重新引导,等效于重开机rommoncopy xmodem: flash: ;从console升级IOSro

11、mmonIP_ADDRESS=10.65.1.2 ;设置路由器IPrommonIP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommonTFTP_SERVER=10.65.1.1 ;指定TFTP服务器IPrommonTFTP_FILE=c2600.bin ;所要下载的文件rommontftpdnld ;ROM监控状态下升级IOSrommondir flash: ;查看闪存中的内容rommonboot ;引导IOS静态路由:ip route 例:router(config)#ip route 10.1.0.0 255.255.0.0 10.2.1.1router(conf

12、ig)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 动态路由:router(config)#ip routing ;启动路由router(config)#router rip ;启动RIP路由协议。router(config-router)#network ;配置范围,有的支持all。router(config-router)#negihbor ;点对点帧中继用。帧中继命令:router(config)# frame-relay switching ;使能帧中继交换router(config-s0)# encapsulation frame-relay ;使能帧中继rou

13、ter(config-s0)# frame-relay intf-type DCE ;DCE端(需要配虚电路)router(config-s0)# frame-relay local-dlci 20 ;配置虚电路号基本访问控制列表:router(config)#access-list permit|deny router(config)#interface ;default: deny anyrouter(config-if)#ip access-group in|out ;default: out例:RB(config)#access-list 4 permit 10.8.1.1RB(con

14、fig)#access-list 4 deny 10.8.1.0 0.0.0.255RB(config)#access-list 4 permit 10.8.0.0 0.0.255.255RB(config)#access-list 4 deny 10.0.0.0 0.255.255.255RB(config)#access-list 4 permit any RB(config)#int f0/0RB(config-if)#ip access-group 4 in扩展访问控制列表:access-list permit|deny icmp typeaccess-list permit|deny

15、 tcp port例1:router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echorouter(config)#access-list 101 permit ip any any router(config)#int s0/0router(config-if)#ip access-group 101 in例2:router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80router(config)#access-list 102 permit i

16、p any any router(config)#interface s0/1router(config-if)#ip access-group 102 outrouter(config)#no access-list 102 router(config-if)#no ip access-group 101 in交换机路由器模拟软件中的实验实验一实验一 口令和主机名设置1. 口令和设备名设置 添加一个交换机或一个路由器,先对交换机进行操作,双击SwitchAswitchenpassword: ;第一次密码为空,直接回车switch#conf t ;进入全局配置模式switch(config)#

17、hostname swa ;设置交换机名swa(config)#enable secret aaa ;设置特权加密口令为 aaaswa(config)#enable password aax ;设置特权非密口令为 aaxswa(config)#line console 0 ;进入控制台口(Rs232)状态swa(config-line)#login ;允许登录swa(config-line)#password aa ;设置登录口令aaswa(config-line)#line vty 0 4 ;进入虚拟终端virtual ttyswa(config-line)#login ;允许登录swa(c

18、onfig-line)#password a ;设置登录口令aswa(config-line)#exit ;返回上一层swa(config)#exit ;返回上一层swa#sh run ;看配置信息swa#exit ;返回命令swaenpassword: ;哪一个口令可以通过 双击ROA对路由器进行与交换机类似的设置。2. 清除口令 清除交换机口令,实际中是在开机时按住交换机上的mode钮,本模拟机按Ctrl+Break。口令请除,可以重新配置口令了。 清除路由器口令,实际中是在开机时上电时,按Ctrl+Break,本模拟机按Ctrl+Break。参考操作如下:双击RouterA 。 先配置路

19、由的特权口令:routerenpassword: ;第一次密码为空,直接回车router#conf t ;进入全局配置模式router(config)#enable secret aaa ;设置特权加密口令为 aaarouter(config)#exit ;返回router#exitrouterenpassword:aaarouter# 清除路由器的口令是在假设口令丢失情况下使用的方法,具体的操作是开机进入rommon状态,打开寄存器配置开关:router#reload ;重新启动,按Ctrl+Breakrommonrommonconfreg 0x2142 ;跳过配置,26xx 36xx 45

20、xxrommonreset ;重新引导,等效于重开机routerenpassword:router#conf trouter(config)#enable secret bbb ;设置特权加密口令为 aaarouter(config)#config-register 0x2102 ;正常使用配置文件router(config)#exitrouter#exitrouterenpassword:bbbrouter# 在实际工作中一般要备份路由器的配置文件,当系统有问题时将配置文件复原。可以这样操作:router#dir nvram:router#copy nvram:startup-config

21、tftp:router#copy tftp:startup-config flash:router#实验二实验二 计算机与交换机IP地址设置1. 双击PCA, 输入用户名和入口令,打“?”可以求得帮助。PCA login:rootPassword:linux 设置 IP :root#PCA root# ifconfig eth0 10.65.1.1 netmask 255.255.0.0 查看 IP :root#PCA root# ifconfig 删除 IP :root#PCA root# ifconfig eth0 10.65.1.1 netamsk 255.255.0.0 down 设置

22、网关:root#PCA root# route add default gw 10.65.1.9 查看网关:root#PCA root# route 删除网关:root#PCA root# route del default gw 10.65.1.92. 双击PCB, 输入用户名和入口令,打“?”可以求得帮助。PCB login:rootPassword:linux 设置 IP :root#PCB root# ifconfig eth0 10.65.1.2 netmask 255.255.0.0root#PCB root# ifconfig 设置网关:root#PCB root# route

23、add default gw 10.65.1.9root#PCB root# route3. 双击SWA 进入特权模式 :switchen 进入全局配置模式:switch#conf t 进入默认VLAN状态:switch(config)#int vlan 1 设置ip地址和掩码:switch(config-if)#ip address 10.65.1.3 255.255.0.0 设置switch的网关:switch(config)#ip defaule-gateway 10.65.1.9 查看当前配置:switch#sh run 测试联通情况:switch#ping 10.65.1.1swit

24、ch#ping 10.65.1.2switch#ping 10.65.1.3switch#ping 10.65.1.4 没有这个IP,所以不通。4. 双击PCArootPCA root# ping 10.65.1.1rootPCA root# ping 10.65.1.2rootPCA root# ping 10.65.1.3rootPCA root# ping 10.65.1.4 没有这个IP,所以不通。5.修改PCB的ip地址 修改为不同网段的一个ip地址,为10.66.1.2,再从PCA Ping PCB。root#PCB root# ifconfig eth0 10.66.1.2 ne

25、tmask 255.255.0.0rootPCA root# ping 10.66.1.2 修改为相同网段的一个ip地址,为10.65.1.4,再从PCA Ping PCB。root#PCB root# ifconfig eth0 10.65.1.4 netmask 255.255.0.0rootPCA root# ping 10.65.1.4 断开交换机与PCA计算机连线, 理解如下操作:rootPCA root# ping 10.65.1.4rootPCA root# ping 10.65.1.1rootPCA root# ping 127.0.0.1实验三实验三 交换机VLAN实验1.

26、规划ip地址 PCA的ip 地址: 10.65.1.1 PCB的ip 地址: 10.66.1.1 PCC的ip 地址: 10.65.1.3 PCD的ip 地址: 10.66.1.3 SWA的ip 地址: 10.65.1.7 SWB的ip 地址: 10.65.1.8 SWA的f0/5f0/7 vlan 2 ,f0/8为trunk SWB的f0/5f0/7 valn 2 ,f0/1为trunk 用ping命令测试,从PCA和PCB到各点的连通情况。由于交换机初始化为vlan 1,所以同网段的可以通。即PCA到PCC、SWA、SWB是通的,而PCB只与PCD通。2.设置VLAN 双击SwitchA,

27、改名SwitchA为SWA,建立2 个vlan,分别为2、3switchenswitch#sh vlanswitch#conf tswitch(config)#hosthame SWAswitch(config)#exitSWA#vlan databaseSWA(vlan)#vlan 2SWA(vlan)#vlan 3SWA(vlan)#exit 将SWA交换机的f0/5,f0/6,f0/7 加入到vlan 2SWA(config)#int f0/5SWA(config-if)#switchport access vlan 2SWA(config-if)#int f0/6SWA(config-

28、if)#switchport access vlan 2SWA(config-if)#int f0/7SWA(config-if)#switchport access vlan 2SWA(config-if)# endSWA#sh vlan 在SWB上与SWA上类似,将SWB交换机f0/5,f0/6,f0/7 加入到vlan 2。3.测试可通性 从PCA到PCC测试:rootPCA root# ping 10.65.1.3 (通) 从PCA到PCB测试:rootPCA root# ping 10.66.1.1 (不通,因为不同网段,不同VLAN) 从PCB到PCD测试:rootPCB root# pin

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1