cisco常用的配置含注释
- 格式:doc
- 大小:43.00 KB
- 文档页数:8
CISCO路由器常用配置命令大全CISCO路由器常用配置命令大全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 确定一个密码以防止对路由器非授权的访问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信道分配的业务简介号〔SPI D〕Isdn spid2 在路由器上规定已经由ISDN业务供给商为B2信道分配的业务简介号〔SPI D〕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 发送回声请求,诊断根本的网络连通性[NextPage]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 显示当前设备名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〕收费单元以及是否在呼叫期间和呼叫完毕时提供A OC信息Show isdn ststus 显示所有isdn接口的状态、或者一个特定的数字信号链路〔DSL〕的状态或者一个特定isdn接口的状态Show memory 显示路由器内存的大小,包括空闲内存的大小Show processes 显示路由器的进程Show protocols 显示设置的协议Show protocols 显示配置的协议。
思科路由器(CiscoRouter)常用配置命令大全思科路由器(Cisco Router)常用配置命令大全1. Access-enable允许路由器在动态访问列表中创建临时访问列表入口2. Access-group把访问控制列表(ACL)应用到接口上3. Access-list定义一个标准的IP ACL4. Access-template在连接的路由器上手动替换临时访问列表入口5. Appn向APPN子系统发送命令6. Atmsig 执行ATM信令命令7. B 手动引导操作系统8. Bandwidth 设置接口的带宽9. Banner motd 指定日期信息标语10. Bfe 设置突发事件手册模式11. Boot system 指定路由器启动时加载的系统映像12. Calendar 设置硬件日历13. Cd 更改路径14. Cdp enable 允许接口运行CDP协议15. Clear 复位功能16. Clear counters 清除接口计数器17. Clear interface 重新启动接口上的件逻辑18. Clockrate 设置串口硬件连接的时钟速率,如网络接口模块和接口处理器能接受的速率19. Cmt 开启/关闭FDDI连接管理功能20. Config-register 修改设置寄存器设置21. Configure 允许进入存在的设置模式,在中心站点上维护并保存设置信息22. Configure memory 从NVRAM加载设置信息23. Configure terminal 从终端进行手动设置24. Connect 打开一个终端连接25. Copy 复制设置或映像数据26. Copy flash tftp 备份系统映像文件到TFTP服务器27. Copy running-config startup-config 将RAM中的当前设置存储到NVRAM28. Copy running-config tftp 将RAM中的当前设置存储到网络TFTP服务器上29. Copy tftp flash 从TFTP服务器上下载新映像到Flash30. Copy tftp running-config 从TFTP服务器上下载设置文件31. Debug 使用调试功能32. Debug dialer 显示接口在拨什么号及诸如此类的信息33. Debug ip rip 显示RIP路由选择更新数据34. Debug ipx routing activity 显示关于路由选择协议(RIP)更新数据包的信息35. Debug ipx sap 显示关于SAP(业务通告协议)更新数据包信息36. Debug isdn q921 显示在路由器D通道ISDN接口上发生的数据链路层(第2层)的访问过程37. Debug ppp 显示在实施PPP中发生的业务和交换信息38. Delete 删除文件39. Deny 为一个已命名的IP ACL设置条件40. Dialer idle-timeout 规定线路断开前的空闲时间的长度41. Dialer map 设置一个串行接口来呼叫一个或多个地点42. Dialer wait-for-carrier-time 规定花多长时间等待一个载体43. Dialer-group 通过对属于一个特定拨号组的接口进行设置来访问控制44. Dialer-list protocol 定义一个数字数据接受器(DDR)拨号表以通过协议或ACL和协议的组合来控制控制拨号45. Dir 显示给定设备上的文件46. Disable 关闭特许模式47. Disconnect 断开已建立的连接48. Enable 打开特许模式49. Enable password 确定一个密码以防止对路由器非授权的访问50. Enable password 设置本地口令控制不同特权级别的访问51. Enable secret 为enable password命令定义额外一层安全性(强制安全,密码非明文显示)52. Encapsulation frame-relay 启动帧中继封装53. Encapsulation novell-ether 规定在网络段上使用的Novell 独一无二的格式54. Encapsulation PPP 把PPP设置为由串口或ISDN接口使用的封装方法55. Encapsulation sap 规定在网络段上使用的以太网802.2格式Cisco的密码是sap56. End 退出设置模式57. Erase 删除闪存或设置缓存58. Erase startup-config 删除NVRAM中的内容59. Exec-timeout 设置EXEC命令解释器在检测到用户输入前所等待的时间60. Exit 退出所有设置模式或关闭一个激活的终端会话和终止一个EXEC61. Exit 终止所有设置模式或关闭一个活动的对话和结束EXEC62. format 格式化设备63. Frame-relay local-dlci 为使用帧中继封装的串行线路启动本地管理接口(LMI)64. Help 获得交互式帮助系统65. History 查看历史记录66. Hostname 使用一个主机名来设置路由器,该主机名以提示符或缺省文件名的方式使用67. Interface 设置接口类型并且输入接口设置模式68. Interface 设置接口类型和进入接口设置模式69. Interface serial 选择接口并且输入接口设置模式70. Ip access-group 控制对一个接口的访问71. Ip address 设定接口的网络逻辑地址72. Ip address 设置一个接口地址和子网掩码并开始IP处理73. Ip default-network 建立一条缺省路由74. Ip domain-lookup 允许路由器缺省使用DNS75. Ip host 定义静态主机名到IP地址映射76. Ip name-server 指定至多6个进行名字-地址解析的服务器地址77. Ip route 建立一条静态路由78. Ip unnumbered 在为给一个接口分配一个明确的IP地址情况下,在串口上启动互连网协议(IP)的处理过程79. Ipx delay 设置点计数80. Ipx ipxwan 在串口上启动IPXWAN协议81. Ipx maximum-paths 当转发数据包时设置Cisco IOS软件使用的等价路径数量82. Ipx network 在一个特定接口上启动互连网数据包交换(IPX)的路由选择并且选择封装的类型(用帧封装)83. Ipx router 规定使用的路由选择协议84. Ipx routing 启动IPX路由选择85. Ipx sap-interval 在较慢的链路上设置较不频繁的SAP(业务广告协议)更新86. Ipx type-20-input-checks 限制对IPX20类数据包广播的传播的接受87. Isdn spid1 在路由器上规定已由ISDN业务供给商为B1信道分配的业务简介号(SPID)88. Isdn spid2 在路由器上规定已由ISDN业务供给商为B2信道分配的业务简介号(SPID)89. Isdntch-type 规定了在ISDN接口上的中心办公区的交换机的类型90. Keeplive 为使用帧中继封装的串行线路LMI(本地管理接口)机制91. Lat 打开LAT连接92. Line 确定一个特定的线路和开始线路设置93. Line concole 设置控制台端口线路94. Line vty 为远程控制台访问规定了一个虚拟终端95. Lock 锁住终端控制台96. Login 在终端会话登录过程中启动了密码检查97. Login 以某用户身份登录,登录时允许口令验证98. Logout 退出EXEC模式99. Mbranch 向下跟踪组播地址路由至终端100. Media-type 定义介质类型101. Metric holddown 把新的IGRP路由选择信息和正在使用的IGRP路由选择信息隔离一段时间102. Mrbranch 向上解析组播地址路由至枝端103. Mrinfo 从组播路由器上获取邻居和版本信息104. Mstat 对组播地址多次路由跟踪后显示统计数字105. Mtrace 由源向目标跟踪解析组播地址路径106. Name-connection 命名已存在的网络连接107. Ncia 开启/关闭NCIA服务器108. Network 把一个基于NIC的地址分配给一个和他直接相连的路由器把网络和一个IGRP的路由选择的过程联系起来在IPX路由器设置模式下,在网络上启动加强的IGRP109. Network 指定一个和路由器直接相连的网络地址段110. Network-number 对一个直接连接的网络进行规定111. No shutdown 打开一个关闭的接口112. Pad 开启一个X.29 PAD连接113. Permit 为一个已命名的IP ACL设置条件114. Ping 把ICMP响应请求的数据包发送网络上的另一个节点检查主机的可达性和网络的连通性对网络的基本连通性进行诊断115. Ping 发送回声请求,诊断基本的网络连通性116. Ppp 开始IETF点到点协议117. Ppp authentication 启动Challenge握手鉴权协议(CHAP)或密码验证协议(PAP)或将两者都启动,并且对在接口上选择的CHAP和PAP验证的顺序进行规定118. Ppp chap hostname 当用CHAP进行身份验证时,创建一批似乎是同一台主机的拨号路由器119. Ppp chap password 设置一个密码,该密码被发送到对路由器进行身份验证的主机命令对进入路由器的用户名/密码的数量进行了限制120. Ppp pap sent-username 对一个接口启动远程PAP支持,并且在PAP对同等层请求数据包验证过程中使用sent-username和password121. Protocol 对一个IP路由选择协议进行定义,该协议能是RIP,内部网关路由选择协议。
思科路由器配置命令详解及实例思科路由器配置命令详解及实例1.概述1.1 路由器的基本概念1.2 Cisco路由器的基本配置1.3 Cisco路由器的命令行界面(CLI)2.初始配置2.1 配置路由器主机名2.2 配置管理接口2.3 配置登录认证2.4 配置时钟参数2.5 配置域名解析2.6 保存配置3.界面及IP配置3.1 查看接口状态3.2 配置接口IP地质3.3 配置子接口3.4 配置IP地质池3.5 配置默认网关4.静态路由配置4.1 配置静态路由4.2 查看静态路由表4.3 清除静态路由5.动态路由配置5.1 配置动态路由协议(如OSPF、EIGRP、RIP)5.2 查看动态路由表5.3 清除动态路由6.NAT配置6.1 配置静态NAT6.2 配置动态NAT6.3 配置PAT7.ACL配置7.1 配置标准ACL7.2 配置扩展ACL7.3 配置ACL应用8.VPN配置8.1 配置IPSec VPN8.2 配置SSL VPN8.3 配置GRE隧道9.服务配置9.1 配置DHCP服务9.2 配置DNS服务9.3 配置NTP服务10.安全配置10.1 AAA认证配置10.2 配置SSH远程访问10.3 配置防火墙11.故障排除11.1 查看日志信息11.2 执行连通性测试11.3 清除路由表11.4 恢复出厂设置12.附件附件1:示例配置文件13.法律名词及注释- 路由器:一种网络设备,用于在多个网络之间转发数据包的设备。
- Cisco路由器:思科公司生产的路由器设备,广泛用于企业和服务提供商的网络中。
- CLI:命令行界面,一种提供给用户输入命令的界面。
- IP地质:Internet协议地质,用于唯一标识网络中的设备。
- 接口:路由器上的物理或逻辑接口,用于与其他设备进行通信。
- 静态路由:管理员手动配置的路由表项,用于指定数据包传输的下一跳。
- 动态路由:通过路由协议自动学习并更新的路由表项,用于实现自动化的路由选择。
cisco命令大全解释、注释Dynamips作为一款十分优秀的Cisco路由器模拟软件,实验模拟效果远比Boson NetSim更加真实可信。
Boson NetSim是对IOS命令行的模拟,而Dynamips是通过在计算机中构建运行IOS的虚拟机来真正运行IOS实现对Cisco路由器的模拟。
收录最常用的Cisco命令分类如下:cisco命令大全1. switch配置命令(1)模式转换命令用户模式----特权模式,使用命令"enable"特权模式----全局配置模式,使用命令"config t"全局配置模式----接口模式,使用命令"interface+接口类型+接口号"全局配置模式----线控模式,使用命令"line+接口类型+接口号"注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(2)配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置IP地址secondary+IP地址为接口配置第二个IP地址show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service password-encryptin 手工加密所有密码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入telnet接口password +密码配置telnet密码line aux 0 进入AUX接口password +密码配置密码line con 0 进入CON接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAMwrite 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息+ # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称创建VLANswitchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式ip add +ip地址为VLAN配置管理IP地址vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名vtp +password +密码配置SW的密码switchport mode trunk 启用中继no vlan +vlan号删除VLANshow spamming-tree vlan +vlan号查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型+接口号配置接口为被动模式debug ip +协议动态查看路由更新信息undebug all 关闭所有DEBUG信息router eigrp +as号激活EIGRP路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活OSPF协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range {port-range} 进入组配置状态配置三层端口configure terminal 进入配置状态interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-channel port-channel-number} 进入端口配置状态no switchport 把物理端口变成三层口ip address ip_address subnet_mask 配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip addressSwitch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。
思科交换机路由基本配置命令常用命令1.配置接口:interface {interface_type} {interface_number}2.配置IP地址:ip address {IP_address} {subnet_mask}3.配置默认网关:ip default-gateway {default_gateway_IP}4.开启接口:no shutdown5.配置路由协议:router {routing_protocol}6.配置路由器ID:router-id {router_ID}7.配置路由信息:network {network_address} {subnet_mask}8.配置静态路由:ip route {destination_network} {subnet_mask}{next-hop_IP}9.配置动态路由:router {routing_protocol} {network_address}10.保存配置:copy running-config startup-config注意:上述命令仅作为参考,具体配置应根据实际环境和设备型号进行调整。
下面是一些基本的 Cisco 交换机路由配置命令:1.配置 hostname: hostname <name>2.配置 IP 地址: interface <interface> 后进入接口模式,再输入 ipaddress <ip address> <subnet mask>3.配置默认路由: ip route 0.0.0.0 0.0.0.0 <next hop IP>4.启用路由协议: router <protocol> (例如: router rip)5.配置路由连接: network <network address> (例如: network192.168.1.0)6.查看路由表: show ip routeCisco 交换机路由配置步骤1.进入配置模式:configure terminal2.配置 IP 地址和子网掩码:interface [interface-name] ; ip address[ip-address] [subnet-mask]3.配置默认路由:ip route 0.0.0.0 0.0.0.0 [next-hop-IP-address]4.启用路由协议:router [protocol-name] (如:router ospf)5.配置路由协议参数: [protocol-name] [process-id] (如:ospf 1)6.配置路由连接:network [network-address] [wildcard-mask] area[area-id] (如:network 192.168.1.0 0.0.0.255 area 0)7.保存配置:copy running-config startup-config8.退出配置模式:exit。
Router 命令行1、 enable (进入到Router# 模式下)2、 conf t (进入到Router(config)#模式下)3、 show (显示现在配置)4、 Router(config)#hostRouter(config)#hostname cisco2500cisco2500(config)#(改变名字)5、cisco2500(config)#enacisco2500(config)#enable passcisco2500(config)#enable password passwordcisco2500(config)#enable seccisco2500(config)#enable secret cisco(设置路由器密码;enable password 设置明文密码,enable secret 设置加密密码)6、cisco2500(config)#line concisco2500(config)#line console 0 (设定console 0 口)cisco2500(config-line)#logcisco2500(config-line)#loging (设定需要登录)cisco2500(config-line)#loging% login disabled on line 0,until 'password' is setcisco2500(config-line)#passcisco2500(config-line)#password cisco (设定登录密码为cisco)cisco2500(config-line)#exit (退出)7、cisco2500(config)#line vty 0 4 (所有的路由器的vty模式,缺省有5个vty端口打开,自动分配;一般同时配置)cisco2500(config-line)#loging (配置需要登录)% Login disabled on line 2, until 'password' is set% Login disabled on line 3, until 'password' is set% Login disabled on line 4, until 'password' is set% Login disabled on line 5, until 'password' is set% Login disabled on line 6, until 'password' is setcisco2500(config-line)#passcisco2500(config-line)#password cisco (设定密码为cisco)cisco2500(config-line)#exit8、cisco2500(config)#bann (配置触动警告提示信息)cisco2500(config)#bannner mocisco2500(config)#bannner motd || warnning !! Don't touch it !!cisco2500(config)#exit9、cisco2500#show run (查看刚才配置信息)cisco2500#show start (NVRAM信息)10、cisco2500#copy runcisco2500#copy running-config stcisco2500#copy running-config startup-configDestination filename [startup-config]?Building configuration!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11、!version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption (去除该命令,对密码加密)!boot system flash (去除该命令)!cisco2500#conf tcisco2500(config)#no bootcisco2500(config)#no boot sycisco2500(config)#no boot sytem fcisco2500(config)#no boot sytem flcisco2500(config)#no boot sytem flashcisco2500(config)#servcisco2500(config)#service passcisco2500(config)#service password-encryption (加密密码命令)12、!interface BRI0no ip addressshutdownisdn x25 static-tei 0!cisco2500(config)#intcisco2500(config)#interface bricisco2500(config)#interface ?cisco2500(config)#interface bri ?<0-0> BRI interface numbercisco2500(config)#interface bri 0cisco2500(config-if)#no isdn xcisco2500(config-if)#no isdn x25 ?dchannel set this BRI to support x25 on the D channelstatic-tei specify a static TEI for x25 on the D channelcisco2500(config-if)#no isdn x25 stcisco2500(config-if)#no isdn x25 static-teiWarning:No ISDN switch-type defined. Cannot change a static TEI (无ISDN类型,不让删除,增加一个类型)cisco2500(config)#isdncisco2500(config)#isdn swcisco2500(config)#isdn switch- type bacisco2500(config)#isdn switch- type basic-cisco2500(config)#isdn switch- type basic-net3(全局模式下配置,则所有端口都会有影响)(接口模式下配置,则会使用自己的配置)13、cisco2500(config-line)#e xec-timeout 0 5 (配置超时设定)cisco2500(config-line)#e xec-timeout 0 014、cisco2500#conf tcisco2500(config)#line con 0cisco2500(config-line)#loggincisco2500(config-line)#loggin syncisco2500(config-line)#loggin synchronous (配置节省命令)cisco2500(config-line)#endcisco2500#15、cisco2500(config)#int serial 0 (两个serial口,选择一个)cisco2500(config-if)#clocisco2500(config-if)#clock rcisco2500(config-if)#clock rate 64000 (如果接了dce线就可以配置,如果接了dt 的线就不能配置)cisco2500(config-if)#bandcisco2500(config-if)#bandwidth 64 千字节每秒Kbitcisco2500(config-if)#no shut (启用端口)cisco2500(config-if)#no shutdowncisco2500(config-if)end (启用端口前先退出来,查看端口)cisco2500#show interfaces serial 0 (查看端口当前状态)cisco2500#conf tcisco2500(config)#int s0cisco2500(config-if)#ip add 192.168.12.1 255.255.255.0 (配置IP地址和子网掩码)cisco2500(config-if)#no shutcisco2500(config-if)#no shutdowncisco2500(config-if)#00:20:05:%LINK-3-UPDOWN: Interface Serial0, changed state to ......cisco2500(config-if)#endcisco2500#sh int s00:20:20: %SYS-5-CONFIG_I:Configured from console by consolecisco2500#sh int serial 0Serial0 is down, line protocol is down (不是管理性down掉)cisco2500#conf tcisco2500(config)#int e0cisco2500(config-if)#no shutdowncisco2500(config-if)#endcisco2500#00:21:09: %SYS-5-CONFIG_I: Configured form console by consolecisco2500#00:20:05:%LINK-3-UPDOWN: Interface Serial0, changed state to ......cisco2500#sh int e0Ethernet0 is up, line protocol is down (端口是UP,协议是down)cisco2500#conf tEnter configuration commands, one per line. End with CNTL/Zcisco2500(config)#int loop (配置虚拟端口)cisco2500(config)#int loopback 0cisco2500(config-if)#no shutcisco2500(config-if)#no shutdowncisco2500(config-if)#endcisco2500#sh int00:21:58: %SYS-5-CONFIG_I: Configured form console by consolecisco2500#sh int loopback00:21:59: %LINKPROTO-5-UPDOWN: Line protocol on Interface Loopback... te to upcisco2500#sh int loopback 016、Router#show interfaces serial 1Serial1 is up, line protocol is up(Carrier Detect)(Keepalives)(对电信号的判断)(链路两端的端口彼此之间互相协商、互相认证)Hardware is HD64570Description: 64Kb Line to San Josea、协议认证成功的前题是通道物理上是通的;Operational............Serial1 is up, line protocol is upConnection problem.....Serial1 is up, line protocol is downInterface problem......Serial1 is down, line protocol is down Disabled...............Serial1 is administratively down, line protocol is downa、整个工作是OK的,反应是第二层DataLink?的状态b、物理层OK,数据链路层有问题,协议配置错了;协议配置两边没有问题,但彼此间不能协调同步;同步时钟没有配置;c、排错目标放在物理层上,不能检测到链路上的载波,对方提供载波,回路通过对方行程的,广域网内;以太网回路是在本地内行程的;d、对方路由器的端口根本没有打开,如果检测不到电路反馈表示断开;CCNA05Router#show interface serial 0Router#show controller serial 0HD unit 0, idb = 0x121C04, driver structure at 0x12707Bbuffer size 1524 HD unit 0, V.35 DTE Cable...(主要看第二行或者第三行的中后部,是V.35还是V.24连接类型,是DTE还是DCE,DCE 需要配置?)网络环境的管理:1、设备本地的资源管理;2、互连3、启动过程Cisco网络邻居CDP协议Cisco Discovery Protocol 思科发现协议(工作在第二层的 Data Link,数据链路层的子层协议,网络支持SNAP,)特点:能发现邻居设备上层协议的特点(参数),邻居设备端口连接方式;对直连邻居有效;Summary infomation includes:--- Device identifilers 邻居的主机名--- Address list 邻居的上层地址--- Port identifier 双方端口的标记通过哪个端口连接到邻居的哪个端口--- Capabilities list 性能列表在网络中起什么作用--- Platform 硬件平台Router#show CDP ?路由器一起动其CDP就会自动缺省启动,如果要关闭所有CDP则使用:(在全局模式下)Router(config)#no CDP runRouter(config)#interface serial0Router(config-if)#no cdp enable (关掉某接口的CDP)网络拓扑结构:SwitchA <--> RouterA <--> RouterBRouter#show cdp neighborsCapability Codes:R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - RepeaterDevice ID Local Intrfce Holdtme Capability platform Port ID RouterB Ser 0 148 R 2522 Ser 1SwitchA0050BD855780 Eth 0 167 T S 1900 2Device ID : 设备名称,主机名Local Intrfce: A哪个端口连接Holdtme: 连接时间是多久Capability: 起到什么角色作用platform: 什么硬件平台Port ID: B用什么端口连接A查看详细信息:Router#show cdp entry *Router#show cdp neighbors detailRouter#show cdp traffic 作用:查CDP的进出流量Router#show cdp interface 作用:哪些端口启用了CDP协议作用:通过CDP能创建网络地图Using Telnet to Connect to Remote Devices1、如果远程主机没有配置vty密码或者enable密码,则不允许用Telnet登录2、超级终端能动态显示信息;需要使用telnet mon才能用vty端口得到提示信息 Router#show sessions看到本地有多少telnet信息出去,有几条会话,主动看到向外发出去的信息Router#show users有哪些人登录到本地路由器的列表Router#disconnect Closes the curret session opened by you 关闭本地发出的会话Router#clear line 11 Closes a session opended by a remote devices 关闭远程连接的会话Router#resume 1 继续某一个会话,主要用于路由器打开多条会话,进行切换 Ctrl+Shift+6 紧接敲“S”建Using the ping and trace Commands是否连通、时间Router#ping 10.1.10.1发五个数据包Router#trace 10.1.10.1从源到目的,所经过网关的数量,每次发三个数据包traceroute 1 2 3TTL 存在的时间第一批 TTL=1 会自动减1第二批 TTL=2第三批 TTL=3缺省30次CCNA06 2006-10-11路由器启动IOS(操作系统)三大步骤,一、POST加电自检二、加载操作系统三、应用用户配置实际分为7小步完成:Router Power-On/Bootup Sequence1、Perform power-on self test (POST). 加电自检2、Load and run bootstrap code. 读取引导3、Find the Cisco IOS software. 寻找IOS软件4、Load the Cisco IOS software. 加载IOS软件,到内存5、Find the configuration. 寻找配置文件6、Load the configuration. 加载配置文件7、Run the configured Cisco IOS software. 运行IOS软件Router Internal Components(路由器的主要硬件组成)RAM NVRAM (Configuration Register) (不会掉电,加入微型电池供电) (只读存储器) ROM interfaces(可移动存储器)Flash CPUROM FunctionsROM 存放什么东西?ROM| |Bootstrap | POST |show version----------------------------|------------->Mini IOS | ROM |software | Monitor |file | |Bootstrap:固化的自动启动选项。
以下为路由器A的配置,路由器B只需对相应配置做更改即可1:配置IKErouter(config)#crypto isakmp enable #启用IKE(默认是启动的)router(config)#crypto isakmp policy 100 #建立IKE策略,优先级为100router(config-isakmp)#authentication pre—share #使用预共享的密码进行身份验证router(config-isakmp)#encryption des #使用des加密方式router(config-isakmp)#group 1 #指定密钥位数,group 2安全性更高,但更耗cpurouter(config-isakmp)#hash md5 #指定hash算法为MD5(其他方式:sha,rsa)router(config—isakmp)# lifetime 86400 #指定SA有效期时间。
默认86400秒,两端要一致以上配置可通过show crypto isakmp policy显示。
VPN两端路由器的上述配置要完全一样。
2:配置Keysrouter(config)# crypto isakmp key cisco1122 address 10.0.0。
2--(设置要使用的预共享密钥和指定vpn另一端路由器的IP地址)3:配置IPSECrouter(config)#crypto ipsec transform—set abc esp—des esp-md5-hmac配置IPSec交换集abc这个名字可以随便取,两端的名字也可不一样,但其他参数要一致。
router(config)#crypto ipsec security—association lifetime 86400ipsec安全关联存活期,也可不配置,在下面的map里指定即可router(config)#access—list 110 permit tcp 172.16.1。
Cisco设备配置基本命令详解交换机支持的命令:switch: ;交换机的ROM状态1.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 ;设置登录口令xxswitch#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域名2.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 1switch(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 ;查看指定端口信息2. 路由器支持的命令:路由器显示命令: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 ;设置登录口令xxrouter(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 ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#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 ;设置路由器IPrommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IPrommon>TFTP_FILE=c2600.bin ;指定下载的文件3.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.1 登录路由器为了配置和管理思科路由器,您需要登录到路由器的控制台或通过远程登录方式。
使用以下命令登录路由器,并进行必要的身份验证:```Router> enableRouterconfigure terminalEnter configuration commands, one per line: End with TL/Z:Router(config)hostname [路由器名称]Router(config)enable secret [密码]Router(config)line console 0Router(config-line)password [密码]Router(config-line)logging synchronousRouter(config-line)exitRouter(config)line vty 0 4Router(config-line)password [密码]Router(config-line)logging synchronous```1.2 配置接口接下来,您需要配置路由器的接口,以便与其他网络设备进行通信。
使用以下命令配置接口:```Router(config)interface [接口类型] [接口编号]Router(config-if)ip address [IP地址] [子网掩码]Router(config-if)no shutdownRouter(config-if)exit```二、路由配置2.1 静态路由静态路由是手动配置的路由项,将特定的网络目的地与下一跳路由器关联起来。
以下是配置静态路由的示例命令:```Router(config)ip route [目的网络] [子网掩码] [下一跳地址]```2.2 动态路由动态路由是通过路由协议动态学习并自动更新的路由项。
1.switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]在基于CLI的交换机上启用和浏览CDP信息:switch(enable) set cdp {enable disable} module/port为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan duplex capabilities detail] 5.基于IOS的交换机的端口描述:switch(config-if)# description description-string基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10100auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10100auto}switch(enable) set port speed moudle/number {416auto}7.在基于IOS的交换机上设置以太网的链路模式:switch(config-if)# duplex {auto full half}在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number {full half}8.在基于IOS的交换机上配置静态VLAN:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/portswitch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on off desirable auto nonegotiate]Vlan-range [isl dotlq dotl0lane negotiate]10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]11.在基于IOS的交换机上配置VTP 模式:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever cilent transparent}switch(vlan)# vtp password password在基于CLI的交换机上配置VTP 模式:switch(enable) set vtp [domain domain-name] [mode{ sever cilent transparent }][password password]2.12. 在基于IOS的交换机上配置VTP版本:switch# vlan databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source destination}]在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on off desirable auto} 15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans]17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)# spanning-tree [vlan vlan-list] forward-time secondsswitch(config)# spanning-tree [vlan vlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan] 18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征: switch(config-if)#spanning-tree portfastswitch(enable) set spantree portfast {module/port}{enable disable}19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast {enable disable}[rate update-rate] [all-p rotocols off on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[s tp {ieee ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf{ring hex-ring-num decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-ad dressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-ad dressATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numbervirus2009-08-15 13:42ATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.37. 用物理接口建立与VLAN的连接:router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# …40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由:switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-interface47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination destination-source full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry友情提示:方案范本是经验性极强的领域,本范文无法思考和涵盖全面,供参考!最好找专业人士起草或审核后使用。
cisco常用的配置含注释Router 命令行1、 enable (进入到Router# 模式下)2、 conf t (进入到Router(config)#模式下)3、 show (显示现在配置)4、 Router(config)#hostRouter(config)#hostname cisco2500cisco2500(config)#(改变名字)5、cisco2500(config)#enacisco2500(config)#enable passcisco2500(config)#enable password passwordcisco2500(config)#enable seccisco2500(config)#enable secret cisco(设置路由器密码;enable password 设置明文密码,enable secret 设置加密密码)6、cisco2500(config)#line concisco2500(config)#line console 0 (设定console 0 口)cisco2500(config-line)#logcisco2500(config-line)#loging (设定需要登录)cisco2500(config-line)#loging% login disabled on line 0,until 'password' is setcisco2500(config-line)#passcisco2500(config-line)#password cisco (设定登录密码为cisco)cisco2500(config-line)#exit (退出)7、cisco2500(config)#line vty 0 4 (所有的路由器的vty模式,缺省有5个vty端口打开,自动分配;一般同时配置)cisco2500(config-line)#loging (配置需要登录)% Login disabled on line 2, until 'password' is set% Login disabled on line 3, until 'password' is set% Login disabled on line 4, until 'password' is set% Login disabled on line 5, until 'password' is set% Login disabled on line 6, until 'password' is setcisco2500(config-line)#passcisco2500(config-line)#password cisco (设定密码为cisco)cisco2500(config-line)#exit8、cisco2500(config)#bann (配置触动警告提示信息)cisco2500(config)#bannner mocisco2500(config)#bannner motd || warnning !! Don't touch it !!cisco2500(config)#exit9、cisco2500#show run (查看刚才配置信息)cisco2500#show start (NVRAM信息)10、cisco2500#copy runcisco2500#copy running-config stcisco2500#copy running-config startup-configDestination filename [startup-config]?Building configuration!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11、!version 12.1service timestamps debug uptimeservice timestamps log uptimeno service password-encryption (去除该命令,对密码加密)!boot system flash (去除该命令)!cisco2500#conf tcisco2500(config)#no bootcisco2500(config)#no boot sycisco2500(config)#no boot sytem fcisco2500(config)#no boot sytem flcisco2500(config)#no boot sytem flashcisco2500(config)#servcisco2500(config)#service passcisco2500(config)#service password-encryption (加密密码命令)12、!interface BRI0no ip addressshutdownisdn x25 static-tei 0!cisco2500(config)#intcisco2500(config)#interface bricisco2500(config)#interface ?cisco2500(config)#interface bri ?<0-0> BRI interface numbercisco2500(config)#interface bri 0cisco2500(config-if)#no isdn xcisco2500(config-if)#no isdn x25 ?dchannel set this BRI to support x25 on the D channelstatic-tei specify a static TEI for x25 on the D channelcisco2500(config-if)#no isdn x25 stcisco2500(config-if)#no isdn x25 static-teiWarning:No ISDN switch-type defined. Cannot change a static TEI (无ISDN类型,不让删除,增加一个类型)cisco2500(config)#isdncisco2500(config)#isdn swcisco2500(config)#isdn switch- type bacisco2500(config)#isdn switch- type basic-cisco2500(config)#isdn switch- type basic-net3(全局模式下配置,则所有端口都会有影响)(接口模式下配置,则会使用自己的配置)13、cisco2500(config-line)#e xec-timeout 0 5 (配置超时设定)cisco2500(config-line)#e xec-timeout 0 014、cisco2500#conf tcisco2500(config)#line con 0cisco2500(config-line)#loggincisco2500(config-line)#loggin syncisco2500(config-line)#loggin synchronous (配置节省命令)cisco2500(config-line)#endcisco2500#15、cisco2500(config)#int serial 0 (两个serial口,选择一个)cisco2500(config-if)#clocisco2500(config-if)#clock rcisco2500(config-if)#clock rate 64000 (如果接了dce线就可以配置,如果接了dt 的线就不能配置)cisco2500(config-if)#bandcisco2500(config-if)#bandwidth 64 千字节每秒Kbitcisco2500(config-if)#no shut (启用端口)cisco2500(config-if)#no shutdowncisco2500(config-if)end (启用端口前先退出来,查看端口)cisco2500#show interfaces serial 0 (查看端口当前状态)cisco2500#conf tcisco2500(config)#int s0cisco2500(config-if)#ip add 192.168.12.1 255.255.255.0 (配置IP地址和子网掩码)cisco2500(config-if)#no shutcisco2500(config-if)#no shutdowncisco2500(config-if)#00:20:05:%LINK-3-UPDOWN: Interface Serial0, changed state to ......cisco2500(config-if)#endcisco2500#sh int s00:20:20: %SYS-5-CONFIG_I:Configured from console by consolecisco2500#sh int serial 0Serial0 is down, line protocol is down (不是管理性down掉)cisco2500#conf tcisco2500(config)#int e0cisco2500(config-if)#no shutdowncisco2500(config-if)#endcisco2500#00:21:09: %SYS-5-CONFIG_I: Configured form console by consolecisco2500#00:20:05:%LINK-3-UPDOWN: Interface Serial0, changed state to ......cisco2500#sh int e0Ethernet0 is up, line protocol is down (端口是UP,协议是down)cisco2500#conf tEnter configuration commands, one per line. End with CNTL/Zcisco2500(config)#int loop (配置虚拟端口)cisco2500(config)#int loopback 0cisco2500(config-if)#no shutcisco2500(config-if)#no shutdowncisco2500(config-if)#endcisco2500#sh int00:21:58: %SYS-5-CONFIG_I: Configured form console by consolecisco2500#sh int loopback00:21:59: %LINKPROTO-5-UPDOWN: Line protocol on Interface Loopback... t e to upcisco2500#sh int loopback 016、Router#show interfaces serial 1Serial1 is up, line protocol is up(Carrier Detect)(Keepalives)(对电信号的判断)(链路两端的端口彼此之间互相协商、互相认证)Hardware is HD64570Description: 64Kb Line to San Josea、协议认证成功的前题是通道物理上是通的;Operational............Serial1 is up, line protocol is upConnection problem.....Serial1 is up, line protocol is downInterface problem......Serial1 is down, line protocol is down Disabled...............Serial1 is administratively down, line protocol is downa、整个工作是OK的,反应是第二层DataLink?的状态b、物理层OK,数据链路层有问题,协议配置错了;协议配置两边没有问题,但彼此间不能协调同步;同步时钟没有配置;c、排错目标放在物理层上,不能检测到链路上的载波,对方提供载波,回路通过对方行程的,广域网内;以太网回路是在本地内行程的;d、对方路由器的端口根本没有打开,如果检测不到电路反馈表示断开;CCNA05Router#show interface serial 0Router#show controller serial 0HD unit 0, idb = 0x121C04, driver structure at 0x12707Bbuffer size 1524 HD unit 0, V.35 DTE Cable...(主要看第二行或者第三行的中后部,是V.35还是V.24连接类型,是DTE还是DCE,DC E需要配置?)网络环境的管理:1、设备本地的资源管理;2、互连3、启动过程Cisco网络邻居CDP协议Cisco Discovery Protocol 思科发现协议(工作在第二层的 Data Link,数据链路层的子层协议,网络支持SNAP,)特点:能发现邻居设备上层协议的特点(参数),邻居设备端口连接方式;对直连邻居有效;Summary infomation includes:--- Device identifilers 邻居的主机名--- Address list 邻居的上层地址--- Port identifier 双方端口的标记通过哪个端口连接到邻居的哪个端口--- Capabilities list 性能列表在网络中起什么作用--- Platform 硬件平台Router#show CDP ?路由器一起动其CDP就会自动缺省启动,如果要关闭所有CDP则使用:(在全局模式下)Router(config)#no CDP runRouter(config)#interface serial0Router(config-if)#no cdp enable (关掉某接口的CDP)网络拓扑结构:SwitchA <--> RouterA <--> RouterBRouter#show cdp neighborsCapability Codes:R - Router, T - Trans Bridge, B - Source Route BridgeS - Switch, H - Host, I - IGMP, r - RepeaterDevice ID Local Intrfce Holdtme Capability platform Port ID RouterB Ser 0 148 R 2522 Ser 1SwitchA0050BD855780 Eth 0 167 T S 1900 2Device ID : 设备名称,主机名Local Intrfce: A哪个端口连接Holdtme: 连接时间是多久Capability: 起到什么角色作用platform: 什么硬件平台Port ID: B用什么端口连接A查看详细信息:Router#show cdp entry *Router#show cdp neighbors detailRouter#show cdp traffic 作用:查CDP的进出流量Router#show cdp interface 作用:哪些端口启用了CDP协议作用:通过CDP能创建网络地图Using Telnet to Connect to Remote Devices1、如果远程主机没有配置vty密码或者enable密码,则不允许用Telnet登录2、超级终端能动态显示信息;需要使用telnet mon才能用vty端口得到提示信息 Router#show sessions看到本地有多少telnet信息出去,有几条会话,主动看到向外发出去的信息Router#show users有哪些人登录到本地路由器的列表Router#disconnect Closes the curret session opened by you 关闭本地发出的会话Router#clear line 11 Closes a session opended by a remote devices 关闭远程连接的会话Router#resume 1 继续某一个会话,主要用于路由器打开多条会话,进行切换 Ctrl+Shift+6 紧接敲“S”建Using the ping and trace Commands是否连通、时间Router#ping 10.1.10.1发五个数据包Router#trace 10.1.10.1从源到目的,所经过网关的数量,每次发三个数据包traceroute 1 2 3TTL 存在的时间第一批 TTL=1 会自动减1第二批 TTL=2第三批 TTL=3缺省30次CCNA06 2006-10-11路由器启动IOS(操作系统)三大步骤,一、POST加电自检二、加载操作系统三、应用用户配置实际分为7小步完成:Router Power-On/Bootup Sequence1、Perform power-on self test (POST). 加电自检2、Load and run bootstrap code. 读取引导3、Find the Cisco IOS software. 寻找IOS软件4、Load the Cisco IOS software. 加载IOS软件,到内存5、Find the configuration. 寻找配置文件6、Load the configuration. 加载配置文件7、Run the configured Cisco IOS software. 运行IOS软件Router Internal Components(路由器的主要硬件组成)RAM NVRAM (Configuration Register) (不会掉电,加入微型电池供电) (只读存储器) ROM interfaces(可移动存储器)Flash CPUROM FunctionsROM 存放什么东西?ROM| |Bootstrap | POST |show version----------------------------|------------->Mini IOS | ROM |software | Monitor |file | |Bootstrap:固化的自动启动选项。