思科命令汇总
思科指令汇总

1 / 502/ 50FRSW(config-if)#frame-relay intf-type dce FRSW(config-if)#clock rate # FRSW(config-if)#frame-relay route INPUT_DLCI#interfaceOUTPUT_INTERFACEOUTPUT_DLCI# R#show frame-relay route知识点LMI :本地管理接口:1、ANSI :附件D ;2、ITU-T :Q933A ,附件A ;3、CISCO ;知识点DLCI :数据链路链接标识,10字节,0~1023,其中DLCI16~1007→客户端,DLCI0→LMI Q933A 、LMI ANSI ,DLCI1023→CISCO LMI ;FRSW(config-if)#ip split-horizon //开启水平分割,一般交换机是默认自动开启的,但是帧中继交换机是默认关闭的,这样进入这个接口的路由信息,不会再次流出这个接口知识点:FRSW(config-if)#frame-relay lmi-type [cisco | ansi | q933a ] //思科设备默认为cisco ,当帧中继交换机接口选择一种lmi 类型后,则客户端接口会自动配置跟随这种lmi 类型知识点:一、在动态映射的帧中继上,实施 OSPF R(config-if)#encapsulation frame-relay R(config-if)#frame-relay inverse-arp R(config-if)#ip address x.x.x.x m.m.m.m R(config-if)#ip ospf network [broadcast | point-to-point | point-to-multipoint]二、在静态映射(非广播)的帧中继上,实施 OSPF R(config-if)#encapsulation frame-relay R(config-if)#no frame-relay inverse-arp R(config-if)#ip address x.x.x.x m.m.m.mR(config-if)#frame-relay map ip y.y.y.y DLCI # //y.y.y.y 为对端ip 地址R(config-if)#ip ospf network point-to-multipoint non-broadcastR(config)#router ospf ProID# R(config-router)#neighbor y.y.y.y三、点对点子接口的帧中继上,实施 OSPF R(config-if)#encapsulation frame-relay R(config-if)#no frame-relay inverse-arp R(config-if)#interface serial X/X.X point-to-point R(config-if)#ip address x.x.x.x m.m.m.m R(config-if)#frame-relay interface-dlci DLCI#配置帧中继客户端静态映射R(config-if)#no frame-relay inverse-arp //关闭端口的反向ARP 功能R(config-if)#frame-relay map ip 对端1x.x.x.x 本地dlci#1 [broadcast]R(config-if)#frame-relay map ip 对端2x.x.x.x 本地dlci#2 [broadcast] //如果此设备对着多台设备 …. …. …. …. …. ….R(config-if)#frame-relay map ip 对端nx.x.x.x 本地dlci#n [broadcast]配置帧中继客户端的point-to-point 子接口静态映射 R(config)#interface serial #/#R(config-if)#encapsulation frame-relay R(config-if)#no frame-relay inverse-arp R(config-if)#no shutdownR(config-if)#interface serial #/#.# point-to-pointR(config-subif)#ip address x.x.x.x n.n.n.n R(config-subif)#frame-relay interface-dlci 本地dlci# //对于点对点类型接口,不需要说明对端的地址,因为对端只有一台设备,因此不用静态映射,只要给出此接口DLCI 号配置帧中继客户端的multipoint 子接口静态映射 R(config)#interface serial #/#R(config-if)#encapsulation frame-relay R(config-if)#no frame-relay inverse-arp R(config-if)#no shutdownR(config-if)#interface serial #/#.# multipointR(config-subif)#ip address x.x.x.x n.n.n.n R(config-subif)#frame-relay map ip 对端1x.x.x.x 本地dlci#1 [broadcast] R(config-subif)#frame-relay map ip 对端2x.x.x.x 本地dlci#2 [broadcast] …. …. …. …. …. ….R(config-subif)#frame-relay map ip 对端nx.x.x.x本地dlci#n [broadcast]R#show frame-relay pvc知识点HDLC:高级数据链路控制,是设备串行接口的默认数据封装模式,2层协议,具有Address与Protocol,没有2层地址,具有压缩功能,链路之间使用keepalive为此链接,keepavlie默认为10秒,死亡时间为30秒;1、ISO HDLC,基于IBM;2、CISCO HDLC;R(config-if)#encapsulation hdlc //开启HDLCR(config-if)#keepavlie# //设置keepavlie时间,两个接口之间的keepavlie要一样R(config-if)#compress stac //开启压缩,对端也必须开启知识点PPP:Point to Point Protocol,支持压缩、认证(PAP与CHAP),一般用于远程接入,要向ISP申请租用或Dialer,比如电信拨号上网使用PPPoE(这里o为over,E为Ethernet);1、LCP:Link Control Protocol,用于建立PPP;2、NCP:Network Control Protocol,PPP建立好后,NCP告知对端自己的端口地址;R(config-if)#encapsulation ppp //开启PPP封装R(config-if)#no peer neighbor-route //在PPP 封装中,会将对端接口的地址作为一个32位主机地址存放在自己的路由表中,比如本设备接口地址10.10.10.1/24,对端接口地址10.10.10.2/24,启用ppp封装后,设备路由表会显示10.10.10.0/24网段路由,同时也显示对端接口的地址作为一个32位主机地址10.10.10.2/32配置PPP服务器端的PAP认证开启R(config)#username user001 password yangbang R(config-if)#ppp authentication pap //pap为明文的配置PPP客户端的的PAP验证R(config-if)#ppp pap sent-username user001 password yangbang一、chap单向认证:服务器端R1配置:R1(config)#username aaa password yangbangR1(config)#interface s#/#R1(config-if)#encapsulation pppR1(config-if)#ppp authentication chap客户端R2配置:R2(config)#interface s#/#R2(config-if)#encapsulation pppR2(config-if)#ppp chap hostname aaaR2(config-if)#ppp chap password yangbang二、chap双向认证1:服务器端R1配置:R1(config)#username aaa password yangbang1R1(config)#interface s#/#R1(config-if)#encapsulation pppR1(config-if)#ppp authentication chapR1(config-if)#ppp chap hostname bbbR1(config-if)#ppp chap password yangbang2客户端R2配置:R2(config)#username bbb password yangbang2R2(config)#interface s#/#R2(config-if)#encapsulation pppR2(config-if)#ppp authentication chapR2(config-if)#ppp chap hostname aaaR2(config-if)#ppp chap password yangbang1三、chap双向认证2:(在CHAP认证中,也可以在双方设置认证的用户名为对方设备的hostname,并设置相同的密码。
思科路由器命令大全(完整版)

