CCNA试验考试命令总结.doc_第1页
CCNA试验考试命令总结.doc_第2页
CCNA试验考试命令总结.doc_第3页
CCNA试验考试命令总结.doc_第4页
CCNA试验考试命令总结.doc_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

CCNA试验考试命令总结 回复:25 阅读:10282008-12-03 19:04:13 CCNA试验考试命令总结 路由器实验:router enable从用户模式进入特权模式router# disable or exit从特权模式退出到用户模式router# show sessions查看本机上的TELNET会话 router# disconnect关闭所有的TELNET会话router# show users查看本机上的用户router# erase startup-config删除NVRAM中的配置router# reload重启路由器 router# config terminal从用户模式进入特权模式router(config)# hostname rl配置用户名为rlrouter(config)# #banner welcome# 配置开机话语router# show controllers serial0 查看串口0的物理层信息,主要是查看DTE/DCErouter# show ip interface查看端口的IP配置信息router# show hosts查看主机表end or ctrl+z从各种配置模式退到特权模式rl(config)# no ip domain-lookup 关闭动态域名解析rl(config)# ip domain-lookup打开动态域名解析rl(config)# ip name-server 0打开动态域名解析之后便可以指定DNS服务rl(config)# interface serial 0进入serial 0的接口配置模式rl(config-if)# no shutdown路由器出厂默认所有端口关闭,使用此命令使它们打开rl(config-if)# encapsulation ppp 封装ppprl(config-if)# clockrate 64000如果是DCE使需要设置时钟速率,如果是DTE就不必设置rl(config-if)# bandwidth 64 设置端口带宽为64Krl(config-if)# ctrl+c 或者ctrl+z 快捷键退出到特权模式rl# show interface serial 0 查看s0信息,如果看到serial和line protocol都显示up,说明链路两端都设置成功,注意:如果出现serial down, line down 可能对方的端口没有打开;no shutdown 或者电缆没有插好;如果出现serial up, line down 可能是DCE端没有设置clock rate, 也可能是封装格式不对rl# show cdp neighbors查看CDP邻居信息rl(config-if)# ip add 进入相应的接口,配置相应的IP地址rl# ping 使用ping命令查看邻居的连通性rl# show ip route 查看路由表,可以看到以C打头的路由信息,这是直连的路由信息; 可以看到R开头的路由信息,是从rip学来的路由信息;可看到以I 开头的路由信息取代了以R开头的路由信息,这是因为igrp的管理距离是100,小于rip的120rl(config-if)# router rip 启动RIP路由协议rl(config-router)# network 发布网段。注意network后面是接的网络号,而不是IP地址rl# show ip protocol查看配置的路由协议rl(config)# router igrp 300 一定要注意在IGRP后面加自治系统号考试的时候题目会告诉你AS NUMBER,照敲就是rl(config-router)# network rl(config)# line vty0 4 进入虚拟线程配置模式,在这个模式里可对telnet功能进行配置rl(config-line)# loginrl(config-line)# password cisco配置telnet密码,默认的网络设备telnet的功能是关闭的,配了密码之后会自动打开rl(config)# enable password cisco 配置进入enable模式的密码, 区分大小写rl(config)# enable secret ciscocisco配置进入enable模式的密码,是加密的密码,show run是看不见的rl(config)# line console 0rl(config-line)# loginrl(config-line)# password cisco 配置进入用户模式的密码rl(config-line)# logging synchronous输入同步rl(config-line)# exec-timeout 0 0禁止因为一段时间没有输入而跳出rl# copy running-config startup-config保存配置,考试的时候注意题目的要求,如果题目里要求你保存配置就一定不能少了这一项r1# copy tftp startup-configr1# copy running-config tftpr1# copy tftp flash交换机实验:switch(config)# ip address 77 与路由器在接口上的配置IP不同,交换机是在全局配置模式配置switch(config)# ip default-gateway 给交换机配置一个缺省网关,请注意,不用写掩码switch(config)# vlan2 name cisco配置一个vlan2并且指定名字叫CISCOswitch# show interfaces查看端口状态switch(config)# interface e0/10进入端口e0/10switch(config-if)# vlan-membership static 2 将端口放进vlan2里面switch(config)# int f0/26 进入快速以太网端口f0/26switch(config-if)# trunk on 启用trunk,注意:只能在百兆以上端口启用trunkswitch(config-if)# notrunk-vlan 51 52在主干上关闭VLAN51、52的传输路由器的IP配置:Router(config-if)#ip address+ip地址+子网掩码Router#terminal ip netmask-format (bit-count | decimal | hexadecimal)Router(config)#ip host +主机名+ip地址 ip地址Router(config)#ip domain-name +域名Router(config)#ip name-server +DNSserver的IP地址Router(config)#(no) IP domain-lookupRouter(config)#show hosts配置静态路由:Router(config)#ip route 目的网络+掩码 下一跳address | 本地接口 distance permanentRouter#show ip route配置缺省路由:Router(config)#ip route 下一跳address | 本地接口 distance permanentRouter(config)#ip classlessRouter(config)#no ip classless配置VLAN间路由:Router(config-if)#interface fa0/0.1Router(config-subif)#encapsulation isl +vlan编号配置RIP:Router(config)#router ripRouter(config-router)#network +自然网络号Router#show ip protocolsRouter#show ip routeRouter#(no ) debug ip ripRouter(config-router)#maximum-paths <1-6>配置IGRP:Router(config)#router igrp +自治系统编号Router(config-router)#network +自然网络号Router#(no ) debug ip igrp transactionsRouter#(no) debug ip igrp eventsRouter(config-router)#traffic-share share | minRouter(config-router)#variance +容差Router(config-router)#maximum-paths <1-6>配置标准ACL:Router(config)#access-list +编号 permint | deny 源地址 翻转掩码Router(config-if)#ip access-group +编号 in | outRouter#show access-list 编号Router#show ip interface +接口名称配置扩展ACL:Router(config)#access-list 编号 permit | deny protocol source source-mask operator port destination destination-mask operator port Router(config-if)#ip access-group 编号 in |out配置named ACL:Router(config)# ip access-list standard | extended nameRouter(config std-|ext-nacl)# (no) permit |deny +测试条件Router(config-if)#ip access-group in | out配置ACL控制VTY的访问:Router(config)#line vty 0 4Router(config-line)#access-class access-list-number in | out配置Novell路由:Router(config)#ipx routingRouter(config-if)# ipx network 网络号 encapsulation +封装类型配置Novell封装:Router(config-subif)# ipx network 网络号 encapsulation +封装类型Router(config-if)# ipx network 网络号 encapsulation +封装类型 secondary配置Novell的标准ACL:Router(config)#access-list 编号 perming | deny 源网络号 节点地址 节点掩码 目的网络号 节点地址 节点掩码Router(config-if)#ipx access-group 编号 in | out配置Novell的扩展ACL:Router(config)#access-list 编号 permit | deny protocol 源网络号 节点号 掩码 源socket 目的网络号 节点号 掩码查看IPX的命令Router#show ipx interfaceRouter# show ipx routeRouter#show ipx serversRouter#show ipx trafficRouter#debug ipx routing activityRouter#debug ipx sapRouter#ping ipx +IPX地址PPP的配置:1. 封装pppRouter(config-if)#encapsulation ppp2. 配置主机明、用户名和密码Router(config)#hostname +主机名Router(conifg)#username +用户名 password +密码3. 选择一种验证方式:Router(config-if)#ppp authentication chap | chap pap | pap chap | papISDN的配置:Router(config)#isdn switch-type +交换机类型Router(config)#interface bri0 +接口编号Router(config-if)#isdn spid1 spid号码 本地目录号码Router(config-if)#isdn spid2 spid号码 本地目录号码DDR的配置:1. 配置静态路由:2. 定义敏感数据:? 不使用ACL:Router(config)#dialer-list 编号 protocol +某个协议 permit | deny ? 使用ACL:Router(config)#dialer-list 编号 protocol +某个协议 list +ACL编号3. 配置拨号信息:Router(config-if)#ip address +IP地址+子网掩码Router(config-if)#dialer-list 编号Router(config-if)#dialer map protocol 下一跳路由器地址 name 远端路友器的主机名 speed 56 | 64 broadcast +拨号字符串4. 可选配置:? 动态器用第二条链路:Router(config-if)#dialer load-threshold load outbound | inbound | either? 配置超时:Router(config-if)#dialer idle-timeout seconds配置帧中继:1. 配置接口的地址、封装类型Router(config-if)#encapsulation frame-relay cisco | ietf2. 配置LMI类型:(可选)Router(config-if)#frame-relay lmi-type ansi | cisco | q933a3. 配置逻辑带宽:Router(config-if)#bandwidth +带宽4. 配置映射:? 静态映射:Router(config-if)#frame-relay map protocol 地址 dlci编号 broadcast cisco | ietf? 动态映射:(缺省)Router(config-if)#frame-relay inverse-arp protocol dici编号帧中继的监控和管理:Router#show interfaceRouter#show frame-relay lmiRouter#show frame-relay pvcRouter#show frame-relay mapRouter#clear frame-relay-inarpRouter#debug frame-relay lmi交换机的配置:Switch#show versionSwitch#show running-configSwitch(config)#hostname +交换机主机名Switch#show ipSwitch#show spantreeSwitch#show interface交换机的双工配置:Switch(config-if)#duplex+双工配置交换机的IP配置:Switch(config)#ip address+ip地址+子网掩码Switch(config)#ip default-gateway+ip地址交换机MAC地址表的配置Switch(config)#mac-address-table permanent +MAC地址+对应的端口Switch(config)#mac-address-table restricted static +MAC地址+对应的端口+允许访问该端口的源端口Switch(config)#show mac-address-tableSwitch(config-if)#port secure max-mac-count +该端口最大课学习的MAC地址数Switch(config)#address-violation (suspend / disable /ignore)Switch#show mac-address-table security交换机配置文件的备份和恢复:Switch#copy nvram tftp:/tftp的IP地址/配置文件名Switch#copy tftp:/ tftp的IP地址/配置文件名 nvramVLAN的配置:1 配置VTP:Switch(config)#vtp server | client | transparent domain +VTP域名 trap (enable | disable) password +密码 pruning (enable | disable) 2 配置干道链路:Switch(config-if)#trunk on | off | desirable | auto |nonnegotiateSwitch#show trunk A | B3 创建和修改VLANSwitch(config)#vlan +vlan编号 name+VLAN名称Swtich#show vlan VLAN编号4 将某个端口加入到某个VLANSwitch(config-if)# vlan-membership static(vlan编号) | dynamicSwitch#show vlan-membership 查看互换机支持的命令:路由器hostname(config)# ;全局配备布置模式hostname(config-if)# ;接口状况switchenable ;进入特权模式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#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 2switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtpswitch(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 ;查看指定端口信息 2. 路由器支持的命令:路由器显示命令:router#show run ;显示配备布置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#showrouter#reload ;重新起动路由器口令设置:routerenable ;进入特权模式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监控状况rommonconfreg 0x2142 ;跳过配备布置文件rommonconfreg 0x2102 ;恢复配备布置文件rommonreset ;重新指导rommoncopy xmodem: flash: ;从console传道输送文件rommonIP_ADDRESS= ;设置路由器IPrommonIP_SUBNET_MASK= ;设置路由器掩码rommonIPrommonTFTP_FILE=c2600.bin ;指定下载的文件rommontftpdnld ;从tftp下载rommondir flash: ;查看闪存内容rommonboot ;指导IOS静态路由:ip route ;命令格式router(config)#ip route ;静态路由举例router(config)#ip route ;默认路由举例动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动RIP路由和谈router(config-router)#network ;设置公布路由router(config-router)#negihbor ;点对点帧中继用帧中继命令:router(config)#frame-relay switc你好ng ;使能帧中继互换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 16 ;router(config-s0)#frame-relay local-dlci 20 ;设置虚电路号router(config-s0)#frame-relay interface-dlci 16 ;router(config)#log-adjacency-changes ;记载邻接变化router(config)#int s0/0.1 point-to-point ;设置子接口点对点router#show frame pvc ;显示永久虚电路router#show frame map ;显示照射基本拜候节制列表:router(config)#access-list permit|denyrouter(config)#interface ;default:deny anyrouter(config-if)#ip access-group in|out ;defaultut例1:router(config)#access-list 4 permit router(config)#access-list 4 deny 55router(config)#access-list 4 permit 55router(config)#access-list 4 deny 55router(config)#access-list 4 permit anyrouter(config)#int f0/0router(config-if)#ip access-group 4 in扩大拜候节制列表:access-list permit|deny icmp typeaccess-list permit|deny tcp port例3:router(config)#access-list 101 deny icmp any echorouter(config)#access-list 101 permit ip any anyrouter(config)#int s0/0router(config-if)#ip access-group 101 in例3:router(config)#access-list 102 deny tcp any eq 80router(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 portRouter(config)#ip nat inside source static Router(config)#ip nat inside source static tcp 80 80Router(config)#ip nat pool p1 0 Router(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 type rotaryRouter#show ip nat translationrotary 参量是轮流的意思,地址池中的IP轮流与NAT分配的地址

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论