思科模拟器配置命令审批稿
(完整word版)利用Cisco Packet Tracer模拟交换机的基本配置
![(完整word版)利用Cisco Packet Tracer模拟交换机的基本配置](https://img.taocdn.com/s3/m/80a2dc6b59eef8c75ebfb33c.png)
交换机的配置课程名称:计算机网络实用技术 实验题目:交换机的配置实验目的:掌握交换机的配置方法。
实验设备:计算机1台、Cisco Packet Tracer 模拟软件1套。
实验内容:1、交换机命令模式间的切换。
2、交换机的基本配置。
3、vlan 的配置4、vlan 间路由实验过程:一、交换机命令模式间的切换1、模拟网络环境打开RouterSim 模拟软件,添加一台交换机(以3550为例)。
双击交换机图标,打开命令行窗口。
2、命令模式间的切换User Exec 口令enable 命令configure 命令interface 命令line 命令vlan database 命令LoginUser Exec 模式Privileged Exec 模式Global Configuration 模式VLAN Database 模式Line Configuration 模式Interface Configuration 模式(1)User EXEC 模式(用户模式) 提示符:Switch>访问方法:回车,开始一个进程。
退出方法:输入exit 命令离开该模式。
(2)Privileged EXEC 模式(特权模式)提示符:Switch#访问方法:在用户模式中输入enable命令。
退出方法:输入exit或disable 命令,返回到用户模式。
(3)VLAN Database 模式(VLAN 配置模式)提示符:Switch(vlan)#访问方法:在特权模式中输入vlan database命令。
退出方法:输入exit 命令,返回到特权模式。
(4)Global configuration 模式(全局配置模式)提示符:Switch(config)#访问方法:在特权模式中输入configure 命令。
退出方法:输入exit命令或end 命令,或者键入Ctrl+Z 组合键,返回到特权模式。
(5)Interface configuration 模式(接口配置模式)提示符:Switch(config-if)#访问方法:在全局配置模式中输入interface 命令,并且必须指明要进入哪一个接口配置子模式。
思科 ISE 3.0 配置指南 执行显示模式下的思科 ISE CLI 命令说明书
![思科 ISE 3.0 配置指南 执行显示模式下的思科 ISE CLI 命令说明书](https://img.taocdn.com/s3/m/e4be36a94bfe04a1b0717fd5360cba1aa9118c69.png)
执行显示模式下的思科ISE CLI命令本章介绍执行模式下的show命令,这些命令用于显示思科ISE设置,是最有用的一部分命令。
本章的每个命令之后会随附命令使用、命令语法、使用指南和一个或多个示例的简要说明。
注释从思科ISE版本3.0开始,如果在运行某些show命令后需要转义字符,请按Ctrl+C,然后按Q。
•show,第3页•show application,第4页•show backup,第7页•show banner,第9页•show cdp,第10页•show clock,第12页•show container,第13页•show cpu,第17页•show crypto,第20页•show disks,第21页•show icmp-status,第23页•show interface,第25页•show inventory,第27页•show ip,第29页•show ipv6route,第30页•show logging,第31页•show logins,第34页•show memory,第35页•show ntp,第36页•show ports,第37页•show process,第39页•show repository,第41页•show restore,第43页执行显示模式下的思科ISE CLI命令•show running-config,第44页•show snmp-server engineid,第46页•show snmp-server user,第47页•show startup-config,第48页•show tech-support,第50页•show terminal,第52页•show timezone,第53页•show timezones,第54页•show udi,第55页•show uptime,第56页•show users,第57页•show version,第59页show要显示运行系统信息,请在执行模式下使用show 命令。
思科模拟器配置命令总结PPT
![思科模拟器配置命令总结PPT](https://img.taocdn.com/s3/m/7da43d2b0a1c59eef8c75fbfc77da26925c59683.png)
使用思科模拟器进行网络实验和工程实践的网络工程师。
网络工程师
学生
培训机构
学习网络技术的学生,使用思科模拟器进行网络实验和学习。
使用思科模拟器进行网络技术培训的机构。
03
02
01
02
基础命令
Chapter
01
02
03
04
进入特权执行模式
使用`enable`命令,进入设备的特权执行模式,以进行更高级别的配置。
03
04
05
感谢观看
THANKS
在思科模拟器中配置SNMP协议,实现对设备的远程管理和监控。
SNMP配置
配置日志功能和告警功能,实时掌握网络运行状况,及时发现和处理故障。
日志与告警
07
故障排查与优化建议
Chapter
01
02
03
04
检查物理连接、端口状态、IP地址配置等。
网络连接故障
核对设备配置信息,如路由协议、接口状态等。
实施负载均衡策略,合理分配网络流量,提高设备利用率。
定期评估和调整安全策略,确保网络安全与业务需求的平衡。
08
总结与展望
Chapter
01
02
软件定义网络(SDN)
预测SDN将在未来网络领域占据重要地位,思科模拟器可能会增加对SDN的支持和模拟。
网络功能虚拟化(NFV)
NFV技术将在未来持续发展,思科模拟器有望加强对NFV相关功能的模拟和实验。
06
高级功能配置
Chapter
使用思科模拟器配置负载均衡功能,如GLBP、VRRP等协议实现负载均衡。
负载均衡配置
通过HSRP、VTP等协议实现冗余备份,提高网络可靠性。
BosonNetSim网络模拟软件配置命令大全
![BosonNetSim网络模拟软件配置命令大全](https://img.taocdn.com/s3/m/b0326a13590216fc700abb68a98271fe910eaf8c.png)
BosonNetSim网络模拟软件配置命令大全*************************************************************** **************************思科路由器常用配置命令大全(A-X)(1)*************************************************************** **************************Access-enable允许路由器在动态访问列表中创建临时访问列表入口Access-group把访问控制列表(ACL)应用到接口上Access-list定义一个标准的IP ACLAccess-template在连接的路由器上手动替换临时访问列表入口Appn向APPN子系统发送命令Atmsig 执行ATM信令命令B 手动引导操作系统Bandwidth 设置接口的带宽Banner motd 指定日期信息标语Bfe 设置突发事件手册模式Boot system 指定路由器启动时加载的系统映像Calendar 设置硬件日历Cd 更改路径Cdp enable 允许接口运行CDP协议Clear 复位功能Clear counters 清除接口计数器Clear interface 重新启动接口上的件逻辑Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率Cmt 开启/关闭FDDI连接管理功能Config-register 修改配置寄存器设置Configure 允许进入存在的配置模式,在中心站点上维护并保存配置信息Configure memory 从NVRAM加载配置信息Configure terminal 从终端进行手动配置Connect 打开一个终端连接Copy 复制配置或映像数据Copy flash tftp 备份系统映像文件到TFTP服务器Copy running-config startup-config 将RAM中的当前配置存储到NVRAMCopy running-config tftp 将RAM中的当前配置存储到网络TFTP服务器上Copy tftp flash 从TFTP服务器上下载新映像到FlashCopy tftp running-config 从TFTP服务器上下载配置文件Debug 使用调试功能Debug dialer 显示接口在拨什么号及诸如此类的信息Debug ip rip 显示RIP路由选择更新数据Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程Debug ppp 显示在实施PPP中发生的业务和交换信息Delete 删除文件Deny 为一个已命名的IP ACL设置条件Dialer idle-timeout 规定线路断开前的空闲时间的长度Dialer map 设置一个串行接口来呼叫一个或多个地点Dialer wait-for-carrier-time 规定花多长时间等待一个载体Dialer-group 通过对属于一个特定拨号组的接口进行配置来访问控制Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL与协议的组合来控制控制拨号Dir 显示给定设备上的文件Disable 关闭特许模式Disconnect 断开已建立的连接Enable 打开特许模式Enable password 确定一个密码以防止对路由器非授权的访问*****************************************************************************************思科路由器常用配置命令大全(A-X)(2)*************************************************************** **************************Enable password 设置本地口令控制不同特权级别的访问Enable secret 为enable password命令定义额外一层安全性 (强制安全,密码非明文显示)Encapsulation frame-relay 启动帧中继封装Encapsulation novell-ether 规定在网络段上使用的Novell独一无二的格式Encapsulation PPP 把PPP设置为由串口或ISDN接口使用的封装方法Encapsulation sap 规定在网络段上使用的以太网802.2格式Cisco的密码是sapEnd 退出配置模式Erase 删除闪存或配置缓存Erase startup-config 删除NVRAM中的内容Exec-timeout 配置EXEC命令解释器在检测到用户输入前所等待的时间Exit 退出所有配置模式或者关闭一个激活的终端会话和终止一个EXECExit 终止任何配置模式或关闭一个活动的对话和结束EXECformat 格式化设备Frame-relay local-dlci 为使用帧中继封装的串行线路启动本地管理接口(LMI)Help 获得交互式帮助系统History 查看历史记录Hostname 使用一个主机名来配置路由器,该主机名以提示符或者缺省文件名的方式使用Interface 设置接口类型并且输入接口配置模式Interface 配置接口类型和进入接口配置模式Interface serial 选择接口并且输入接口配置模式Ip access-group 控制对一个接口的访问Ip address 设定接口的网络逻辑地址Ip address 设置一个接口地址和子网掩码并开始IP处理Ip default-network 建立一条缺省路由Ip domain-lookup 允许路由器缺省使用DNSIp host 定义静态主机名到IP地址映射Ip name-server 指定至多6个进行名字-地址解析的服务器地址Ip route 建立一条静态路由Ip unnumbered 在为给一个接口分配一个明确的IP地址情况下,在串口上启动互联网协议(IP)的处理过程Ipx delay 设置点计数Ipx ipxwan 在串口上启动IPXWAN协议Ipx maximum-paths 当转发数据包时设置Cisco IOS软件使用的等价路径数量Ipx network 在一个特定接口上启动互联网数据包交换(IPX)的路由选择并且选择封装的类型(用帧封装)Ipx router 规定使用的路由选择协议Ipx routing 启动IPX路由选择Ipx sap-interval 在较慢的链路上设置较不频繁的SAP(业务广告协议)更新Ipx type-20-input-checks 限制对IPX20类数据包广播的传播的接受Isdn spid1 在路由器上规定已经由ISDN业务供应商为B1信道分配的业务简介号(SPID)Isdn spid2 在路由器上规定已经由ISDN业务供应商为B2信道分配的业务简介号(SPID)Isdntch-type 规定了在ISDN接口上的中央办公区的交换机的类型Keeplive 为使用帧中继封装的串行线路LMI(本地管理接口)机制Lat 打开LAT连接Line 确定一个特定的线路和开始线路配置Line concole 设置控制台端口线路Line vty 为远程控制台访问规定了一个虚拟终端Lock 锁住终端控制台Login 在终端会话登录过程中启动了密码检查Login 以某用户身份登录,登录时允许口令验证Logout 退出EXEC模式Mbranch 向下跟踪组播地址路由至终端Media-type 定义介质类型Metric holddown 把新的IGRP路由选择信息与正在使用的IGRP 路由选择信息隔离一段时间Mrbranch 向上解析组播地址路由至枝端Mrinfo 从组播路由器上获取邻居和版本信息Mstat 对组播地址多次路由跟踪后显示统计数字Mtrace 由源向目标跟踪解析组播地址路径Name-connection 命名已存在的网络连接Ncia 开启/关闭NCIA服务器Network 把一个基于NIC的地址分配给一个与它直接相连的路由器把网络与一个IGRP的路由选择的过程联系起来在IPX路由器配置模式下,在网络上启动加强的IGRPNetwork 指定一个和路由器直接相连的网络地址段Network-number 对一个直接连接的网络进行规定No shutdown 打开一个关闭的接口Pad 开启一个X.29 PAD连接Permit 为一个已命名的IP ACL设置条件Ping 把ICMP响应请求的数据包发送网络上的另一个节点检查主机的可达性和网络的连通性对网络的基本连通性进行诊断Ping 发送回声请求,诊断基本的网络连通性Ppp 开始IETF点到点协议Ppp authentication 启动Challenge握手鉴权协议(CHAP)或者密码验证协议(PAP)或者将两者都启动,并且对在接口上选择的CHAP和PAP验证的顺序进行规定Ppp chap hostname 当用CHAP进行身份验证时,创建一批好像是同一台主机的拨号路由器Ppp chap password 设置一个密码,该密码被发送到对路由器进行身份验证的主机命令对进入路由器的用户名/密码的数量进行了限制Ppp pap sent-username 对一个接口启动远程PAP支持,并且在PAP对同等层请求数据包验证过程中使用sent-username和passwordProtocol 对一个IP路由选择协议进行定义,该协议可以是RIP,内部网关路由选择协议(IGRP),开放最短路径优先(OSPF),还可以是加强的IGRPPwd 显示当前设备名*************************************************************** **************************思科路由器常用配置命令大全(A-X)(3)/doc/8d14600486.html,*************************************************************** **************************思科路由器常用配置命令大全(Reload 关闭并执行冷启动;重启操作系统Rlogin 打开一个活动的网络连接Router 由第一项定义的IP路由协议作为路由进程,例如:router rip 选择RIP作为路由协议Router igrp 启动一个IGRP的路由选择过程Router rip 选择RIP作为路由选择协议Rsh 执行一个远程命令Sdlc 发送SDLC测试帧Send 在tty线路上发送消息Service password-encryption 对口令进行加密Setup 运行Setup命令Show 显示运行系统信息Show access-lists 显示当前所有ACL的内容Show buffers 显示缓存器统计信息Show cdp entry 显示CDP表中所列相邻设备的信息Show cdp interface 显示打开的CDP接口信息Show cdp neighbors 显示CDP查找进程的结果Show dialer 显示为DDR(数字数据接受器)设置的串行接口的一般诊断信息Show flash 显示闪存的布局和内容信息Show frame-relay lmi 显示关于本地管理接口(LMI)的统计信息Show frame-relay map 显示关于连接的当前映射入口和信息Show frame-relay pvc 显示关于帧中继接口的永久虚电路(pvc)的统计信息Show hosts 显示主机名和地址的缓存列表Show interfaces 显示设置在路由器和访问服务器上所有接口的统计信息Show interfaces 显示路由器上配置的所有接口的状态Show interfaces serial 显示关于一个串口的信息Show ip interface 列出一个接口的IP信息和状态的小结Show ip interface 列出接口的状态和全局参数Show ip protocols 显示活动路由协议进程的参数和当前状态Show ip route 显示路由选择表的当前状态Show ip router 显示IP路由表信息Show ipx interface 显示Cisco IOS软件设置的IPX接口的状态以及每个接口中的参数Show ipx route 显示IPX路由选择表的内容Show ipx servers 显示IPX服务器列表Show ipx traffic 显示数据包的数量和类型Show isdn active 显示当前呼叫的信息,包括被叫号码、建立连接前所花费的时间、在呼叫期间使用的自动化操作控制(AOC)收费单元以及是否在呼叫期间和呼叫结束时提供AOC信息Show isdn ststus 显示所有isdn接口的状态、或者一个特定的数字信号链路(DSL)的状态或者一个特定isdn接口的状态Show memory 显示路由器内存的大小,包括空闲内存的大小Show processes 显示路由器的进程Show protocols 显示设置的协议Show protocols 显示配置的协议。
思科-命令配置
![思科-命令配置](https://img.taocdn.com/s3/m/13a3d7c758f5f61fb736664c.png)
一、用三层交换实现不同VLAN互通,配置如图一配置:Switch> 用户模式Switch>enable 进入特权模式命令Switch#configure terminal (conf t) 进入全局配置模式Switch(config)#vlan 100 创建两个vlanSwitch(config-vlan)#vlan 200Switch(config-vlan)#exit 退出到全局模式Switch(config)#int fa 0/1 进入端口一Switch(config-if)#switchport access vlan 100 划分给vlan 100 Switch(config-if)#exit 退出Switch(config)#int fa 0/2 进入端口二Switch(config-if)#switchport access vlan 200 划分给vlan 200 Switch(config-if)#exitSwitch(config)#int vlan 100 打开vlan 100Switch(config-if)#ip add 192.168.1.254 255.255.255.0给vlan 100分配IPSwitch(config-if)#exitSwitch(config)#int vlan 200Switch(config-if)#ip add 192.168.2.254 255.255.255.0给vlan 200分配IP二、将端口3-5聚合,设置为干道,VLAN 10通,VLAN 20不通,配置如图二。
配置:Switch>enSwitch#conf tSwitch(config)#vlan 100#vlan 200Switch(config-vlan)#exiSwitch(config)#int fa 0/1Switch(config-if)#sw acc vlan 100Switch(config-if)#exiSwitch(config)#int fa 0/2Switch(config-if)#sw acc vlan 200Switch(config-if)#exitSwitch(config)#int rang fa 0/3 – 5将3,5端口聚合Switch(config-if-range)#sw mode trunk设置为干道默认所有VLAN可通过。
最新整理思科模拟器上给交换机设置基本配置方法教程
![最新整理思科模拟器上给交换机设置基本配置方法教程](https://img.taocdn.com/s3/m/08422f58a36925c52cc58bd63186bceb18e8ed72.png)
最新整理思科模拟器上给交换机设置基本配置方法教程思科模拟器上给交换机设置基本配置方法教程交换机的主要功能包括物理编址、网络拓扑结构、错误校验、帧序列以及流控。
交换机还具备了一些新的功能,如对V L A N(虚拟局域网)的支持、对链路汇聚的支持,甚至有的还具有防火墙的功能。
其中交换机是基于收到的数据帧中的源M A C地址和目的M A C地址来进行工作。
那么思科模拟器上给交换机设置基本配置的方法是什么呢?方法步骤1、首先找出一台2811类的路由器和一台2960类的交换机和3台p c,利用直通线使各个设备相互连接起来2、为交换机配置主机名,命令为复制内容到剪贴板S w i t c h e n a b l eS w i t c h#c o n f t e r m i n a lE n t e r c o n f i g u r a t i o n c o m m a n d s, o n e p e r l i n e. E n d w i t h C N T L/Z.S w i t c h(c o n f i g)#h o s t n a m e S13、为交换机配置密码,命令为:复制内容到剪贴板S1(c o n f i g)#e n a b l e s e c r e t c i s c oS1(c o n f i g)#l i n e v t y015S1(c o n f i g-l i n e)#p a s s w o r d c i s c oS1(c o n f i g-l i n e)#l o g i n4、配置交换机端口安全,配置命令是:复制内容到剪贴板S1(c o n f i g)#i n t f0/1S1(c o n f i g-i f)#s h u t d o w nS1(c o n f i g-i f)#s w i t c h m o d e a c c e s sS1(c o n f i g-i f)#s w i t c h p o r t-s e c u r i t i y5、检查交换机的M a c地址表,命令是:S1#s h o wm a c-a d d r e s s-t a b l e,6、查看端口安全的设置情况,用命令为:s h o wp o r t-s e c u r i t y补充:交换机基本使用方法作为基本核心交换机使用,连接多个有线设备使用:网络结构如下图,基本连接参考上面的作为网络隔离使用:对于一些功能好的交换机,可以通过模式选择开关选择网络隔离模式,实现网络隔离的作用,可以只允许普通端口和U P l i n k端口通讯,普通端口之间是相互隔离不可以通讯的除了作为核心交换机(中心交换机)使用,还可以作为扩展交换机(接入交换机)来扩展网络放在路由器上方,扩展网络供应商的网络线路(用于一条线路多个I P的网络),连接之后不同的路由器用不同的I P连接至公网相关阅读:交换机硬件故障常见问题电源故障:由于外部供电不稳定,或者电源线路老化或者雷击等原因导致电源损坏或者风扇停止,从而不能正常工作。
思科实验配置命令
![思科实验配置命令](https://img.taocdn.com/s3/m/eff538e7f8c75fbfc77db2f6.png)
实验一认识路由器及交换机的配置方式及常用配置命令及使用帮助键一、实验目的:熟悉路由器、交换机与计算机的各种连线方式,熟悉掌握路由器、交换机的基本配置及帮助命令的使用二、实验设备:路由器、交换机、pc各一台三、实验拓扑:四、实验步骤1、按图示连线,然后在pc点上开始程序附件通讯超级终端在名称栏输入任意字符(该字符标识一个终端会话)点击确定在连接时使用选中com1(该串口是你连接路由器控制台端口的DB60接口)在端口设置中,点“还原为默认值”然后确定。
2、开启路由器电源,可以看到在超级终端屏幕中显示路由器启动信息(如果没有输出显示,请按enter键,如果还没有检查连线及接口)3、一台新路由器启动后会弹出would you like to enter the initial configuration dialog ?[yes / no]在此选择no进入命令行模式,如选择yes进入交互对话配置,可按ctrl+c键退出,进入命令行模式。
4、输出停止后按回车键进入Router > *用户模式,只能执行简单的查看命令* Router > ?*显示当前模式下的所有命令及解释*Router >enable *进入特权模式*Router #?*显示特权模式下所有命令*Router #con?*显示以con为首的命令*Router #conf(按tab键)*tab键补全以conf为首的命令*Router #conf ter *进入全局配置模式,路由器、交换机配置支持命令简写* Router (config)#hostname r1 *设置路由器名称*Router (config)#enable password密码字符串,*设置明文显示的进入特权模式的密码* Router (config)#enable secret 密码字符串*设置mds加密的进入特权模式的密码,如果同时设置明文及加密密码,则加密密码生效* Router (config)#line console 0 *进入控制台端口线路模式*Router (config-line)#password 密码字符串*设置通过控制台端口登录进入用户模式的密码* Router (config-line)#login *通过console登录时需要密码,如果不输入login,则上一步所设密码不会生效* Router (config-line)#exit *退到前一级模式end命令或ctrl+z键直接退回到特权模式* Router (config)#line vty 0 4 *进入0-4五个虚拟控制台线终端模式*Router (config-line)#password 密码字符串*设置通过telnet登录用户模式的密码*Router (config-line)#loginRouter (config-if)#ip address 192.168.1.254 255.255.255.0 *为接口配置ip地址*Router (config-if)#no shutdow *接口必须激活才能作用*Router (config)#interface serlal 0 *进入串口配置模式*Router (config-if)#ip address10.1.1.10255.255.255.0Router (config-if)#clock rate 64000 * 此命令为DCE接口指定时钟,频率为64000,一般从在实验环境的路由器见背靠背连接中,在路由器DCE端口为另一台路由器DCE接口一端提供时钟同步信号*Router (config)#line console 0Router (config-line)#logging synchronous (光标跟随)Router (config-line)#exec – timeout 0 0 (永不退出)Router(config)#no ip domain-lookup (关闭域名解析)在pc上设置ip地址192.168.1.1默认网关192.168.1.254在pc上ping 192.168.1.254 测试路由器与pc的连通性在路由器特权模式下Router#show running-config *查看路由器当前配置*Router#show startup-config *查看路由器初始配置文件*Router#copy running-config startup-config*拷贝Ram中的运行配置文件到nvRam中的startup-config Router#show startup-config实验二访问远程设备及cdp协议一、实验目的:练习路由器、交换机基本配置,会使用查看中断本地及远程发起的telnet会话,熟悉cdp协议的查看及cdp输出二、实验设备:2501或其他cisco路由器两台,2950交换机各两台三、实验拓扑:console、vty特权密码均为cisco子网掩码均采用255.255.255 0四、实验配置(一)、R1全局hostname R1ip host R2 10.1.1.2 *设置远程路由器的主机名和ip地址映射*enable secret cisco *设置用户模式进入特权模式密码*线路模式login *登录时需要密码*password cisco *设置通过console口进入用户模式密码*line vty 0 4 *0-4代表5条虚拟控制台线路*loginpassword cisco *设置通过telnet进入用户模式密码*interface serial 0 *进入串口0的接口模式*ip address 10.1.1.1 255.255.255.0 *设置串口0的ip地址*clock rate 64000 *为r2提供时钟同步信号*no shutdown *激活接口*interface ethernet 0 *进入以太口的接口模式下*ip address 192.168.1.254.255.255.255.0 *为以太口配置ip地址*(二)、R2与R1相同2950配置hostname 2950enable password cisco *设置进入特权模式的密码*line console 0login *设置通过console口进入用户模式密码*password cisoline vty 0 15loginpassword cisco *设置telnet密码*(四)、实验步骤1、在R1特权模式下输入show cdp neighbors detail 获得邻居的主机名、ip地址、本地连接接口,邻居设备连接接口、保持时间、邻居平台性能、邻居设备型号2、分别telnet 2924 和R2然后用ctrl+shift+6三键同时按住松手后按x键暂时挂起回话退回R1控制台3、在R2上用show line ,show user 查看远端,登录到本地的telnet会话4、在R2上用clear line 清除远端发起的telnet会话5、在R1上用show session 查看本地发起的telnet会话,发现还有1条telnet 1924的会话6、在R1上用show sessions命令查看telnet会话7、在R1上输入2回车,或resume 2 回车再次telnet R28、在R1上用disconnect 1 断开自己发起的telnet会话,然后用show session 验证实验三备份及恢复操作系统一、实验目的:熟悉掌握网络工程师的基本任务――操作系统备份及恢复二、实验设备:25系列或26系列路由器1台,安装tftp服务器软件的pc一台三、实验拓扑四、实验步骤1、在pc上安装tftp服务器程序并打开2、在R1上配置e0口ip地址192.168.1.2543、在R1特权模式下ping 192.168.1.1测试路由器与tfpt服务器的连通性4、在R1上特权模式下输入show flash 查看ios文件大小及文件名5、在R1上输入copy flash tftp 回车在source file name 后输入ios文件名在renote host name 后输入tftp服务器ip地址在destination filename 后按回车确认用默认文件名6、当出现!!!!……后证明操作系统备份成功7、(1)在特权模式下输入reload重启路由器,重启后如果进入router(boot)>界面,则代表系统从ROM中加载的ios子集(一般在25系列和75新的路由器上出现)看到以上界面则进入路由器接口模式下配置以太口地址192.168.1.254然后在特权模式下输入copy tftp flash 接着按提示输入tftp主机名或主机ip 地址ios文件名本地文件名(一般采取默认)看到!!!!……则代表操作系统恢复成功(2)如果重启后看见界面为Romon>则按以下步骤输入(该界面多在26,36,45等系列路由器上出现)Romon>tftpdnldRomon>ip_ADDRESS=192.168.1.254 *为路由器以太口配置地址*Romon>SUBNET_MASK=255.255.255.0 *为路由器以太口配置子网掩码*Romon>DEFAU_GATEW AY=192.168.1.254 *一般为路由器以太口地址*Romon>TFTP_SERVER=192.168.1.1 *tftp服务器地址*Romon>TFTP_FILE=ios文件名Romon>tftpdnld 出现提示时选择yes,当看到!!!!……时代表恢复成功,完成后在Romon>输入reset重启实验四、密码恢复一、实验目的:熟练掌握密码恢复的步骤及原理并加深对register值的认识,熟练掌握拷贝运行配置文件的步骤,并加深对NVRAM,RAM,ROM和flsh四大存储器的作用及存储内容二、实验设备:25系列和26系列路由器各一台,2950交换机一台。
思科模拟器配置命令.pdf
![思科模拟器配置命令.pdf](https://img.taocdn.com/s3/m/0f968f9f6137ee06eff918f6.png)
相同VLAN间的通信:Switch0与Switch1配置命令相同:Switch#conf tSwitch(config)#vlan 10Switch(config-vlan)#exSwitch(config)#int rang f0/1-5Switch(config-if-range)#sw acc vlan 10Switch(config-if-range)#exSwitch(config)#int f0/24Switch(config-if)#sw mode trunk配置聚合口:(聚合口的成员口类型要一致)Switch0与Switch1配置命令相同:Switch(config)#int rang f0/23-24Switch(config-if-range)#channel-group 1 mode on Switch(config-if-range)#exSwitch(config)#int port-channel 1Switch(config-if)#sw mode trunk远程登陆交换机:Switch(config)#int vlan 1Switch(config-if)#ip add 1.1.1.1 255.255.255.0(IP地址要和远程登陆的客户机在同一个网段) Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#line vty 0Switch(config-line)#password zlrSwitch(config-line)#exitSwitch(config)#enable secret 123Switch(config)#ex三层交换机不同VLAN间的通信:三层交换机配置:Switch(config)#vlan 10Switch(config-vlan)#vlan 20Switch(config-vlan)#exSwitch(config)#int rang f0/23-24Switch(config-if-range)#sw trunk encapsulation dot1qSwitch(config-if-range)#sw mode trunkSwitch(config-if-range)#exSwitch(config)#int vlan 10Switch(config-if)#ip add 192.168.10.254 255.255.255.0Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#int vlan 20Switch(config-if)#ip add 192.168.20.254 255.255.255.0Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#ip routingSwitch0与Switch1配置命令相同:Switch(config)#vlan 20Switch(config-vlan)#exSwitch(config)#int rang f0/6-10Switch(config-if-range)#sw acc vlan 20Switch(config-if-range)#exSwitch(config)#int f0/21Switch(config-if)#sw mode trunk端口安全:Switch1配置命令:Switch(config)#int f0/2Switch(config-if)#sw mode acc(端口安全配置要在端口是静态的前提下) Switch(config-if)#sw port-securitySwitch(config-if)#sw port-security violation protectSwitch(config-if)#sw port-security maximum 1Switch(config-if)#sw port-security mac-address 0000.0c8a.9206 Switch(config-if)#no sw port-security mac-address 0000.0c8a.9206 Switch(config-if)#sw port-security mac-address 0000.0c8a.92d6生成树协议的配置:在选定为根交换机的交换机下配置:Switch(config)#spanning-tree mode pvstSwitch(config)#spanning-tree vlan 1 priority 4096三层交换机与理由器的静态路由通信:ROUTER0:Router#conf tRouter(config)#int f1/0Router(config-if)#ip add 192.168.1.2 255.255.255.0Router(config-if)#no shRouter(config-if)#exRouter(config)#int f0/0Router(config-if)#ip add 192.168.2.254 255.255.255.0Router(config-if)#no shRouter(config-if)#exRouter(config)#ip route 192.168.10.0 255.255.255.0 192.168.1.1Router(config)#ip route 192.168.20.0 255.255.255.0 192.168.1.1三层交换机配置:(F0/1作为路由口的配置;若作为SVI配置,则只需把F0/1划分到VLAN10,VLAN20其中之一并把理由器的F1/0的IP地址设置到与SVI端口相同的网段)Switch(config)#int f0/1Switch(config-if)#no swSwitch(config-if)#ip add 192.168.1.1 255.255.255.0Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#ip route 192.168.2.0 255.255.255.0 f0/1单臂路由配置:ROUTER1:Router(config)#int f0/0Router(config-if)#no shRouter(config-if)#exRouter(config)#int f0/0.1Router(config-subif)#encapsulation dot1q 30Router(config-subif)#ip add 192.168.30.254 255.255.255.0Router(config-subif)#no shRouter(config)#int f0/0.2Router(config-subif)#encapsulation dot1q 40Router(config-subif)#ip add 192.168.40.254 255.255.255.0Router(config-subif)#exSwitch2:Switch(config)#vlan 30Switch(config-vlan)#vlan 40Switch(config-vlan)#exSwitch(config)#int rang f0/1-5Switch(config-if-range)#sw acc vlan 30Switch(config-if-range)#exSwitch(config)#int rang f0/6-10Switch(config-if-range)#sw acc vlan 40Switch(config-if-range)#exSwitch(config)#int f0/24Switch(config-if)#sw mode trunkRIP协议:(连接好每个路由器的端口并配置好各个IP地址,再宣告各个路由器直连的网段)ROUTER1:Router(config)#route ripRouter(config-router)#version 2Router(config-router)#network 192.168.3.0Router(config-router)#network 192.168.30.0Router(config-router)#network 192.168.40.0Router(config-router)#exOSPF协议配置:(连接好每个路由器的端口并配置好各个IP地址,再宣告各个路由器直连的网段)ROUTER2:(作为ABR)Router(config)#route ospf 1Router(config-router)#network 192.168.100.0 0.0.0.255 area 1 Router(config-router)#network 192.168.4.0 0.0.0.255 area 0 Router(config-router)#network 192.168.5.0 0.0.0.255 area 0 路由重分布:ROUTER1(作为ASBR):Router(config)#route ripRouter(config-router)#version 2Router(config-router)#network 192.168.3.0Router(config-router)#network 192.168.30.0Router(config-router)#network 192.168.40.0Router(config-router)#exRouter(config)#route ospf 1Router(config-router)#network 192.168.100.0 0.0.0.255 area 1 Router(config-router)#exRouter(config)#route ripRouter(config-router)#redistribute ospf 1 metric 1Router(config-router)#exRouter(config)#route ospf 1Router(config-router)#redistribute rip metric 1 subnetsNAT配置:ROUTER4:Router>enRouter#conf tRouter(config)#int f0/0Router(config-if)#ip add 192.168.200.254 255.255.255.0Router(config-if)#no shRouter(config-if)#eRouter(config)#int f1/0Router(config-if)#ip add 192.168.150.254 255.255.255.0Router(config-if)#no shRouter(config-if)#exRouter(config)#ip nat inside source static 192.168.200.1 192.168.7.3Router(config)#int f0/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se3/0Router(config-if)#ip nat outsideRouter(config-if)#exRouter(config)#ip nat pool zlr 192.168.7.4 192.168.7.10 netRouter(config)#ip nat pool zlr 192.168.7.4 192.168.7.10 netmask 192.168.7.0 Router(config)#access-list 1 permit 192.168.200.0 0.0.0.255Router(config)#ip nat inside source list 1 pool zlrRouter(config)#int f0/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se3/0Router(config-if)#ip nat outsideRouter(config-if)#exRouter(config)#ip nat inside source static tcp 192.168.150.1 80 192.168.7.2 80 Router(config)#int f1/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se 3/0Router(config-if)#ip nat outsideRouter(config-if)#exRouter(config)#ip nat pool xl 192.168.7.20 192.168.7.20 netmask 192.168.7.0 Router(config)#access-list 2 permit 192.168.150.0 0.0.0.255Router(config)#ip nat inside source list 2 pool xl overloadRouter(config)#int f1/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se3/0Router(config-if)#ip nat outsideRouter(config-if)#ACL配置:ROUTER4:Router(config)#access-list 10 deny 192.168.4.0 0.0.0.255Router(config)#access-list 10 permit anyRouter(config)#int f1/0Router(config-if)#ip access-group 10 outRouter(config-if)#exRouter(config)#ip access-list standRouter(config)#ip access-list standard xzRouter(config-std-nacl)#10 deny 192.168.6.0 0.0.0.255Router(config-std-nacl)#20 permit anyRouter(config-std-nacl)#exRouter(config)#int f0/0Router(config-if)#ip access-group xz outROUTER2:Router(config)#access-list 100 deny tcp host 192.168.4.1 host 192.168.7.3 eq www Router(config)#access-list 100 permit ip any anyRouter(config)#int f0/0Router(config-if)#ip access-group 100 inROUTER3:Router(config)#ip access-list extended lrRouter(config-ext-nacl)#10 deny tcp host 192.168.6.1 host 192.168.7.2 eq www Router(config-ext-nacl)#20 permit ip any anyRouter(config)#int f0/0Router(config-if)#ip accRouter(config-if)#ip access-group lr in。
cisico模拟器的交换机和路由器的配置命令
![cisico模拟器的交换机和路由器的配置命令](https://img.taocdn.com/s3/m/9c08d71052d380eb62946d61.png)
Enable功能:进入特权模式条件:用户模式格式:EnableConfigure terminal功能:进入全局配置模式条件:特权模式格式:configure terminalHostname功能:设置主机名条件:全局配置模式格式:hostname hostnameInterface vlan vlan-idIp address address netmask功能:配置管理IP条件:全局配置模式格式:interface vlan vlan-idIp address address netmask备注:vlan-id代表要选择配置的VLAN号Address 为要设置的管理IP地址,netmask为子网掩码Ip domain-lookup功能:启用与禁止DNS服务器条件:端口配置模式格式:ip domain-lookupno ip domain-lookupIp name-server serveraddress1 …serveraddress6功能:指定DNS服务器地址条件:端口配置模式格式:ip name-server serveraddress1 serveraddress 2…备注:交换机最多可指定6个DNS服务器地址,各地址间用空格分隔Ip http server功能:启用与禁用HTTP服务条件:端口配置模式格式:ip http serverno ip http serverShow version功能:查看IOS版本条件:特权模式格式:show versionShow running-configShow startup-config功能:查看配置信息条件:特权模式格式:show running-configshow startup-config备注:running-config显示当前正在运行的配置startup-config显示保存在NVRAM中的启动配置Show interface type mod/port功能:查看端口信息条件:特权模式格式:show interface type mod/port备注:type代表端口类型,通常有Enthernet/Fastenthernet/Gigabitethernet/Tengigabitethernet Mod和Port代表端口所在的模块和该模块中的编号Show mac-address-table dynamic|static vlan vlan-id功能:查看交换机的MAC地址条件:特权模式格式:show mac-address-table dynamic|static vlan vlan-id备注:dynamic代表显示动态学习到的MAC地址static代表静态指定的MAC地址vlan vlan-id代表查看指定的VLAN学到的MAC地址Show mac-address-table dynamic|static interface type mod/port功能:查看从某个端口学到的MAC地址条件:特权模式格式:show mac-address-table dynamic|static interface type mod/portShow mac-address-table address mac-address功能:显示和某个MAC地址相关联的端口和VLAN信息条件:特权模式格式:show mac-address-table address mac-addressInterface type mod/port功能:选择端口条件:全局配置模式格式:interface type mod/portInterface range type mod/startport-endport功能:选择多个端口条件:全局配置模式格式:interface range type mod/startport – endport备注:连字符“-”两端需要空格Description port-description功能:为端口指定一个描述性文字条件:端口配置模式格式:description port-description备注:如果描述性文字里包含空格,则需要引号将描述性文字引起来Speed speed功能:设置端口通信速度条件:端口配置模式格式:speed 10/100/1000/autoDuplex full/half/auto功能:设置端口的单双工模式条件:端口配置模式格式:duplex full/half/autoMtu功能:配置MTU,指交换机能够交换的最大帧的大小条件:端口配置模式格式:mtu 1500-9216BSpanning-tree portfastSwitchport mode accessNo channel-group功能:优化端口条件:端口配置模式格式:Spanning-tree portfastSwitchport mode accessNo channel-groupShutdown功能:启用与禁用端口条件:端口配置模式格式:shutdown(禁用)no shutdown(启用)Port monitor type mod/port功能:配置端口镜像条件:端口配置模式格式:port monitor type mod/portShow port monitor功能:查看端口镜像配置信息条件:全局配置模式格式:show port monitorswitchport功能:端口的2层与3层选择条件:端口配置模式格式:no switchport(3层)switchport(2层)IP address address netmask功能:为3层端口配置IP地址条件:端口配置模式格式:ip address address netmask备注:netmask为子网掩码Ip route network netmask network功能:配置静态路由条件:全局配置模式格式:Ip route network netmask networkIp route 0.0.0.0 0.0.0.0 ip-address功能:定义默认路由条件:全局配置模式格式:ip route 0.0.0.0 0.0.0.0 ip-addressShow ip route功能:查看路由信息条件:特权模式格式:show ip routeClear ip route功能:清除路由条件:全局配置模式格式:clear ip route network netmask/*备注:network和netmask用于清楚指定的路由,若用*则代表清除全部路由Vtp domain domain name功能:创建VTP管理域条件:VLAN管理模式格式:vtp domain domain nameVtp server/client/transparent功能:设置VTP模式条件:VLAN管理模式格式:vtp server/client/transparentShow vtp status功能:查看VTP信息条件:特权模式格式:show vtp statusSwitchport trunk encapsulation isl/dotlqSwitchport mode trunk功能:选择封装协议和启用trunk链路条件:端口配置模式格式:Switchport trunk encapsulation isl/dotlqSwitchport mode trunkVlan vlan-id name vlan-name功能:创建VLAN条件:VLAN管理模式格式:Switchport access vlan vlan-idIp helper-address dhcp-server功能:为虚拟子接口指定DHCP服务器地址条件:端口配置模式格式:ip helper-address dhcp-serverswitchport trunk allowed vlan remove vlanlist功能:设置不允许通过trunk链路的VLAN条件:端口配置模式格式:switchport trunk allowed vlan remove vlanlist备注:当移除多个VLAN的时候,vlanlist里要加逗号switchport trunk allowed vlan add vlanlist功能:设置允许通过trunk链路的VLAN条件:端口配置模式格式:switchport trunk allowed vlan add vlanlist。
思科配置命令行
![思科配置命令行](https://img.taocdn.com/s3/m/b7ceb17127284b73f24250f1.png)
SW(config)#hostname sw 系统命名为SWSW(config)#line console 0 设置登陆口密码为SW(config-line)#password 123SW(config-line)#loginSW(config)#enable password 456 设置特权密码456SW(config)#line vty 0 15 设置vty界面密码及权限SW(config-line)#password 123SW(config-line)#loginSW(config-line)#privilege level 15SW(config)#vlan 21 创建vlanSW(config-vlan)#name bjwb 描述vlanSW(config)#interface f0/1 端口access设置SW(config-if)#switchport mode accessSW(config-if)#switchport access vlan 21SW(config)#interface range f0/1-10 端口批处理SW(config-if-range)#switchport mode accessSW(config-if-range)#switchport access vlan 21SW(config)#vlan 10 vlan接口配置IPSW(config-vlan)#name wgSW(config)#interface vlan 10SW(config-if)#ip address 10.10.10.2 255.255.255.0SW(config-if)#no shutdownSW(config)#interface f0/15 端口的trunk配置SW(config-if)#switchport mode trunkSW(config-if)#switchport trunk allowed vlan 21,22,10 允许vlan21,22,10的信息/SW(config-if)#switchport trunk allowed vlan all路由配置SW(config)#ip route 目的网络子网掩码下一跳(下一接口地址)Router(config)#interface f0/0 路由器接口下配置IP Router(config-if)#ip address 10.10.18.1 255.255.255.0 Router(config-if)#no shutdown。
思科常用配置命令及参数
![思科常用配置命令及参数](https://img.taocdn.com/s3/m/095a65116d85ec3a87c24028915f804d2b1687d9.png)
思科常用配置命令及参数思科cisco公司制造的路由器、交换机和其他设备承载了全球80%的互联网通信,成为了网络应用的成功实践者之一,那么你知道思科常用配置命令及参数有哪些吗?下面是店铺整理的一些关于思科常用配置命令及参数的相关资料,供你参考。
思科常用配置命令及参数:启动接口,分配IP地址:router(config-if)# encapsulation frame-relay [cisco | ietf ]router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ] router(config-if)# bandwidth kilobitsrouter(config-if)# frame-relay invers-arp [ Protocol ] [dlci ]<--配置静态Invers ARP表:router(config)# frame-relay Protocol Protocol-Address DLCI [ Broadcast ] [ ietf | cisco ] [ payload-compress | packet-by-packet ] --><--设置Keepalive间隔:router(config-if)# keepalive Number--><--为本地接口指定DLCI:router(config-if)# frame-lelay local-dlci Number--><--子接口配置:router(config-if)# interface Type Port.Subininterface-Number [ multipoint | point-to-point ]router(config-subif)# ip unnumbered Interfacerouter(config-subif)# frame-lelay local-dlci Number-->router(config-if)# ^z配置标准ACL:router(config)# access-list Access-List-Number [ permit | deny ] source [ source-mask ] <-- Access-List-Number 范围:1~99标准ACL;100~199扩展ACL;800~899标准IPX ACL;900~999扩展IPX ACL;1000~1099 IPX SAP ACL;600~699Apple Talk ACL--> router(config)# interface Type Portrouter(config-if)# ip access-group Access-List-Number [ in | out ]router(config-if)# ^z配置扩展ACL:router(config)# access-list Access-List-Number [ permit | deny ] [ Protocol | Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ]router(config)# interface Type Portrouter(config-if)# ip access-group Access-List-Number [ in | out ]router(config-if)# ^z配置命名ACL:router(config)# ip access-list [ standard | extended ] ACL-Namerouter(config [ std- | ext- ] nacl)# [ permit | deny ] [ IP-Access-List-Test-Conditions ]router(config [ std- | ext- ] nacl)# no [ permit | deny ] [ IP-Access-List-Test-Conditions ]router(config [ std- | ext- ] nacl)# ^zrouter(config)# interface Type Portrouter(config-if)# ip access-group [ACL-Name | 1~199 ] [ in | out ]router(config-if)# ^z配置DCE时钟:router# show controllers Type Port <--确定DCE接口-->router(confin-if)# clock rate 64000 <--进入DCE接口设置时钟速率-->router(config-if)# ^z配置PPP协议:router(config)# username Name password Set-Password-Here <--验证方建立数据库-->router(config)# interface Type Portrouter(config-if)# encapsulation ppp <--启动PPP协议-->router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ] <--选择PPP认证-->router(config-if)# ppp pap sent-username Name password Password <--发送验证信息-->router(config-if)# ^zPAP单向认证配置实例:验证方:router-server(config)# username Client password 12345 <--验证方建立数据库-->router-server(config)# interface serial 0router-server(config-if)# encapsulation ppprouter-server(config-if)# ppp authentication pap <--选择使用PAP实现PPP认证-->router-server(config-if)# ^z被验证方:router-client(config-if)# encapsulation ppprouter-client(config-if)# ppp pap sent-username Client password 12345 <--发送验证信息-->router-client(config-if)# ^zPAP双向认证配置实例:路由器 A:routerA(config)# username B password 12345routerA(config)# interface serial 0routerA(config-if)# encapsulation ppprouterA(config-if)# ppp authentication paprouterA(config-if)# ppp pap sent-username A password 54321routerA(config-if)# ^z路由器 B:routerB(config)# username A password 54321routerB(config)# interface serial 1routerB(config-if)# encapsulation ppprouterB(config-if)# ppp authentication paprouterB(config-if)# ppp pap sent-username B password 12345routerB(config-if)# ^zCHAP单向认证配置实例:验证方:router-server(config)# username router-client password 12345router-server(config)# interface serial 0router-server(config-if)# encapsulation ppprouter-server(config-if)# ppp authentication chaprouter-server(config-if)# ^z被验证方:router-client(config-if)# encapsulation ppprouter-client(config-if)# ppp authentication chaprouter-client(config-if)# ppp chap hostname router-clientrouter-client(config-if)# ppp chap password 12345router-client(config-if)# ^z。
思科模拟器命令
![思科模拟器命令](https://img.taocdn.com/s3/m/e324fd91a1c7aa00b52acbbf.png)
1.计算机命令:PCA logi n: root password: linux # shutdow n -h now # logout # logi n # ifconfig;显示IP 地址# ifconfig ethO <ip address 〉netmask <netmask> ; 设置 IP 地址 # ifconfig ehtO <ip address> netmask <netmask> down ; 删除 IP 地址 # route add 0.0.0.0 gw <ip> # route del 0.0.0.0 gw <ip> # route add default gw <ip> # route del default gw <ip> # route# pi ng <ip> # telnet <ip>交换机VLAN 设置: switch#vla n database switch(vla n)#vla n 2交换机基本状态: switch: rommon> 态 host name> host name# host name(c on fig)# host name(c on fig-if)# 交换机口令设置: switch>e nable switch#c onfig termi nal switch(c on fig)#host name <host name> switch(config)#enable secret xxx switch(config)#enable password xxa switch(c on fig)#li ne con sole 0 switch(c on fig-li ne)#li ne vty 0 4 switch(c on fig-li ne)#logi n switch(config-line)#password xx switch#exit ;交换机的ROM 状态;路由器的ROM 状;用户模式 ;特权模式 ;全局配置模式接口状态进入特权模式;进入全局配置模式 设置交换机的主机名 ;设置特权加密口令 ;设置特权非密口令 ;进入控制台口进入虚拟终端 ;允许登录设置登录口令xx ;返回命令;使用root 用户 ;口令是 linux ;同init 0关机 ;设置网关 ;删除网关显示网关;进入VLAN 设置 ;建 VLAN 2switch(vla n)#no via n 2 switch(co nfig)#i nt fO/1 switch(c on fig-if)#switchport access via n 2 switch(con fig-if)#switchport mode trunkswitch(config-if)#switchport trunk allowed vlan 1,2 switch(c on fig-if)#switchport trunk en cap dot1q switch(config)#vtp domain <name> switch(c on fig)#vtp password <word> switch(c on fig)#vtp mode server switch(c on fig)#vtp mode clie nt交换机设置IP地址:switch(c on fig)#i nterface vla n 1 switch(c on fig-if)#ip address <IP> <mask>switch#dir flash:交换机显示命令:switch#writeswitch#show vtp switch#show run switch#show vla n switch#show in terface switch#show int f0/0;保存配置信息查看vtp配置信息;查看当前配置信息查看vlan配置信息;查看端口信息查看指定端口信息3.路由器支持的命令:路由器显示命令:router#show run router#show in terfacerouter#show ip route router#show cdp neirouter#reload路由器口令设置:router>e nablerouter#c onfig termi nal router(co nfig)#host name <host name> router(c on fig)#e nable secret xxx router(co nfig)#e nable password xxb router(co nfig)#li ne con sole 0 router(config-line)#line vty 0 4 router(co nfig-li ne)#log inrouter(config-line)#password xx;删vlan 2;进入端口1当前端口加入vlan 2;设置为干线;设置允许的vlan;设置vlan中继设置发vtp域名设置发vtp密码;设置发vtp模式;设置发vtp模式;进入vlan 1 ;设置IP地址;设置默认网关;查看闪存显示配置信息;显示接口信息显示路由信息显示邻居信息重新起动进入特权模式;进入全局配置模式设置交换机的主机名;设置特权加密口令;设置特权非密口令;进入控制台口进入虚拟终端;要求口令验证设置登录口令xxrouter(config)#(Ctrl+z) router#exit ;返回特权模式;返回命令路由器配置:router(config)#int s0/0router(config-if)#no shutdown router(config-if)#clock rate 64000 router(config-if)#ip address <ip> <netmask>;进入Serail 接口;激活当前接口;设置时钟频率;设置IP 地址router(config-if)#ip address <ip> <netmask> second ;设置第二个IP router(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address <ip> <netmask> ;设置子接口IProuter(config-subif.1)#encapsulation dot1q <n> router(config)#config-register 0x2142router(config)#config-register 0x2102router#reload ;绑定vlan 中继协议;跳过配置文件;正常使用配置文件;重新引导路由器文件操作:router#copy running-config startup-config router#copy running-config tftprouter#copy startup-config tftp router#copy tftp flash:;保存配置;保存配置到tftp ;开机配置存到tftp;下传文件到flashrouter#copy tftp startup-config ;下载配置文件ROM 状态:Ctrl+Break rommon>confreg 0x2142 rommon>confreg 0x2102 rommon>reset ;进入ROM 监控状态;跳过配置文件;恢复配置文件;重新引导rommon> copy xmodem:<s name> flash:<d name> ;从con sole 传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP 服务器IPrommon>TFTP_FILE=c2600.bin rommon>tftpdnldrommon>dir flash:;指定下载的文件;从tftp 下载;查看闪存内容rommon>boot ;引导IOS静态路由:ip route <ip-address> <subnet-mask> <gateway> ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例动态路由:router(config)#ip routing router(config)#router rip router(config-router)#network <netid> router(config-router)#negihbor <ip>帧中继命令: router(config)#frame-relayswitching router(config-s0)#encapsulation frame-relay router(config-s0)#fram-relay lmi-type cisco router(config-s0)#frame-relay intf-type DCE router(config-s0)#frame-relay dlci 16 router(config-s0)#frame-relay local-dlci 20 router(config-s0)#frame-relay interface-dlci 16 ; router(config)#log-adjacency-changes router(config)#int s0/0.1 point-to-pointrouter#show frame pvc router#show frame map 基本访问控制列表:router(config)#access-list <number> permit|deny<source_ip> <wild|any> router(config)#interface <interface> ;default:deny any router(config-if)#ip access-group <number> in|out ;defaultut例 1 : router(config)#access-list 1 deny host 10.65.1.1 router(config)#access-list 1 permit any router(config)#int f0/0 router(config-if)#ip access-group 4 in例 2 : router(config)#access-list 4 permit 10.8.1.1 router(config)#access-list 4 deny 10.8.1.0 0.0.0.255 router(config)#access-list 4 permit 10.8.0.0 0.0.255.255router(config)#access-list 4 deny 10.0.0.0 0.255.255.255 router(config)#access-list 4 permit any router(config)#int f0/1 router(config-if)#ip access-group 4 in扩展访问控制列表: access-list <number> permit|deny icmp <S_IP wild> <D_IP wild>[type] access-list <number> permit|deny tcp <S_IP wild> <D_IP wild>[port] router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo router(config)#access-list 101 permit ip any any router(config)#int s0/0 router(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 80 router(config)#access-list 102 permit ip any any router(config)#interface s0/1 router(config-if)#ip access-group 102 out删除访问控制例表 : router(config)#no access-list 102 router(config-if)#no ip access-group 101 in路由器的 nat 配置Router(config-if)#ip nat inside ;当前接口指定为内部接口 Router(config-if)#ip nat;启动路由转发;启动 RIP 路由协议。
思科 模拟器路由器操作命令
![思科 模拟器路由器操作命令](https://img.taocdn.com/s3/m/382a8f0e52ea551810a68730.png)
•配置用户user1,密码为digitalchina,使用此用户名的用户群为普通用户,不可以进入特权模式–Router#configRouter_config#username user1 password digitalchina –Router_config#aaa authentication for_login login local–Router_config#line console 0–Router_config_line#login authentication for_login–Router_config_line#–Router_config#enable password digitalchina level 15实训五十八HDLC封装•RouterA配置•指定封装协议为HDLC协议–RouterA_config#interface serial 2/0–RouterA_config_s2/0#encapsulation hdlc•指定接口的IP地址以及子网掩码–RouterA_config_s2/0#ip address 11.1.1.1 255.255.255.0–RouterA_config_s2/0#no shut•RouterB配置–Router_config#interface serial 1/0–Router_config_s1/0#encapsulation hdlc–Router_config_s1/0#ip address 11.1.1.2 255.255.255.0–指定此端口(DCE端)的内时钟信号频率–Router_config_s1/0#physical-layer speed 64000端口状态察看•Router#show interface serial 2/0•Serial2/0 is up, line protocol is up•。
02、Cisco Packet Tracer模拟器----基本配置
![02、Cisco Packet Tracer模拟器----基本配置](https://img.taocdn.com/s3/m/8fb98fb1c77da26925c5b088.png)
PC
篇
可以配置IP 地址等,具有一般电脑的所有功能
还有高级配置:
02、Cisco Packet Tracer 模拟器----基本配置2015年1月3日14:16
在PC机器上无所不能的添加东西,还可以添加摄像头,移动硬盘等等。
【注意】不管在什么设备上添加模块,一定要关闭电源才能进行操作路由器交换机
双击出现命令框,可以输入命令
配置这个选项用于快速配置,不建议使用
先关闭电源,可以拖动下边的东西到黑框除,可以切换设备的模块,非常方便!
配置终端
路由器的各种模式:
e xit--------------------------------------------------------------------------------------------------可以返回上一级
扩展技能
1、使用?可以提醒,这样很快就能找到自己需要的配置项目
2、使用tab可以补全命令
这两个技能非常适用
show技能
在全局配置模式下使用
功能命令缩写
显示系统信息shwo running-config sh su
显示系统版本show version sh ver
显示端口信息show interface fastEthernet 0/1sh in f0/1
显示路由表show ip route sh ip ro(这个一般我都是全拼)
显示系统时间show clock sh clo(这个一般全拼)。
CISCO模拟器的使用
![CISCO模拟器的使用](https://img.taocdn.com/s3/m/ca526a29cfc789eb172dc853.png)
Cisco模拟器的使用在BENET3.0课程A模块,我们不仅讲解Cisco路由器和交换机,还添加了Cisco ASA防火墙的知识,所以在进行上机实验时除了需要使用DynamipsGUI软件来模拟Cisco路由、交换设备外,还需要使用ASA模拟器来完成防火墙的相关实验。
所以,只有熟练的掌握这两种模拟器的使用,才能更好的实施BENET3.0 A模块的课程。
然而,ASA模拟器并不像DynamipsGUI软件那样界面友好、操作方便,若要将ASA防火墙和路由器(交换机或PC)进行连接构建网络拓扑就需要分别编辑ASA模拟器和路由器(交换机)的批处理文件才能完成,这就使得简单的网络拓扑搭建变得十分复杂。
本文主要讲解路由器、交换机、ASA防火墙的批处理文件内容含义,以及如何使得ASA 防火墙与路由器(交换机或PC)进行连接。
一、路由器、交换机模拟器1、路由器、交换机模拟器生成的批处理文件由DynamipsGUI软件生成的Cisco 3640设备批处理文件如下:1)Cisco 3640设备批处理文件内容含义批处理中使用的Dos命令已经在命令行末尾进行了注释。
而后续“..\dynamips-wxp.exe”命令表示使用上一级目录下的dynamips-wxp.exe程序,dynamips-wxp.exe后面为模拟程序的一些参数:⏹-T:使用Console端口连接的端口号,此处为2001(可以通过telnet 127.0.0.1 2001登录设备进行配置);⏹-P:模拟路由器的平台,此处为3600(可以是7200、3600、2600等);⏹-r:虚拟内存的大小,即路由器RAM的大小,此处为128;⏹-t:设备具体型号(或主控板型号,例如:Cisco 7200的npe-400),此处为3640;⏹-c:配置寄存器的值,此处为0x2102;⏹-p:槽插入的板块类型,语法为-p Slotnum:Slottype,例如:“-p 0:NM-16ESW”表示第0槽插入的板块为NM-16ESW;⏹-s:将板卡绑定到网卡的IO上(进行设备间连接);⏹--idle-pc:降低模拟器的CPU占用率而参数中“..\C3640-JK.BIN”表示使用的IOS,即上一级目录的C3640-JK.BIN文件。
思科网络设备配置命令
![思科网络设备配置命令](https://img.taocdn.com/s3/m/3fc1ae65a417866fb84a8ef8.png)
思科网络设备常用配置命令一、VLAN配置1、添加VLANvlan database //VLAN数据库模式vlan <vlan-id> name <name>真实设备还可以采用全局模式添加VLAN:config terminalvlan <vlan-id>name <name>2、分配接口interface range f0/m – nswitchport mode accessswitchport access vlan <vlan-id>3、查看配置show vlan briefshow vlan id <vlan-id>二、中继配置1、配置Trunkinterface f0/mswitchport mode trunkswitchport trunk encapsulation { isl | dot1q | negotiate } //配封装方式,可不配2、查看接口模式show interface f0/m switchport三、VTP配置vtp domain <域名> //创建VTP域vtp mode { server | client | transparent } //配VTP模式vtp password <密码> //配VTP口令show vtp status //查看配置四、以太网通道配置interface range f0/m – nchannel-protocol {pagp | lacp} //可以不配channel-group <number> mode on五、STP配置spanning-tree vlan <vlan-id> root { primary | secondary } //配为主或次根网桥spanning-tree vlan <vlan-id> priority <0~655535> //配优先级,越小越优先show spanning-tree //查看STP六、三层交换机配置,实现VLAN互通ip routing //启动路由interface vlan <vlan-id> //配置VLAN的IP地址ip address <ip> <netmask>no shutdowninterface f0/m //配f0/m为路由接口no switchport七、静态路由与默认路由配置ip route <network> <netmask> <下一跳地址> //静态路由ip route 0.0.0.0 0.0.0.0 <下一跳地址> //默认路由八、单臂路由配置int f0/xno shutdown (模拟设备小凡用no switchport)int f0/x.1encapsulation dot1q <vlan-id>ip address <ip> <netmask>九、RIP协议配置router ripversion {1 | 2} //选择版本,默认为版本1no auto-summary //关闭路由汇总network <网络地址> //宣告网段redistribute ospf <ospf进程号> //重分发OSPF路由协议十、OSPF协议配置router ospf <进程号>network <网络地址> <反向掩码> area <区域号>redistribute rip //路由重分发十一、HSRP配置interface f0/mstandby <HSRP组号> ip <虚拟IP> //配为HSRP成员standby <HSRP组号> priority <0~255> //配优先级,高的为活跃路由器standby <HSRP组号> preempt //配占先权十二、访问控制列表1、标准ACLaccess-list <1~99> permit | deny <源地址> <反向掩码>interface f0/mip access-group <表号> {in | out }2、扩展ACLaccess-list <100~199> {permit | deny} <协议> <源地址> <反向掩码> <目的地址> <反向掩码> eq 端口3、命名ACLip access-list {standard| extend } <ACL表名>permit | deny <源地址> <反向掩码>{permit | deny} <协议> <源地址> <反向掩码> <目的地址> <反向掩码> eq 端口4、定时ACLtime-range <时间范围名称>periodic <星期X英文> hh:mm to <星期X英文> hh:mm //定义一个时间周期absolute [start hh:mm 日月年] [ end hh:mm 日月年] //定义绝对时间access-list <100~199> {permit | deny} <协议> <源地址> <反向掩码> <目的地址> <反向掩码> eq 端口time-range <时间范围名称> //配ACL时引入时间范围十三、网络地址转换1、静态NATip nat inside soure static <私有IP> <公有IP>interface f0/m //内部端口启用NATip nat insideinterface s1/n //外部端口启用NATip nat outside2、动态NATaccess-list <1~99> permit | deny <源地址> <反向掩码>ip nat pool <地址池名> <开始公有IP> <结束公有IP> netmask <掩码>ip nat inside soure list <ACL表号> pool <地址池名> [overload] //配地址复用加overload 十四、PPP认证1、PAP认证interface serial 0/0encapsulation pppip address <IP地址> <掩码>主认证方:username user_name password 0 pass_wordppp authentication pap被认证方:配置认证用户名和密码Router(config-if)# ppp pap sent-username user_name password 0 pass_word2、CHAP认证主认证方:配置认证用户名和密码Router(config)# username user_name password 0 pass_word启用CHAP认证Router(config-if)# ppp authentication chap配置认证用的用户名Router(config-if)# ppp chap hostname user_name被认证方:配置认证用户名和密码Router(config)# username user_name password 0 pass_word配置认证用的密码Router(config-if)# ppp chap password 0 pass_word优先使用username设置的密码;没有再用ppp chap设置的。
思科模拟器命令
![思科模拟器命令](https://img.taocdn.com/s3/m/a04637c652ea551811a68725.png)
1. 计算机命令:PCA login: root ;使用root用户password: linux ;口令是linux# shutdown -h now ;同init 0 关机# logout# login# ifconfig ;显示IP地址# ifconfig eth0 <ip address> netmask <netmask> ;设置IP地址# ifconfig eht0 <ip address> netmask <netmask> down ;删除IP地址# route add 0.0.0.0 gw <ip># route del 0.0.0.0 gw <ip># route add default gw <ip> ;设置网关# route del default gw <ip> ;删除网关# route ;显示网关# ping <ip># telnet <ip>2. 交换机支持的命令:交换机基本状态:switch: ;交换机的ROM状态rommon> ;路由器的ROM状态hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname <hostname> ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain <name> ;设置发vtp域名switch(config)#vtp password <word> ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1 switch(config-if)#ip address <IP> <mask> ;设置IP地址switch(config)#ip default-gateway <IP> ;设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息3. 路由器支持的命令:路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动路由器口令设置:router>enable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname <hostname> ;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(config-line)#password xx ;设置登录口令xx router(config)#(Ctrl+z) ;返回特权模式router#exit ;返回命令路由器配置:router(config)#int s0/0 ;进入Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置时钟频率router(config-if)#ip address <ip> <netmask> ;设置IP地址router(config-if)#ip address <ip> <netmask> second ;设置第二个IP router(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address <ip> <netmask> ;设置子接口IP router(config-subif.1)#encapsulation dot1q <n> ;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftp router#copy startup-config tftp ;开机配置存到tftp router#copy tftp flash: ;下传文件到flash router#copy tftp startup-config ;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset ;重新引导rommon>copy xmodem:<sname> flash:<dname> ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存容rommon>boot ;引导IOS静态路由:ip route <ip-address> <subnet-mask> <gateway> ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由协议。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
思科模拟器配置命令 YKK standardization office【 YKK5AB- YKK08- YKK2C- YKK18】相同VLAN间的通信:Switch0与Switch1配置命令相同:Switch#conf tSwitch(config)#vlan 10Switch(config-vlan)#exSwitch(config)#int rang f0/1-5Switch(config-if-range)#sw acc vlan 10Switch(config-if-range)#exSwitch(config)#int f0/24Switch(config-if)#sw mode trunk配置聚合口:(聚合口的成员口类型要一致)Switch0与Switch1配置命令相同:Switch(config)#int rang f0/23-24Switch(config-if-range)#channel-group 1 mode on Switch(config-if-range)#exSwitch(config)#int port-channel 1Switch(config-if)#sw mode trunk远程登陆交换机:Switch(config)#int vlan 1Switch(config-if)#ip add 1.1.1.1 255.255.255.0(IP地址要和远程登陆的客户机在同一个网段) Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#line vty 0Switch(config-line)#password zlrSwitch(config-line)#exitSwitch(config)#enable secret 123Switch(config)#ex三层交换机不同VLAN间的通信:三层交换机配置:Switch(config)#vlan 10Switch(config-vlan)#vlan 20Switch(config-vlan)#exSwitch(config)#int rang f0/23-24Switch(config-if-range)#sw trunk encapsulation dot1qSwitch(config-if-range)#sw mode trunkSwitch(config-if-range)#exSwitch(config)#int vlan 10Switch(config-if)#ip add 192.168.10.254 255.255.255.0Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#int vlan 20Switch(config-if)#ip add 192.168.20.254 255.255.255.0Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#ip routingSwitch0与Switch1配置命令相同:Switch(config)#vlan 20Switch(config-vlan)#exSwitch(config)#int rang f0/6-10Switch(config-if-range)#sw acc vlan 20Switch(config-if-range)#exSwitch(config)#int f0/21Switch(config-if)#sw mode trunk端口安全:Switch1配置命令:Switch(config)#int f0/2Switch(config-if)#sw mode acc(端口安全配置要在端口是静态的前提下) Switch(config-if)#sw port-securitySwitch(config-if)#sw port-security violation protectSwitch(config-if)#sw port-security maximum 1Switch(config-if)#sw port-security mac-address 0000.0c8a.9206 Switch(config-if)#no sw port-security mac-address 0000.0c8a.9206 Switch(config-if)#sw port-security mac-address 0000.0c8a.92d6生成树协议的配置:在选定为根交换机的交换机下配置:Switch(config)#spanning-tree mode pvstSwitch(config)#spanning-tree vlan 1 priority 4096三层交换机与理由器的静态路由通信:ROUTER0:Router#conf tRouter(config)#int f1/0Router(config-if)#ip add 192.168.1.2 255.255.255.0Router(config-if)#no shRouter(config-if)#exRouter(config)#int f0/0Router(config-if)#ip add 192.168.2.254 255.255.255.0Router(config-if)#no shRouter(config-if)#exRouter(config)#ip route 192.168.10.0 255.255.255.0 192.168.1.1Router(config)#ip route 192.168.20.0 255.255.255.0 192.168.1.1三层交换机配置:(F0/1作为路由口的配置;若作为SVI配置,则只需把F0/1划分到VLAN10,VLAN20其中之一并把理由器的F1/0的IP地址设置到与SVI端口相同的网段)Switch(config)#int f0/1Switch(config-if)#no swSwitch(config-if)#ip add 192.168.1.1 255.255.255.0Switch(config-if)#no shSwitch(config-if)#exSwitch(config)#ip route 192.168.2.0 255.255.255.0 f0/1单臂路由配置:ROUTER1:Router(config)#int f0/0Router(config-if)#no shRouter(config-if)#exRouter(config)#int f0/0.1Router(config-subif)#encapsulation dot1q 30Router(config-subif)#ip add 192.168.30.254 255.255.255.0Router(config-subif)#no shRouter(config)#int f0/0.2Router(config-subif)#encapsulation dot1q 40Router(config-subif)#ip add 192.168.40.254 255.255.255.0Router(config-subif)#exSwitch2:Switch(config)#vlan 30Switch(config-vlan)#vlan 40Switch(config-vlan)#exSwitch(config)#int rang f0/1-5Switch(config-if-range)#sw acc vlan 30Switch(config-if-range)#exSwitch(config)#int rang f0/6-10Switch(config-if-range)#sw acc vlan 40Switch(config-if-range)#exSwitch(config)#int f0/24Switch(config-if)#sw mode trunkRIP协议:(连接好每个路由器的端口并配置好各个IP地址,再宣告各个路由器直连的网段)ROUTER1:Router(config)#route ripRouter(config-router)#version 2Router(config-router)#network 192.168.3.0Router(config-router)#network 192.168.30.0Router(config-router)#network 192.168.40.0Router(config-router)#exOSPF协议配置:(连接好每个路由器的端口并配置好各个IP地址,再宣告各个路由器直连的网段)ROUTER2:(作为ABR)Router(config)#route ospf 1Router(config-router)#network 192.168.100.0 0.0.0.255 area 1 Router(config-router)#network 192.168.4.0 0.0.0.255 area 0 Router(config-router)#network 192.168.5.0 0.0.0.255 area 0 路由重分布:ROUTER1(作为ASBR):Router(config)#route ripRouter(config-router)#version 2Router(config-router)#network 192.168.3.0Router(config-router)#network 192.168.30.0Router(config-router)#network 192.168.40.0Router(config-router)#exRouter(config)#route ospf 1Router(config-router)#network 192.168.100.0 0.0.0.255 area 1 Router(config-router)#exRouter(config)#route ripRouter(config-router)#redistribute ospf 1 metric 1Router(config-router)#exRouter(config)#route ospf 1Router(config-router)#redistribute rip metric 1 subnetsNAT配置:ROUTER4:Router>enRouter#conf tRouter(config)#int f0/0Router(config-if)#ip add 192.168.200.254 255.255.255.0Router(config-if)#no shRouter(config-if)#eRouter(config)#int f1/0Router(config-if)#ip add 192.168.150.254 255.255.255.0Router(config-if)#no shRouter(config-if)#exRouter(config)#ip nat inside source static 192.168.200.1 192.168.7.3Router(config)#int f0/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se3/0Router(config-if)#ip nat outsideRouter(config-if)#exRouter(config)#ip nat pool zlr 192.168.7.4 192.168.7.10 netRouter(config)#ip nat pool zlr 192.168.7.4 192.168.7.10 netmask 192.168.7.0 Router(config)#access-list 1 permit 192.168.200.0 0.0.0.255Router(config)#ip nat inside source list 1 pool zlrRouter(config)#int f0/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se3/0Router(config-if)#ip nat outsideRouter(config-if)#exRouter(config)#ip nat inside source static tcp 192.168.150.1 80 192.168.7.2 80 Router(config)#int f1/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se 3/0Router(config-if)#ip nat outsideRouter(config-if)#exRouter(config)#ip nat pool xl 192.168.7.20 192.168.7.20 netmask 192.168.7.0 Router(config)#access-list 2 permit 192.168.150.0 0.0.0.255Router(config)#ip nat inside source list 2 pool xl overloadRouter(config)#int f1/0Router(config-if)#ip nat insideRouter(config-if)#exRouter(config)#int se3/0Router(config-if)#ip nat outsideRouter(config-if)#ACL配置:ROUTER4:Router(config)#access-list 10 deny 192.168.4.0 0.0.0.255Router(config)#access-list 10 permit anyRouter(config)#int f1/0Router(config-if)#ip access-group 10 outRouter(config-if)#exRouter(config)#ip access-list standRouter(config)#ip access-list standard xzRouter(config-std-nacl)#10 deny 192.168.6.0 0.0.0.255Router(config-std-nacl)#20 permit anyRouter(config-std-nacl)#exRouter(config)#int f0/0Router(config-if)#ip access-group xz outROUTER2:Router(config)#access-list 100 deny tcp host 192.168.4.1 host 192.168.7.3 eq www Router(config)#access-list 100 permit ip any anyRouter(config)#int f0/0Router(config-if)#ip access-group 100 inROUTER3:Router(config)#ip access-list extended lrRouter(config-ext-nacl)#10 deny tcp host 192.168.6.1 host 192.168.7.2 eq www Router(config-ext-nacl)#20 permit ip any anyRouter(config)#int f0/0Router(config-if)#ip accRouter(config-if)#ip access-group lr in。