思科路由器命令大全(完整版)思科路由器命令大全(完整版)本文档旨在提供思科路由器命令的详细说明和使用指南,包括路由器配置、网络管理、安全性设置等内容。
每个章节都详细介绍了不同的命令和参数,以帮助用户更好地理解和使用思科路由器。
1:路由器基本配置1.1 主机名设置1.2 用户名和密码设置1.3 IP 地址和子网掩码配置1.4 默认网关配置2:接口配置2.1 以太网接口配置2.2 串行接口配置2.3 子接口配置2.4 虚拟局域网 (VLAN) 配置3:路由协议配置3.1 静态路由配置3.2 动态路由配置3.2.1 RIP 配置3.2.2 OSPF 配置3.2.3 BGP 配置4:网络管理4.1 SNMP 配置4.2 NetFlow 配置4.3 Syslog 配置4.4 路由器时间设置5:安全性配置5.1 访问控制列表 (ACL) 配置5.2 VPN 配置5.3 防火墙配置5.4 AAA 配置附件:本文档附带的附件包括示例配置文件、命令输出示例等,以帮助读者更好地理解和应用文档中的内容。
法律名词及注释:本文档所涉及的法律名词及其注释如下:1:主机名:指路由器的主机标识名称,用于在网络中识别路由器。
2:用户名和密码:用于登录和管理路由器的凭证信息。
3: IP 地址:网络协议中用于唯一标识设备的数字地址。
4:子网掩码:用于标识 IP 地址中网络部分和主机部分的分界线。
5:默认网关:用于转发网络流量的下一跳路由器。
6:以太网接口:用于连接局域网设备的物理接口。
7:串行接口:用于连接广域网设备的物理接口。
8:子接口:在一个物理接口上创建多个逻辑接口,用于实现VLAN 分隔等功能。
9:虚拟局域网 (VLAN):用于将局域网划分成多个逻辑网络的技术。
10:静态路由:手动配置的路由表项,用于指定数据包传输的路径。
11:动态路由:根据路由协议动态学习和更新的路由表项,用于自动路由选择。
12: RIP:路由信息协议,一种距离向量路由协议。
思科命令大全

