Cisco命令详解
- 格式:docx
- 大小:24.91 KB
- 文档页数:7
CISCO 命令1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#c onfigure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以aptech2950为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#检举回答人的补充 2009-04-26 09:528:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload检举提问人的追问 2009-04-26 09:54还有吧!!麻烦你了!!检举回答人的补充 2009-04-26 10:0110:双工模式设置switch> enableswitch#c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17 以17端口为例aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。
CISCO路由命令大全Cisco 路由器常用命令1 Exec commands:<1-99> 恢复一个会话bfe 手工应急模式设置clear 复位功能clock 管理系统时钟configure 进入设置模式connect 打开一个终端copy 从tftp服务器拷贝设置文件或把设置文件拷贝到tftp服务器上debug 调试功能disable 退出优先命令状态disconnect 断开一个网络连接enable 进入优先命令状态erase 擦除快闪内存exit 退出exce模式help 交互帮助系统的描述lat 打开一个本地传输连接lock 锁定终端login 以一个用户名登录logout 退出终端mbranch 向树形下端分支跟踪多路由广播mrbranch 向树形上端分支跟踪反向多路由广播name-connection 给一个存在的网络连接命名no 关闭调试功能pad 打开X.29 PAD连接ping 发送回显信息ppp 开始点到点的连接协议reload 停机并执行冷启动resume 恢复一个活动的网络连接rlogin 打开远程注册连接rsh 执行一个远端命令send 发送信息到另外的终端行setup 运行setup命令show 显示正在运行系统信息slip 开始SLIP协议start-chat 在命令行上执行对话描述systat 显示终端行的信息telnet 远程登录terminal 终端行参数test 测试子系统内存和端口tn3270 打开一个tin3270连接trace 跟踪路由到目的地undebug 退出调试功能verify 验证检查闪烁文件的总数where 显示活动的连接which-route 执行OSI路由表查找并显示结果write 把正在运行的设置写入内存、网络、或终端x3 在PAD上设置X.3参数xremote 进入xremote模式2 #show ?access-expression 显示访问控制表达式access-lists 显示访问控制表apollo Apollo 网络信息appletalk Apple Talk 信息arap 显示Appletalk 远端通道统计arp 地址解析协议表async 访问路由接口的终端行上的信息bridge 前向网络数据库buffers 缓冲池统计clns CLNS网络信息clock 显示系统时钟cmns 连接模式网络服务信息compress 显示压缩状态configuration 非易失性内存的内容controllers 端口控制状态debugging 调试选项状态decnet DEC网络信息dialer 拨号参数和统计dnsix 显示Dnsix/DMPP信息entry 排队终端入口extended 扩展端口信息flash 系统闪烁信息flh-log 闪烁装载帮助日志缓冲区frame-relay 帧中继信息history 显示对话层历史命令hosts IP域名,查找方式,名字服务,主机表interfaces 端口状态和设置ip IP信息ipx Novell IPX信息isis IS-IS路由信息keymap 终端键盘映射lat DEC LAT信息line 终端行信息llc2 IBM LLC2 环路信息lnm IBM 局网管理local-ack 本地认知虚环路memory 内存统计netbios-cache NetBios命名缓冲存贮器内存node 显示已知LAT节点ntp 网络时间协议processes 活动进程统计protocols 活动网络路由协议queue 显示队列内容queueing 显示队列设置registry 功能注册信息rhosts 远程主机文件rif RIF存贮器入口route-map 路由器信息sdlle 显示sdlc-llc2转换信息services 已知LAT服务sessions 远程连接信息smds SMDS信息source-bridge 源网桥参数和统计spanning-tree 跨越树形拓朴stacks 进程堆栈应用standby 热支持协议信息stun STUN状态和设置subsystem 显示子系统tcp TCP连接状态terminal 显示终端设置tn3270 TN3270 设置translate 协议转换信息ttycap 终端容易表users 显示终端行的信息version 系统硬、软件状态vines VINES信息whoami 当前终端行信息x25 X.25信息xns XNS信息xermote Xremote统计3 #config ?Memory 从非易失性内存设置Network 从TFTP网络主机设置Overwrite-network 从TFTP网络主机设置覆盖非易失性内存Terminal 从终端设置4 Configure commads:Access-list 增加一个访问控制域Apollo Apollo全局设置命令appletalk Appletalk 全局设置命令arap Appletalk远程进出协议arp 设置一个静态ARP入口async-bootp 修改系统启动参数autonomous-system 本地所拥有的特殊自治系统成员banner 定义注册显示信息boot 修改系统启动时参数bridge 透明网桥buffers 调整系统缓冲池参数busy-message 定义当连接主机失败时显示信息chat-s cript 定义一个调制解调器对话文本clns 全局CLNS设置子命令clock 设置时间时钟config-register 定义设置寄存器decnet 全局DEC网络设置子命令default-value 缺省字符位值dialer-list 创建一个拨号清单入口dnsix-nat 为审计提供DMDM服务enable 修改优先命令口令end 从设置模式退出exit 从设置模式退出frame-relay 全局帧中继设置命令help 交互帮助系统的描述hostname 设置系统网络名iterface 选择设置的端口ip 全局地址设置子命令ipx Novell/IPX全局设置命令keymap 定义一个新的键盘映射lat DEC本地传输协议line 设置终端行lnm IBM局网管理locaddr-priority-list 在LU地址上建立优先队列logging 修改注册(设备)信息login-string 定义主机指定的注册字符串map-class 设置静态表类map-list 设置静态表清单menu 定义用户接口菜单mop 设置DEC MOP服务器netbios NETBIOS通道控制过滤no 否定一个命令或改为缺省设置ntp 设置NTPpriority-list 建立特权列表prompt 设置系统提示符queue-list 建立常规队列列表rcmd 远程命令设置命令rcp-enable 打开Rep服务rif 源路由进程router-map 建立路由表或进入路由表命令模式router 打开一个路由进程rsh-enable 打开一个RSH服务sap-priority-list 在SAP或MAC地址上建立一个优先队列service 修改网络基本服务snmp-server 修改SNMP参数state-machine 定义一个TCP分配状态的机器stun STUN全局设置命令tacacs-server 修改TACACS队列参数terminal-queue 终端队列命令tftp-server 为网络装载请求提供TFTP服务tn3270 tn3270设置命令translate 解释全局设置命令username 建立一个用户名及其权限vines VINES全局设置命令x25 X.25 的第三级x29 X.29 命令xns XNS 全局设置命令xremote 设置Xremote5 (config)#ipGlobal IP configuration subcommands: Accounting-list 选择保存IP记帐信息的主机Accounting-threshold 设置记帐入口的最大数accounting-transits 设置通过入口的最大数alias TCP端口的IP地址取别名as-path BGP自治系统路径过滤cache-invalidate-delay 延迟IP路由存贮池的无效classless 跟随无类前向路由规则default-network 标志网络作为缺省网关候选default-gateway 指定缺省网(如果没有路由IP)domain-list 完成无资格主机的域名domain-lookup 打开IP域名服务系统主机转换domain-name 定义缺省域名forward-protocol 控制前向的、物理的、直接的IP广播host 为IP主机表增加一个入口host-routing 打开基于主机的路由(代理ARP和再定向)hp-host 打开HP代理探测服务mobile-host 移动主机数据库multicast-routing 打开前向IPname-server 指定所用名字服务器的地址ospf-name-lookup 把OSPF路由作为DNS名显示pim PIM 全局命令route 建立静态路由routing 打开IP路由security 指定系统安全信息source-route 根据源路由头的选择处理包subnet-zero 允许子网0子网tcp 全局TCP参数路由器在计算机网络中有着举足轻重的地位,是计算机网络的桥梁。
1、 ip name-server 此命令是为路由器添加一个DNS地址,在路由器需要解析时会用到;2、ip domain-name 此命令是为路由器设置一个域名,也可以认为这个路由器是属于哪个域。
3、在CLI下输入了1个Cisco设备不能识别的命令,它会默认通过DNS来进行解析(它认为是主机名).这个不好的地方是要花费额外的时间等待DNS解析完.可以在全局配置模式下使用no ip domain-lookup命令关闭它4、第一条命令是:ip domain-lookup,这个命令默认是打开了的.如果你之前使用了no ipdomain-lookup的话,就要用这条命令打开它5、第二条命令是:ip name-server.设置DNS服务器的IP地址,可以使1个IP地址对应多达6个服务器6、最后条命令是:ip domain-name.虽然这个命令是可选的,但是最好还是设置1下实例如下:2500(config)#ip domain-lookup2500(config)#ip name-server 192.168.0.232500(config)#ip domain-name 7、当你telnet到远程设备的时候,可以在任何情况下使用exit命令来终止连接.但是假如你想保持这个连接,同时又对另外1个设备进行telnet的时候,使用Ctrl+Shift+6,再按下X键,就可以回到本地console,再对另外1设备进行telnet8、Line aux 0no exec关闭此管理接口9、policy-map policy-default-autocopp是配置了auto QOS之类的的,删除掉的不是关键部位,重启之后,那policy-map又会被加载的。
10、高级交换自带用于的配置命令Switch(config)#redundancy 进入冗余配置模式Switch(config-red)#mode rpr-plus 配置冗余协议 rpr+Switch#show redundancy statesSwitch(config)#power redundancy-mode combined | redundant 配置电源是结合的还备份11、交换机冗余(redundancy引擎冗余)⑪引擎的冗余①使RPR+作为冗余协议(Route Processor Redundancy Plus)②主、备引擎同时处于启动状态,但只有主引擎工作③主、备引擎的转换时间为30S到60S④不支持Vlan数据库模式,但可在全局模式下用⑤主、备引擎上运行的IOS版本要相同⑥主、备引擎切换过程中,动态路由信息丢失,静态路由信息保留⑦主、备引擎必须插到交换机第一个插槽和第二个插槽上⑧不能使用分叉线缆配置主、备引擎//配置(两个引擎都做设置)⑨(config)#redundancy 默认第一个槽为主引擎⑩(config-red)#mode rpr-plus显示冗余状态:show redundancy status⑫模块的冗余提供多余的模块⑬电源的冗余⑪配置:(config)#power redundancy-mode combined / redundant⑫Combined:多电源一起工作⑬Redundant:主电源工作,备用电源不工作//显示电源配置:show power⑭风扇的冗余12、boot-start-marker和boot-end-markerThe boot-start-marker and boot-end-marker flags, which can be seen in Cisco IOS software configuration files, are not CLI commands. These markers are written to configuration files automatically to flag the beginning and end of the boot commands (boot statements). By flagging boot statements, these markers allow the router to more reliably load Cisco IOS images during bootup13、service counters max ageTo set the statistics retrieval time, use the service counters max age command. Use the no form of this command to return to the default settings.defaults 5 seconds简单说,就是设置设备统计状态信息的间隔时间14、logging buffered\\将日志信息记录到内存缓冲区。
思科交换机路由器命令大全思科交换机和路由器命令大全本文档为思科交换机和路由器命令的最新最全范本,供参考使用。
以下是详细的命令列表,包括每个命令的说明和用法。
一、接口配置命令1、ip address:设置接口的IP地质示例:ip address 192.168.1.1 255.255.255:02、no shutdown:启用接口示例:no shutdown3、duplex:设置接口的双工模式示例:duplex auto4、speed:设置接口的速度示例:speed 1005、exit:退出接口配置模式示例:exit二、VLAN命令1、vlan database:进入VLAN数据库模式示例:vlan database2、vlan id name:创建VLAN并设置名称示例:vlan 10 name VLAN-103、vlan id:删除VLAN示例:no vlan 104、show vlan:显示VLAN信息示例:show vlan5、exit:退出VLAN数据库模式示例:exit三、路由命令1、ip route:设置静态路由示例:ip route 192.168.2:0 255.255.255:0 192.168.1.22、router rip:启用RIP路由协议示例:router rip3、network:将网络添加到RIP路由表中示例:network 10:0:0:04、redistribute:将静态路由或其他路由协议添加到RIP路由表中示例:redistribute static5、exit:退出路由配置模式示例:exit四、ACL命令1、access-list:创建标准或扩展ACL示例:access-list 10 permit 192.168.1:0 0:0:0.2552、ip access-group:应用ACL到接口示例:ip access-group 10 in3、show access-lists:显示ACL信息示例:show access-lists4、exit:退出ACL配置模式示例:exit五、SNMP命令1、snmp-server community:设置SNMP团体字符串示例:snmp-server community public RO2、snmp-server enable traps:启用SNMP陷阱示例:snmp-server enable traps3、snmp-server host:配置SNMP陷阱接收主机示例:snmp-server host 192.168.1.1004、exit:退出SNMP配置模式示例:exit六、SSH命令1、ip ssh version:设置SSH协议版本示例:ip ssh version 22、crypto key generate rsa:RSA密钥对示例:crypto key generate rsa3、username:创建新的本地用户示例:username admin privilege 15 password password1234、exit:退出SSH配置模式示例:exit七、其他命令1、show running-config:显示当前配置示例:show running-config2、copy running-config startup-config:将当前配置保存到启动配置中示例:copy running-config startup-config3、reload:重新启动设备示例:reload4、exit:退出CLI命令行模式示例:exit本文档涉及附件:1、无附件本文所涉及的法律名词及注释:1、ACL(Access Control List):访问控制列表,用于控制网络流量的进出。
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用户模式2:特权模式enableshow vlanshow versionshow interfaceshow mac-address-tableshow running-configcopy running-config startup-config3:全局配置模式config terminalhostnameenable passwordip default-gateway4:接口配置模式interface 端口switchport mode trunk5:line模式line console 0第2章交换机的基本配置1.配置主机hostname2.查看交换机的配置show running-config使能口令enable password加密保存的使能口令enable secret配置IP地址interface vlan1ip addressno shutdown配置交换机的网关ip default-gateway ipaddress查看交换机的MAC地址表show mac-address-table使用CDP协议show cdpshow cdp interfaceshow cdp neighborsshow cdp neighbors detailshow cdp traffic保存与删除交换机配置copy running-config startup-config第三章:虚拟局域网(VLAN)VLAN的概述VLAN是对连接在第2层交换机端口的网络用户的逻辑分段。
VLAN的作用:1。
广播控制2。
安全(副产品)3。
带宽利用4。
延迟VLAN的种类静态:基于端口的VLAN动态:基于MAC地址的VLAN在交换机上配置静态VLAN创建VLAN1。
CONFIG TERMINALVLAN 2NAME 22。
特权模式下VLAN DATABASEVLAN 2 NAME 2查看VLANSHOW VLAN删除VLANNO VLAN 2验证:SHOW VLAN BRIEF在VLAN中添加端口INTERFACE F0/2INTERFACE RANGE F0/2 - 5SWITCHPORT MODE ACCESSSWITCHPORT ACCESS VLAN 2VLAN配置实例在交换机上添加VLAN2,VLAN3,VLAN3,端口范围分别为1-4,5-8,9-12这个实例的作用就是让不同的VLAN的计算机之间的通信隔开。
Cisco路由器常用命令详解(推荐)Cisco路由器常用命令1 Exec commands:<1-99>;恢复一个会话bfe 手工应急模式设置clear 复位功能clock 管理系统时钟configure 进入设置模式connect 打开一个终端copy 从tftp服务器拷贝设置文件或把设置文件拷贝到tftp服务器上debug 调试功能disable 退出优先命令状态disconnect 断开一个网络连接enable 进入优先命令状态erase 擦除快闪内存exit 退出exce模式help 交互帮助系统的描述lat 打开一个本地传输连接lock 锁定终端login 以一个用户名登录logout 退出终端mbranch 向树形下端分支跟踪多路由广播mrbranch 向树形上端分支跟踪反向多路由广播name-connection 给一个存在的网络连接命名no 关闭调试功能pad 打开X.29 PAD连接ping 发送回显信息ppp 开始点到点的连接协议reload 停机并执行冷启动resume 恢复一个活动的网络连接rlogin 打开远程注册连接rsh 执行一个远端命令send 发送信息到另外的终端行setup 运行setup命令show 显示正在运行系统信息slip 开始SLIP协议start-chat 在命令行上执行对话描述systat 显示终端行的信息telnet 远程登录terminal 终端行参数test 测试子系统内存和端口tn3270 打开一个tin3270连接trace 跟踪路由到目的地undebug 退出调试功能verify 验证检查闪烁文件的总数where 显示活动的连接which-route 执行OSI路由表查找并显示结果write 把正在运行的设置写入内存、网络、或终端x3 在PAD上设置X.3参数xremote 进入xremote模式2 #show ?access-expression 显示访问控制表达式access-lists 显示访问控制表apollo Apollo 网络信息appletalk Apple Talk 信息arap 显示Appletalk 远端通道统计arp 地址解析协议表async 访问路由接口的终端行上的信息bridge 前向网络数据库buffers 缓冲池统计clns CLNS网络信息clock 显示系统时钟cmns 连接模式网络服务信息compress 显示压缩状态configuration 非易失性内存的内容controllers 端口控制状态debugging 调试选项状态decnet DEC网络信息dialer 拨号参数和统计dnsix 显示Dnsix/DMPP信息entry 排队终端入口extended 扩展端口信息flash 系统闪烁信息flh-log 闪烁装载帮助日志缓冲区frame-relay 帧中继信息history 显示对话层历史命令hosts IP域名,查找方式,名字服务,主机表interfaces 端口状态和设置ip IP信息ipx Novell IPX信息isis IS-IS路由信息keymap 终端键盘映射lat DEC LAT信息line 终端行信息llc2 IBM LLC2 环路信息lnm IBM 局网管理local-ack 本地认知虚环路memory 内存统计netbios-cache NetBios命名缓冲存贮器内存node 显示已知LAT节点ntp 网络时间协议processes 活动进程统计protocols 活动网络路由协议queue 显示队列内容queueing 显示队列设置registry 功能注册信息rhosts 远程主机文件rif RIF存贮器入口route-map 路由器信息sdlle 显示sdlc-llc2转换信息services 已知LAT服务sessions 远程连接信息smds SMDS信息source-bridge 源网桥参数和统计spanning-tree 跨越树形拓朴stacks 进程堆栈应用standby 热支持协议信息stun STUN状态和设置subsystem 显示子系统tcp TCP连接状态terminal 显示终端设置tn3270 TN3270 设置translate 协议转换信息ttycap 终端容易表users 显示终端行的信息version 系统硬、软件状态vines VINES信息whoami 当前终端行信息x25 X.25信息xns XNS信息xermote Xremote统计3 #config ?Memory 从非易失性内存设置Network 从T FTP网络主机设置Overwrite-network 从T FTP网络主机设置覆盖非易失性内存Terminal 从终端设置4 Configure commads:Access-list 增加一个访问控制域Apollo Apollo全局设置命令appletalk Appletalk 全局设置命令arap Appletalk远程进出协议arp 设置一个静态ARP入口async-bootp 修改系统启动参数autonomous-system 本地所拥有的特殊自治系统成员banner 定义注册显示信息boot 修改系统启动时参数bridge 透明网桥buffers 调整系统缓冲池参数busy-message 定义当连接主机失败时显示信息chat-s cript 定义一个调制解调器对话文本clns 全局CLNS设置子命令clock 设置时间时钟config-register 定义设置寄存器decnet 全局DEC网络设置子命令default-value 缺省字符位值dialer-list 创建一个拨号清单入口dnsix-nat 为审计提供DMDM服务enable 修改优先命令口令end 从设置模式退出exit 从设置模式退出frame-relay 全局帧中继设置命令help 交互帮助系统的描述hostname 设置系统网络名iterface 选择设置的端口ip 全局地址设置子命令ipx Novell/IPX全局设置命令keymap 定义一个新的键盘映射lat DEC本地传输协议line 设置终端行lnm IBM局网管理locaddr-priority-list 在LU地址上建立优先队列logging 修改注册(设备)信息login-string 定义主机指定的注册字符串map-class 设置静态表类map-list 设置静态表清单menu 定义用户接口菜单mop 设置DEC MOP服务器netbios NET BIOS通道控制过滤no 否定一个命令或改为缺省设置ntp 设置NTPpriority-list 建立特权列表prompt 设置系统提示符queue-list 建立常规队列列表rcmd 远程命令设置命令rcp-enable 打开Rep服务rif 源路由进程router-map 建立路由表或进入路由表命令模式router 打开一个路由进程rsh-enable 打开一个RSH服务sap-priority-list 在SAP或MAC地址上建立一个优先队列service 修改网络基本服务snmp-server 修改SNMP参数state-machine 定义一个TCP分配状态的机器stun STUN全局设置命令tacacs-server 修改TACACS队列参数terminal-queue 终端队列命令tftp-server 为网络装载请求提供T FTP服务tn3270 tn3270设置命令translate 解释全局设置命令username 建立一个用户名及其权限vines VINES全局设置命令x25 X.25 的第三级x29 X.29 命令xns XNS 全局设置命令xremote 设置Xremote5 (config)#ipGlobal IP configuration subcommands:Accounting-list 选择保存IP记帐信息的主机Accounting-threshold 设置记帐入口的最大数accounting-transits 设置通过入口的最大数alias TCP端口的IP地址取别名as-path BGP自治系统路径过滤cache-invalidate-delay 延迟IP路由存贮池的无效classless 跟随无类前向路由规则default-network 标志网络作为缺省网关候选default-gateway 指定缺省网(如果没有路由IP)domain-list 完成无资格主机的域名domain-lookup 打开IP域名服务系统主机转换domain-name 定义缺省域名forward-protocol 控制前向的、物理的、直接的IP广播host 为IP主机表增加一个入口host-routing 打开基于主机的路由(代理ARP和再定向)hp-host 打开HP代理探测服务mobile-host 移动主机数据库multicast-routing 打开前向IPname-server 指定所用名字服务器的地址ospf-name-lookup 把OSPF路由作为DNS名显示pim PIM 全局命令route 建立静态路由routing 打开IP路由security 指定系统安全信息source-route 根据源路由头的选择处理包subnet-zero 允许子网0子网tcp 全局TCP参数。
cisco路由器命令总体说明:此文档提供了关于常用的Cisco路由器命令的详细说明。
每个章节介绍了不同的命令类别并提供了相关命令的具体用法和示例。
本文档旨在帮助用户熟悉和理解Cisco路由器命令,以便在配置和管理网络设备时能够高效地使用它们。
1:基础命令1.1 登录和退出路由器1.1.1 登录路由器命令:telnet [IP地址]用法示例:telnet 192.168.1.1说明:此命令用于通过Telnet协议登录到路由器。
1.1.2 退出路由器命令:exit用法示例:exit说明:此命令用于从路由器会话中退出。
1.2 查看和配置接口1.2.1 查看接口信息命令:show interfaces用法示例:show interfaces gigabitethernet 0/1说明:此命令用于查看指定接口的详细信息,包括状态、带宽、错误统计等。
1.2.2 配置接口命令:interface [接口名称]用法示例:interface gigabitethernet 0/1说明:此命令用于进入指定接口的配置模式,以便进行相关配置。
1.3 路由配置1.3.1 配置静态路由命令:ip route [目标网络] [子网掩码] [下一跳地址]用法示例:ip route 10:0:0:0 255.255.255:0192.168.1.2说明:此命令用于配置静态路由,将目标网络流量发送到指定的下一跳地址。
1.3.2 查看路由表命令:show ip route用法示例:show ip route说明:此命令用于查看当前路由表的内容。
2:高级命令2.1 ACL(访问控制列表)2.1.1 创建ACL命令:access-list [ACL号] [规则类型] [源地址] [目标地址]用法示例:access-list 1 permit 192.168.1:0/24 any说明:此命令用于创建一个访问控制列表,并定义其规则。
2.1.2 应用ACL命令:interface [接口名称]ip access-group [ACL号] [进/出]用法示例:interface gigabitethernet 0/1ip access-group 1 in说明:此命令用于将ACL应用到指定接口的进或出方向。
思科路由器命令大全思科路由器命令大全1.基本设置命令1.1 主机名配置●hostname [主机名]:设置路由器的主机名。
1.2 用户名和密码配置●enable password [密码]:设置特权模式的密码。
●enable secret [密码]:设置加密的特权模式密码。
●username [用户名] password [密码]:创建一个本地用户并设置密码。
●line console 0:进入控制台命令行配置模式。
●password [密码]:设置控制台访问密码。
●line vty [行号] [结束行号]:进入虚拟终端配置模式。
●password [密码]:设置虚拟终端访问密码。
1.3 IP 地质配置●interface [接口类型] [接口编号]:进入接口配置模式。
●ip address [IP 地质] [子网掩码]:设置接口的IP 地质和子网掩码。
●no shutdown:启用接口。
1.4 默认网关配置●ip default-gateway [默认网关地质]:设置默认网关。
2.路由配置命令2.1 静态路由配置●ip route [目标网络] [目标子网掩码] [下一跳地质]:配置静态路由。
2.2 动态路由配置●router rip:进入 RIP 路由配置模式。
●network [网络地质]:启动 RIP 并指定要进行路由的网络地质。
●router ospf [进程号]:进入 OSPF 路由配置模式。
●network [IP 地质] [反掩码] area [区域号]:配置 OSPF。
3.状态和监控命令3.1 接口状态命令●show ip interface brief:显示路由器接口的 IP 地质和状态。
●show interfaces [接口类型] [接口编号]:显示指定接口的详细信息。
●show interfaces status:显示接口的状态和统计信息。
3.2 路由表命令●show ip route:显示路由表信息。
交换机支持的命令:交换机基本状态switch 路由器是rommon>hostname> 用户模式 hostname# 特权模式hostname(config)# 全局配置模式hostname(config-if)# 接口状态交换机口令设置:switch>enable 进入特权模式switch#config terminal 进入全局配置模式switch(config)#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 设置vtp域名switch(config)#vtp password 设置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地址switch(config)#ip default-gateway 设置默认网关switch#dir flash: 查看闪存交换机显示命令:switch#write 保存配置信息switch#show vtp 查看vtp配置信息switch#show run 查看当前配置信息switch#show vlan 查看vlan配置信息switch#show interface 查看端口信息switch#show int f0/0 查看指定端口信息路由器支持的命令:路由器显示命令:router#show run 显示配置信息\router#show interface 显示接口信息router#show ip route 显示路由信息router#show cdp nei 显示邻居信息router#reload重新起动路由器口令设置:router>enable 进入特权模式router#config terminal 进入全局配置模式router(config)#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地址router(config-if)#ip address second 设置第二个IProuter(config-if)#int f0/0.1 进入子接口router(config-subif.1)#ip address 设置子接口IProuter(config-subif.1)#encapsulation dot1q 绑定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: flash: 从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 指定下载的文件rommon>tftpdnld 从tftp下载rommon>dir flash: 查看闪存内容rommon>boot 引导IOS静态路由:ip route 命令格式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路由协议。
交换机支持的命令:交换机基本状态switch 路由器是rommon>hostname> 用户模式 hostname# 特权模式hostname(config)# 全局配置模式hostname(config-if)# 接口状态交换机口令设置:switch>enable 进入特权模式switch#config terminal 进入全局配置模式switch(config)#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 设置vtp域名switch(config)#vtp password 设置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地址switch(config)#ip default-gateway 设置默认网关switch#dir flash: 查看闪存交换机显示命令:switch#write 保存配置信息switch#show vtp 查看vtp配置信息switch#show run 查看当前配置信息switch#show vlan 查看vlan配置信息switch#show interface 查看端口信息switch#show int f0/0 查看指定端口信息路由器支持的命令:路由器显示命令:router#show run 显示配置信息\router#show interface 显示接口信息router#show ip route 显示路由信息router#show cdp nei 显示邻居信息router#reload重新起动路由器口令设置:router>enable 进入特权模式router#config terminal 进入全局配置模式router(config)#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地址router(config-if)#ip address second 设置第二个IProuter(config-if)#int f0/0.1 进入子接口router(config-subif.1)#ip address 设置子接口IProuter(config-subif.1)#encapsulation dot1q 绑定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: flash: 从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 指定下载的文件rommon>tftpdnld 从tftp下载rommon>dir flash: 查看闪存内容rommon>boot 引导IOS静态路由:ip route 命令格式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路由协议。
router(config-router)#network 设置发布路由router(config-router)#negihbor 点对点帧中继用。
帧中继命令:router(config)#frame-relay switching 使能帧中继交换router(config-s0)#encapsulation frame-relay 使能帧中继router(config-s0)#fram-relay lmi-type cisco 设置管理类型router(config-s0)#frame-relay intf-type DCE 设置为DCErouter(config-s0)#frame-relay dlci 16router(config-s0)#frame-relay local-dlci 20 设置虚电路号router(config-s0)#frame-relay interface-dlci 16router(config)#log-adjacency-changes 记录邻接变化router(config)#int s0/0.1 point-to-point 设置子接口点对点router#show frame pvc 显示永久虚电路router#show frame map 显示映射基本访问控制列表:router(config)#access-list permit|denyrouter(config)#interfacedefault:deny anyrouter(config-if)#ip access-group in|outdefault:out例1:router(config)#access-list 4 permit 10.8.1.1router(config)#access-list 4 deny 10.8.1.0 0.0.0.255router(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.255router(config)#access-list 4 permit anyrouter(config)#int f0/0router(config-if)#ip access-group 4 in扩展访问控制列表:access-list permit|deny icmp <DESTINATIONIPwild>[type]access-list permit|deny tcp <DESTINATIONIPwild>[port]例3:router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echorouter(config)#access-list 101 permit ip any any router(config)#int s0/0 router(config-if)#ip access-group 101 in例3: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 anyrouter(config)#interface s0/1router(config-if)#ip access-group 102 out删除访问控制例表:router(config)#no access-list 102router(config-if)#no ip access-group 101 in 路由器的nat配置Router(config-if)#ip nat inside 当前接口指定为内部接口Router(config-if)#ip nat outside 当前接口指定为外部接口Router(config)#ip nat inside source static [p] <私有IP><公网IP> [port] Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80 Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0Router(config)#ip nat inside source list 1 pool p1Router(config)#ip nat inside destination list 2 pool p2Router(config)#ip nat inside source list 2 interface s0/0 overloadRouter(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary Router#show ip nat translationrotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。