已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
CCNA配置命令大全RAM/DRAM保存路由表,各种cache以及运行配置文件;其中共享RAM用于数据包的缓冲;掉电后内容丢失。NVRAM保存配置文件;掉电后内容不丢失。Flash可擦洗、可编程ROM;保存IOS,升级方便;掉电后内容不丢失;多个IOS的拷贝可保存于其中。ROM保存开机自检、引导程序;及一个IOS。可通过换芯片方法升级。Interfaces数据包进出路由器的接口。Interfaces在母板上或在独立的接口模块上。1、 进入SETUP模式Router#setup2、 时间设置router#clock set hh:mm:ss date moth year3、 routershow history Routerterminal history size lines 4、 router#show version5、 router#show running-config6、 router#show startup-config7、 router(config)#hostname name主机命名8、 router(config)#banner motd # message #开机时的固定显示信息9、 router(config)#enable password password 特权模式明文密码10、 router(config)#no enable password11、 router(config)#enable secret password 特权模式加密密码12、 router(config)#no enable secret13、 router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret安全可以反解14、 router(config)#line console控制台密码15、 router(config-line)#login16、 router(config-line)#password password17、 router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出18、 router(config-line)#logging synchronous重显被打乱的控制台输入 router(config)#no ip domain-lookup 禁止域名解析19、 router(config)#line vty 0 4虚拟终端密码20、 router(config-line)#login21、 router(config-line)#password password22、 router(config)#interface type number(slot/port)端口设置23、 router(config-if)#ip address ip summast24、 router(config-if)#clock rate 64000(时钟频率单位为bps,只在DCE端设置)25、 router(config-if)#bandwith 64(带宽设置,单位为KB)26、 router(config-if)#no shutdown(shutdown)27、 router(config-if )#media-type type(10base) 为以太网端口选择适当的介质类型28、 router(config-if )#ctrl+z保存退出到特权模式29、 router#30、 router用户模式enable进入 router#特权模式config terminal进入 router(config)#全局配置模式31、 Interface Router(config-if)#端口设置 Subinterface Router(config-subif)# 子端口设置 Controller Router(config-controller)# 控制口设置 Line Router(config-line)# 虚拟口设置 Router Router(config-router)# 路由设置 IPX router Router(config-ipx-router)#IPX路由设置32、 router#show interface33、 router#show interface Ethernet 034、 router#show interface serial 035、 router#show running-config36、 router#show starup-config37、 router#show flash38、 router#show controller39、 router#show controller interface type40、 router#show running-config router#copy running-config starup-config router#copy running-config tftp router#copy starup-config tftp router#copy flash tftp router#copy tftp star-config router#copy tftp flash端口状态Serial1 is up, line protocol is up正常工作Serial1 is up, line protocol is down连接问题Serial1 is down, line protocol is down端口问题Serial1 is administratively down, line protocol is down人为关闭配置寄存器的值 1、 关闭路由器的电源重新启动按住ctrl+break键入进2、 3、 o/r 0x2142(跳过nvarm启动恢复密码) 4、 I 5、 当系统提示是否进入setup模式时,按N 6、 router 7、 routerenable 8、 router# 9、进入修改后(包括密码、寄存器的值:0x2100为rom monitor启动、0x2101为setup模式启动、0x2102为 10、 router#copy running-config starup-config 11、 router#reload 12、 也可以在router#setup进入setup模式静态路由协议设置 router(config)#ip route network submask(要到达的网络号掩码)ip address(下一跳或出口ip地址) router(config)#ip route s0(出口端口或下一跳IP地址)rip设置 router(config)#router rip router(config-router)#network network-number router#show ip protocol查看RIP信息 router#show ip route 查看路由表 router#debug ip rip查看RIP更新信息 router(config-router)#passive-interface e0(阻止发出作息) router(config-router)#ip rip receive version 1 2接收1、2RIP版本信息igrp设置 router(config)#router igrp as number router(config-router)#network network number router#show ip route查看路由表 router#debug ip igrp events查看IGRP路由更新大概信息 router#debug ip igrp transaction查看IGRP路由更新详细信息 Router(config-router)#variance multiplier 控制 IGRP load balancing Router(config-router)#traffic-share balanced | min控制load-balanced traffic 的分布eigrp设置 router(config)#router eigrp as number router(config-router)#network network number router(config)#no auto-summry 关闭自动汇总 router(config)# auto-summry 打开自动汇总(默认是打开的) router#show ip route eigrp 显示当前的路由表里的EIGRP条目 router#show ip protocol 显示活动的路由协议进程的参数和当前的状态 router#show ip eigrp neighbors 显示被EIGRP发现的邻居 router#show ip eigrp traffic 显示发出和收到的IP EIGRP 包的数量 router#show ip eigrp topology 显示IP EIGRP的拓扑表 Router#debug ip eigrpospf设置 1. Router(config)#router ospf process-id Router(config-router)#network address(可以是网络号也可以是Ip地址) mask(通配掩码 )area area-id Router(config-if)# ip ospf priority numbe 配置OSPF的优先级 Router#show ip protocols 验证OSPF的配置 Router#show ip route 显示路由器学到的所有路由 Router#show ip ospf interface type number 显示 area-ID 和邻接信息 Router#show ip ospf neighbor 基于每接口显示OSPF邻居信息 Router#debug ip ospf events Router#debug ip ospf packet 2. Router(config)# interface loopback number(lookback回路配置) Router(config-if)# ip address ip-address subnet-mask Router(config-if)# ip ospf cost cost-numbe 修改OSPF 的Cost数值 Router(config-if)# ip ospf authentication-key key 配置明文口令 Router(config-if)# ip ospf messge-digest-key keyid md5 key 配置MD5口令 (keyid和key必须配对一致,两邻居才可以通信) Router(config-route)# area area-id authentication message-digestmessage-digest为可选项,使用后路由器只传送口令消息的摘要(或散列) 配置OSPF区域的验证: 3. Router(config-if)# ip ospf hello-interval seconds 配置hello间隔: Router(config-if)# ip ospf dead-interval seconds配置down机判断间隔访问列表1.标准访问列表(standard access lists):只使用源IP地址来做过滤决定 Router(config)#access-list 10 deny 55Router(config)#access-list 10 permit any Router(config)#int e1Router(config-if)#ip access-group 10 ou使用IP标准ACL来控制VTY线路的访问. Router(config)#access-list 50 permit Router(config)#line vty 0 4Router(config-line)#access-class 50 in 删除IP标准ACL Router(config-line)#no ip access-class 50 in Router(config)#no access-list 50 2.扩展访问列表(extended access lists):它比较源IP地址和目标IP地址,层3的协议字段,层4端口号 来做过滤决定Router(config)#access-list 110 deny tcp any host eq 21Router(config)#access-list 110 deny tcp any host eq 23Router(config)#access-list 110 permit ip any anyRouter(config)#int e1Router(config-if)#ip access-group 110 out 3.虚拟通道访问router(config)#access-list 12 permit 55 router(config)#line vty 0 4 outer(config-line)#access-class 12 in3.show ip interface:只显示IP访问列表信息4.show ip interface:显示所有接口的信息和配置的ACL信息5.show ip interface 接口号:显示具体某个接口的信息和配置的ACL信息6.show running-config:显示DRAM信息和ACL信息,以及接口对ACL的应用信息.交换机配置 交换机上设置登陆口令 Switch(config)# enable password level level password Switch(config)# no enable password level level password hostname 1900/2900(config)#hostname hostname IP Address 1900(config)#ip address ip address mask 1900(config)#ip address 1 2950(config#interface vlan 1 2950(config-if)#ip address ip_address mask 2950(config)#interface vlan 1 2950(config-if)#ip address 1 default gateway 1900/2950(config)#ip default-gateway ip address 1900/2950(config)#ip default-gateway 查看交换机的IP地址 1900#show ip IP address: 1 Subnet mask: Default gateway: Management VLAN: 1 2950#show interface vlan 1 Vlan1 is up, line protocol is up Hardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia 0010.f6a9.9800) Internet address is 9/24 Broadcast address is 55 设置双工选项 1900(config)#interface e0/1 1900(config-if)#duplex auto | full |full-flow-control | half 2950(config)#interface fe0/1 2950(config-if)#duplex auto | full | half 设置端口速度:switch(config-if)# speed 10|100|auto 查勘双工选项 Switch#show interfaces fastethernet0/3 查看MAC地址表 1900/2950#show mac-address-table 配置永久MAC地址 1900(config)#mac-address-table permanent mac-address type module/port 1900(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/3 1900#show mac-address-table 2950(config)#mac-address-table static mac_addr vlan vlan_id interface int1 int2 . int15 配置受限静态MAC地址 1900(config)#mac-address-table restricted static mac-address type module/port src-if-list 1900(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/1 1900#show mac-address-table 2950(config)#mac-address-table secure mac-addr interface vlan vlan-id 2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 1 2950#show mac-address-table 配置端口安全性 1900(config-if)#port secure max-mac-count count 1900(config)#interface e0/4 1900(config-if)#port secure 1900(config-if)#port secure max-mac-count 1 1900(config)#address-violation suspend | disable | ignore 1900# show mac-address-table security 2950(config-if)#port security max-mac-count count 2950(config)#interface fa0/1 2950(config-if)#port security 2950(config-if)#port security max-mac-count 10 2950(config-if)#port security action shutdown | trap 2950#show mac-address-table secure 2950#show port-security 管理配置文件 1900#copy nvram tftp:/host/dst_file 1900#copy tftp:/host/src_file nvram 1950#copy nvram t/wgswd.cfg 2950#copy startup-config tftp:/host/dst_file 清除 NVRAM 1900#delete nvram 2950#erase startup-config vlan配置 1900 VLAN建立1900下,使用vlan vlan# name name vlan#命令, 如下:en#config t(config)#hostname 19001900(config)#vlan 2 name sales1900(config)#vlan 3 name marketing1900(config)#vlan 4 name mis1900(config)#exit 端口分配1900(config)#int e0/21900(config-if)#vlan-membership static 21900(config)#int e0/41900(config-if)#vlan-membership static 31900(config)#int e0/51900(config-if)#vlan-membership static 41900(config-if)#exit1900(config)#exit VLAN验证 1900#sh vlan 2900 VLAN建立 在2950下创建VLAN,在特权模式下使用vlan database命令2950#vlan database2950(vlan)#vlan 2 name Marketing VLAN 2 modified: Name: Marketing2950(vlan)#vlan 3 name Accounting VLAN 3 added: Name: Accounting2950(vlan)#apply APPLY complete2950(vlan)#Ctrl+C2950# 端口分配 2950下的端口配置,使用switchport access vlan vlan#命令,2950(config-if)#int f0/22950(config-if)#switchport access vlan 22950(config-if)#int f0/32950(config-if)#switchport access vlan 32950(config-if)#int f0/42950(config-if)#switchport access vlan 42950(config-if)#exit2950(config)#exit验证配置信息,如下:2950#sh vlan或2950#sh vlan brief trunk配置 1900trunk配置1900(config)#int f0/261900(config-if)#trunk on2950下在接口配置模式,使用switchport命令,如下:2950(config)#int f0/122950(config-if)#switchport mode trunk 2950(config-if)# switchport trunk encapsulation isl|dot1q2950(config-if)#Z 将某VLAN从中继中删除 2950(config-if)# switchport trunk allowed vlan remove vlan-list 添加某个VLAN到中继线路 2950(config-if)# switchport trunk allowed vlan add vlan-list Configuring Inter-VLAN Routing给连接1900的trunk端口配置,使用encapsulation isl vlan#命令,如下:2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation isl vlan# 2600Router(config-subif)#ip add ip add submask 给连接2950的这样配置,如下:2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation dot1q vlan# 2600Router(config-subif)#ip add ip add submask VTP配置1900(config)#vtp server1900(config)#vtp domain noco1900(config)#vtp password noko在特权模式下使用show vtp命令验证,如下:1900#sh vtp VTP version: 1 Configuration revision: 0 Maximum VLANs supported locally: 1005 Number of existing VLANs: 5 VTP domain name: noco VTP password: noko VTP operating mode: Server 2950如下:
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年计算机职称考试试题库及答案
- 新人教版七年级语文上册第二单元 写作 学会记事 公开课一等奖创新教案(表格式)
- 青少年社工笔试题及答案
- 钳工辅修面试题目及答案
- 萍乡医院笔试题及答案
- 全身状态及头颈
- 小学音乐教学中奥尔夫教学法与审美能力培养的相关性研究课题报告教学研究课题报告
- 数智广告文案创作- 课件 第三章 广告文案创作的互文性与文化资源
- 胰岛素的规范注射
- 2025年历史文化街区的知识产权保护模式
- revit土建培训课件
- 狱政业务考试试题及答案
- 电牵引采煤机说明书改动样本
- 2025年军队专业技能岗位文职人员招聘考试(文化装备管理员)历年参考题库含答案详解(5卷)
- 绵阳中科绵投环境服务有限公司绵阳市餐厨废弃物资源化利用和无害化处理扩建项目(重新报批)环评报告
- TensorFlow2深度学习实战(第2版)(微课版)-教学大纲
- 仓库混料管理办法
- 农村自来水试题及答案
- 热费催缴管理办法
- 中药材适宜品种全程机械化生产模式与典型案例
- 2025年四川遂宁初中学业水平考试地理试卷真题(含答案详解)
评论
0/150
提交评论