思科命令大全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中的当前配置存储到NVRAM Copy 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 退出所有配置模式或者关闭一个激活的终端会话和终止一个EXEC Exit 终止任何配置模式或关闭一个活动的对话和结束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 显示当前设备名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 显示配置的协议。
思科命令大全

1.设置主机名/系统名IOS:switch(config)# hostname "hostname"CLI:switch(enable) set system name name-string2.设置登录口令IOS:switch(config)# enable password level 1 passwordCLI: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-addressCLI:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息IOS:switch(config-if)# cdp enableswitch(config-if)# no cdp enableCLI:switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告IOS:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]CLI:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]6.端口描述IOS:switch(config-if)#description escription-string CLI:switch(enable)set port name module/number description-string 7.设置端口速度IOS:switch(config-if)# speed{10|100|auto}CLI:switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto}8.设置以太网的链路模式IOS:switch(config-if)# duplex {auto|full|half}CLI:switch(enable) set port duplex module/number {full|half}9.配置静态VLANIOS: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)# endCLI:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线IOS: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-listCLI:switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameCLI:switch(enable) set vtp [domain domain-name]12.配置VTP 模式IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password passwordCLI:switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password]13.配置VTP版本IOS:switch# vlan databaseswitch(vlan)# vtp v2-modeCLI:switch(enable) set vtp v2 enable14.启动VTP剪裁IOS:switch# vlan databaseswitch(vlan)# vtp pruningCLI:switch(enable) set vtp pruning enable15.配置以太信道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} 16.调整根路径成本IOS:switch(config-if)#spanning-tree [vlan vlan-list] cost costCLI:switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list]17.调整端口IDIOS:switch(config-if)#spanning-tree[vlan vlan-list]port-priority port-priorityCLI:switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟IOS: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 secondsCLI:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征IOS:switch(config-if)#spanning-tree portfastCLI:switch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征IOS:switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second]CLI:switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个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[stp {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-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name ...30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)# interface atm numberATM(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 entry56. 用命令show in arp显示ARP高速缓存区的内容。
思科命令大全

CCNA交换机命令switch>enable 进入特权模式switch#config terminal 进入全局配置模式switch(config)#hostname 设置交换机的主机名switch(config)#enable secret xxx 设置特权加密口令switch(config)#enable password xxa 设置特权非密口令使用Telnet远程式管理switch(config)#interface vlan 1 进入vlan 1switch(config-if)#ip address 设置IP地址switch(config-if)#ip default-gateway 设置默认网关switch(config)#line vty 0 4 进入虚拟终端switch(config-line)#login 允许登录switch(config-line)#password xx 设置登录口令switch#exit 返回命令控制台口令switch(config)#line console 0 进入控制台口switch(config-line)#login 允许登录switch(config-line)#password xx 设置登录口令switch#exit 返回命令基本接口配置switch(config)#interface f0/1 进入f0/1接口switch(config-if)#duplex full 配置全双工模式switch(config-if)#speed 100 配置速率switch(config-if)#description to ***** 接口描述switch(config)#ip domain-name ***.com 设置或名服务器switch(config)#mac-address-table aging-time 设置mac表超时时间switch#write 保存配置信息switch#copy running-config startup-config 保存当前配置nvram switch#erase startup-config 清除配置文件交换机VLAN设置:switch#vlan database 进入VLAN设置switch(vlan)#vlan 2 建VLAN 2switch(vlan)#name 名字建VLAN 2的名称switch(vlan)#no vlan 2 删vlan 2注:删除vlan时原属于此vlan的端口处于非激活状态,直到重新分配为止switch(config)#int f0/1 进入端口1switch(config-if)#switchport mode access 当前端口工作莫试switch(config-if)#switchport access vlan 2 当前端口加入vlan 2switch(config-if)#switchport mode trunk 设置为干线switch(config-if)#switchport trunk encapsulation dot1q 设置vlan 中继协议switch(config-if)#no switchport mode 或 ( switchport mode access) 禁用干线switch(config-if)#switchport trunk allowed vlan add 1,2 ; 从Trunk中添加vlans switch(config-if)#switchport trunk allowed vlan remove 1,2 ;从Trunk中删除vlansswitch(config-if)#switchport trunk pruning vlan remove 1,2 ;从Trunk中关闭局部修剪以太网通道配置switch(config)#interface range fasternet0/1 - 2 将fasternet0/1和0/2 口捆绑(成双不成单)switch(config-if)#channel-group 1 mode on 配置以太通道模式switch(config-if)#port-channel load-balance {dst-mac | src-mac}在链路间实现负载均衡switch#show etherchannel 1 summary 查看通道信息switch#show etherchannel load-balance 查看通道信息vtp配置switch(config)#vtp domain 设置vtp域名switch(config)#vtp password 设置vtp密码switch(config)#vtp mode server 设置vtp服务器模式switch(config)#vtp mode client 设置vtp客户机模式switch(config)#vtp mode transparent 设置vtp 透明模式switch(config)#vtp version 设置vtp版本switch(config)#vtp pruning 启用vtp修解switch(config)#no vtp pruning 关闭vtp修解注:要想从vtp中减少一台交换机只需将该交换机vtp 名更改生成树stp:switch(config)#spanning-tree vlan 启用stp生成树(基于vlan)switch(config)#spanning-tree vlan root primary 指定根交换机(基于vlan) switch(config)#spanning-tree vlan root secondary 指定备用根交换机(基于vlan) switch(config)#spanning-tree vlan priority 指定交换机优先级(基于vlan)switch(config)#no spanning-tree vlan priority 将交换机的优先级恢复默认值(基于vlan)switch(config-if)#spanning-tree vlan cost 指定端口成本(起用trunk的端口模式下)switch(config-if)#spanning-tree vlan port-prioty 指定交换机端口优先级(基于vlan)switch(config-if)#spanning-tree portfast 配置速端口(连接终端设备的端口状态)如pc机switch(config)#spanning-tree uplinkfast 配置上行速端口注:在配置上行速端口前要先将基于vlan上的网桥优先级,网桥成本恢复默认值。
思科命令整理

路由器1.hostname 修改主机名2.no ip domain-lookup 关闭域名解析3.line console 0 进入console端口配置(password密码可配置console密码)4.exec-timeout 分钟秒数设置超时退出时间5.int 端口进入端口6.no shutdown 开启端口(思科路由器端口默认关闭状态)7.ip address IP地址配置端口IP8.password 密码配置密码生效9.login密码生效10.line vty 0 4 进入vty虚拟链路11.enable secret 密码配置特权模式密码ername 名字privilege 几个用户password密码创建名为()密码为()且权限为()的用户,最高权限为1513.login local 使用用户认证14.ip domain-name 域名配置主机域15.crypto key generate rsa 生成rsa密钥对16.How many bits in the modulus [512]:1024 秘钥长度,建议1024以上17.ip ssh version 2(2是版本)选择SSH版本18.ip ssh time-out 时间SSH登录超时时间19.transport input ssh 设置允许SSH的流量(默认是不允许)20.show ip interface brief 查看端口简要信息21.show running-config 查看运行配置文件22.show port-security address ? 查看绑定的mac地址23.write 保存配置24.reload 重启路由器交换机1.interface vlan进入vlan配置2.ip address IP地址配置端口IP和子网掩码3.interface 端口进入端口4.switchport mode access 修改端口模式为access5.switchport port-security 开启端口安全6.switchport port-security maximum 1 允许绑定的Mac数量最多为17.switchport port-security mac-address sticky 与当前连接的mac地址进行绑定8.switchport port-security violation shutdown 检测到其他mac地址,端口会关闭(管理手动开启以后才能用)。
思科命令大全(完整版)

思科命令大全(完整版)1.设置主机名/系统名IOS:witch(config)#hotname"hotname"CLI:witch(enable)etytemnamename-tring2.设置登录口令IOS:witch(config)#enablepawordlevel1pawordCLI:witch(enable)etpawordwitch(enable)etenalbepa3.设置远程访问IOS:witch(config)#interfacevlan1witch(config-if)#ipaddreip-addrenetmakwitch(config-if)#ipdefault-gatewayip-addreCLI:witch(enable)etinterfacec0ip-addrenetmakbroadcat-addre witch(enable)etinterfacec0vlanwitch(enable)etiproutedefaultgateway4.启用和浏览CDP信息IOS:witch(config-if)#cdpenablewitch(config-if)#nocdpenableCLI:witch(enable)etcdp{enable|diable}module/port5.查看Cico邻接设备的CDP通告IOS:witch#howcdpinterface[typemodle/port]witch#howcdpneighbor[typemodule/port][detail]CLI:witch(enable)howcdpneighbor[module/port][vlan|duple某|capabilitie|detail]6.端口描述IOS:witch(config-if)#decriptionecription-tring CLI:witch(enable)etportnamemodule/numberdecription-tring 7.设置端口速度IOS:witch(config-if)#peed{10|100|auto}CLI:witch(enable)etportpeedmoudle/number{10|100|auto}witch(enable)etportpeedmoudle/number{4|16|auto}8.设置以太网的链路模式IOS:witch(config-if)#duple某{auto|full|half}CLI:witch(enable)etportduple某module/number{full|half}9.配置静态VLANIOS:witch#vlandatabaewitch(vlan)#vlanvlan-numnamevlawitch(vlan)#e某itwitch#configureteriminalwitch(config)#interfaceinterfacemodule/numberwitch(config-if)#witchportmodeaccewitch(config-if)#witchportaccevlanvlan-numwitch(config-if)#endCLI:witch(enable)etvlanvlan-num[namename]witch(enable)etvlanvlan-nummod-num/port-lit10.配置VLAN中继线IOS:witch(config)#interfaceinterfacemod/portwitch(config-if)#witchportmodetrunkwitch(config-if)#witchporttrunkencapulation{il|dotlq}witch(config-if)#witchporttrunkallowedvlanremovevlan-litwitch(config-if)#witchporttrunkallowedvlanaddvlan-litCLI:witch(enable)ettrunkmodule/port[on|off|deirable|auto|nonegotiate] Vlan-range[il|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:witch#vlandatabaewitch(vlan)#vtpdomaindomain-nameCLI:witch(enable)etvtp[domaindomain-name]12.配置VTP模式IOS:witch#vlandatabaewitch(vlan)#vtpdomaindomain-namewitch(vlan)#vtp{ever|cilent|tranparent}witch(vlan)#vtppawordpawordCLI:witch(enable)etvtp[domaindomain-name][mode{ever|cilent|tranparent}][pawordpaword] 13.配置VTP版本IOS:witch#vlandatabaewitch(vlan)#vtpv2-modeCLI:witch(enable)etvtpv2enable14.启动VTP剪裁IOS:witch#vlandatabaewitch(vlan)#vtppruningCLI:witch(enable)etvtppruningenable15.配置以太信道IOS:witch(config-if)#portgroupgroup-number[ditribution{ource|detination}]CLI:witch(enable)etportchannelmoudle/port-rangemode{on|off|deirable|auto}16.调整根路径成本IOS:witch(config-if)#panning-tree[vlanvlan-lit]cotcotCLI:witch(enable)etpantreeportcotmoudle/portcotwitch(enable)etpantreeportvlancotmoudle/port[cotcot][vlan-lit]17.调整端口IDIOS:witch(config-if)#panning-tree[vlanvlan-lit]port-priorityport-priorityCLI:witch(enable)etpantreeportpri{mldule/port}prioritywitch(enable)etpantreeportvlanpri{module/port}priority[vlan] 18.修改STP时钟witch(config)#panning-tree[vlanvlan-lit]ma某-ageecondCLI:witch(enable)etpantreehellointerval[vlan]witch(enable)etpantreefwddelaydelay[vlan]witch(enable)etpantreema某ageagingtiame[vlan]19.启用或禁用PortFat特征IOS:witch(config-if)#panning-treeportfatCLI:witch(enable)etpantreeportfat{module/port}{enable|diable}20.启用或禁用UplinkFat特征IOS:witch(config)#panning-treeuplinkfat[ma某-update-ratepkt-per-econd]CLI:witch(enable)etpantreeuplinkfat{enable|diable}[rateupdate-rate][all-protocoloff|on]为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:witch(config)#cluterenablecluter-name21.为了从一条中继链路上删除VLAN,可使用下列命令:witch(enable)cleartrunkmodule/portvlan-range22.用howvtpdomain显示管理域的VTP参数.23.用howvtptatitic显示管理域的VTP参数.24.在Catalyt交换机上定义TrBRF的命令如下:witch(enable)etvlanvlan-name[namename]typetrbrfbridgebridge-num[tp{ieee|ibm}]25.在Catalyt交换机上定义TrCRF的命令如下:witch(enable)etvlanvlan-num[namename]typetrcrf{ringhe某-ring-num|decringdecimal-ring-num}parentvlan-num26.在创建好TrBRFVLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:witch(enable)etvlanvlan-nummod-num/port-num27.命令howpantree显示一个交换机端口的STP状态.28.配置一个ELAN的LES和BUS,可以使用下列命令:ATM(config)#interfaceatmnumber.ubintmultiointATM(config-ubif)#laneerber-buethernetelan-name29.配置LECS:ATM(config)#lanedatabaedatabae-nameATM(lane-config-databade)#nameelan1-nameerver-atm-addrele1-nap-addreATM(lane-config-databade)#nameelan2-nameerver-atm-addrele2-nap-addreATM(lane-config-databade)#name...30.创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)#interfaceatmnumberATM(config-if)#laneconfigdatabaedatabae-nameATM(config-if)#laneconfigauto-config-atm-addre31.将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)#interfaceatmnumber.ubintmultipointATM(config)#laneclientethernetvlan-numelan-num32.用howlaneerver显示LES的状态.33.用howlanebu显示bu的状态.34.用howlanedatabae显示LECS数据库可内容.35.用howlaneclient显示LEC的状态.36.用howmodule显示已安装的模块列表.37.用物理接口建立与VLAN的连接:router#configureterminalrouter(config)#interfacemediamodule/portrouter(config-if)#decriptiondecription-tringrouter(config-if)#ipaddreip-addrubnet-makrouter(config-if)#nohutdown38.用中继链路来建立与VLAN的连接:router(config)#interfacemodule/port.ubinterface router(config-ig)#encapulation[il|dotlq]vlan-number router(config-if)#ipaddreip-addreubnet-mak39.用LANE来建立与VLAN的连接:router(config)#interfaceatmmodule/portrouter(config-if)#noipaddrerouter(config-if)#atmpvc105qaalrouter(config-if)#atmpvc2016ilnirouter(config-if)#interfaceatmmodule/port.ubinterfacemultipointrouter(config-if)#ipaddreip-addreubnet-makrouter(config-if)#laneclientethernetelan-numrouter(config-if)#interfaceatmmodule/port.ubinterfacemultipointrouter(config-if)#ipaddreip-addreubnet-namerouter(config-if)#laneclientethernetelan-namerouter(config-if)#...40.为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)#iproutingrouter(config)#routerip-routing-protocolrouter(config-router)#networkip-network-numberrouter(config-router)#networkip-network-number41.配置默认路由:witch(enable)etiproutedefaultgateway42.为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)#interfaceinterfacenumberrouter(config-if)#mlrpvlan-idvlan-id-num43.在路由处理器启用MLSP:router(config)#mlrpip44.为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)#interfaceinterfacenumberrouter(config-if)#mlrpvtp-domaindomain-name45.查看指定的VTP域的信息:router#howmlrpvtp-domainvtpdomainname46.要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mlrpmanagement-interface47.要检验MLS-RP的配置情况:router#howmlrp48.检验特定接口上的MLS配置:router#howmlrpinterfaceinterfacenumber49.为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:etmlflow[detination|detination-ource|full]50.为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)#mlrpipinput-acl51.当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:witch(enable)etmlenable52.若想改变老化时间的值,可在特权模式下输入以下命令:54.确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:witch(enable)howmlinclude55.显示MLS高速缓存记录:witch(enable)howmlentry56.用命令howinarp显示ARP高速缓存区的内容。
思科命令全集

思科命令全集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 defaul t-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)isdn switch-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 显示当前设备名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(数字数据接受器)设置的串行接口的一般诊断信息sho 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 显示配置的协议。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Cisco配置命令汇总
第一章
命令作用简便拼法
show version 检验路由器启动过程①sh ve
enable 进入特权执行模式en
conf t 进入全局配置模式conf (enter两次)在全局配置模式下Router(config)#
hostname name 命名路由器ho +name
enable secret
password
设置使能密码ena s
line console 0 进入console配置模式li co
(config-line)#password
password
配置console口密码pa +name
config-line)#login 登陆logi
line vty 0 4 设置远程控制接口限制li v
config-line)#password 设置远程控制登陆密码pa +password (config-line)#login 登陆logi
interface type number (such as f0/0 se0/0/0) 进入接口配置模式int + (such as f0/0
se0/0/0)
config-if)# ip address
address mask
设置接口ip地址和子网掩码ip add(删除前面加no)config-if)#description 设置描述内容de
config-if)#no
shutdown
开启no sh(关闭shutdown)在特权模式下(Router#)
copy running-config
startup-config
保存路由器更改cop run sta
show running-config 查看路由器运行文件sh run
show ip route 查看路由表sh ip rou
show ip interface brief 查看各个接口状态sh ip int br
show interfaces 查看各个接口的详细信息sh int
clock rate+number 配置串行接口上的时钟信号cl ra+number
show controllers+接口
(s0/0/0)
确定路由器接口连接的电缆sh co
debug ip routing 启动调试功能de ip rou
show cdp neighbors show cdp neighbors detail 用于发现周围邻居网络的一些信
息(思科发现协议)
sh cdp ne
sh cdp ne de
第二章
no cdp run 禁用(思科发现协议)no cdp run
ip route 目的网络+目的网络子网掩码+目的网络(送出接口) 静态路由配置ip rou目的网络+目的网络
子网掩码+目的网络(送出接
口)
no ip route 目的网络+目的网络子网掩码+目的网络(送出接口) 删除静态路由配置no ip rou目的网络+目的
网络子网掩码+目的网络(送
出接口)
Ip route
0.0.0.0 0.0.0.0+送出接口配置默认路由Ip rou 0.0.0.0 0.0.0.0+
送出接口
traceroute+目的网络地址追踪数据包传送过程tr+目的网络地址(特权)show ip protocols 检查路由协议sh ip pr
第三章
show ip rip database 查看本路由器了解的所有
RIP路由
sh ip rip d
show ip route+网络地址查看到该网络的距离Sh ip rou+网络地址
第五章
全局模式router rip 进入路由协议配置模式rou rip
network+直连网络配置rip动态路由net+直连网络
passive-interface+端口关闭不必要的端口传送pa+端口
no network+直连网络删除已配置的动态路由no net+直连网络
no router rip 停止rip协议no rou rip
default-information originate 命令指定该路由器为默认信
息的来源(传播默认路由)
de o
第七章
ip route 192.168.0.0 255.255.0.0 null0 配置空接口路由,只做测试用
途
ip rou
在(config-router)下
redistribute static
路由重分布r s
debug ip rip 调试RIP协议de ip rip 在路由器配置模式下
version 1或no version
恢复为默认的RIPv1 v 1或no v no auto-summary 禁用自动汇总no a
在路由器配置模式下
version 2
进入RIPv2版本v 2
在特权模式下
erase startup-config
清空启动文件er s delete 删除de
telnet+接口IP 登陆该接口tel+接口ip 第九章
show ip eigrp neighbors 查看邻居表检验EIGRP是否
已与其邻居建立邻接关系
sh ip e n
router eigrp 1~65535 启用eigrp路由协议rou e 1~65535
注释:
①show version 检验路由器启动过程内容包括;
IOS版本;
ROM bootstrap程序;
IOS位置;
CPU和内存大小;
接口;
NVRAM大小;
内存大小;
配置寄存器信息;
VLSM:
可变长子网掩码
CIDR:
无类域间路由。