- 论坛徽章:
- 0
|
CCNA考试常用命令<br /><br />no ip domain<br />no ip domain-lookup<br />lin con 0<br />no exec-timeout 0 0<br />ip route IP 掩码 目的地址<br />破解密码:<br />o/r 0x2142<br />copy running-config startup-config<br />configure terminal <br />enable password<br />config-register 0x2102<br />end<br />copy running-config startup-config<br />reload<br />sh ip int bed sta<br />configure terminal<br />interface serial 0<br />ip add 192.168.56.6 255.255.255.0<br />clock rate 64000<br />路由器实验:<br /> router> enable 从用户模式进入特权模式<br /> router# disable or exit 从特权模式退出到用户模式<br /> router# show sessions 查看本机上的TELNET会话<br /> router# disconnect 关闭所有的TELNET会话<br /> router# show users 查看本机上的用户<br /> router# erase startup-config 删除NVRAM中的配置<br /> router# reload 重启路由器<br /> router# config terminal 从用户模式进入特权模式<br /> router(config)# hostname rl 配置用户名为rl <br /> router(config)# #banner welcome# 配置开机话语<br /> router# show controllers serial0 查看串口0的物理层信息(主要是查看DTE/DCE)<br /> router# show ip interface 查看端口的IP配置信息<br /> router# show hosts 查看主机表<br /> end or ctrl+z 从各种配置模式退到特权模式<br /> rl(config)# no ip domain-lookup 关闭动态域名解析<br /> rl(config)# ip domain-lookup 打开动态域名解析<br /> rl(config)# ip name-server 202.106.0.20 打开动态域名解析之后便可以指定DNS服务<br /> rl(config)# interface serial 0 进入serial 0的接口配置模式<br /> rl(config-if)# no shutdown 路由器出厂默认所有端口关闭,使用此命令使它们打开<br /> rl(config-if)# encapsulation ppp 封装ppp <br /> rl(config-if)# clockrate 64000 如果是DCE使需要设置时钟速率,如果是DTE使不必<br /> 设置<br /> rl(config-if)# bandwidth 64 设置端口带宽为64K <br /> rl(config-if)# ctrl+c 或者ctrl+z 快捷键退出到特权模式<br /> rl# show interface serial 0 查看s0信息,如果看到serial和 line protocol都显<br /> 示up,说明链路两端都设置成功<br /> <br /> 注意:如果出现serial down, line down 可能对方的端口没有打no shutdown或者电缆没有插好;如果出现serial up, line down 可能是DCE端没有设置clock rate, 也可能是封装格式不对<br /> rl# show cdp neighbors 查看CDP邻居信息<br /> rl# show cdp entry * <br /> rl(config-if)# ip add 10.0.0.1 255.0.0.0 进入相应的接口,配置相应的IP地址<br /> rl# ping 10.0.0.2 使用ping命令查看邻居的连通性<br /> rl# show ip route 查看路由表,可以看到以C打头的路由 信息,这是直连的路由信息;<br /> 可以看到 R开头的路由信息,是从rip学来的路由 信息;可看到以<br /> I开头的路由信息取代 了以R开头的路由信息,这是因为igrp 的管<br /> 理距离是100,小于rip的120 <br /> rl(config-if)# router rip 启动RIP路由协议<br /> rl(config-router)# network 10.0.0.0 发布网段(注意network后面是接的网络号而<br /> 不是IP地址)<br /> rl# show ip protocol 查看配置的路由协议<br /> rl(config)# router igrp 300 一定要注意在IGRP后面加自治系统号,考试的时候题目<br /> 会告诉你AS NUMBER, 照敲就是<br /> rl(config-router)# network 10.0.0.0 <br /> rl(config)# line vty0 4 进入虚拟线程配置模式,在此模式可对telnet功能进行配置<br /> rl(config-line)# login <br /> rl(config-line)# password cisco 配置telnet密码,默认的网络设备 telnet的 功能<br /> 是关闭的,配了密码之后会自动打开<br /> rl(config)# enable password cisco 配置进入enable模式的密码, 区分大小写<br /> rl(config)# enable secret ciscocisco 配置进入enable模式的密码,是加密的密码,<br /> show run是看不见的<br /> rl(config)# line console 0 <br /> rl(config-line)# login <br /> rl(config-line)# password cisco 配置进入用户模式的密码<br /> rl(config-line)# logging synchronous 输入同步<br /> rl(config-line)# exec-timeout 0 0 禁止因为一段时间没有输入而跳出<br /> rl# copy running-config startup-config 保存配置,考试的时候注意题目的要求,<br /> 如果题目里要求你保存配置就一定不能少<br /> 了这一项<br /> r1# copy tftp startup-config <br /> r1# copy running-config tftp <br /> r1# copy tftp flash <br /> 交换机实验:<br /> switch(config)# ip address 192.168.0.177 255.255.255.0 与路由器在接口上的配置<br /> IP不同,交换机是在全局配<br /> 置模式配置<br /> switch(config)# ip default-gateway 192.158.0.1 给交换机配置一个缺省网关,请注<br /> 意,不用写掩码<br /> switch(config)# vlan2 name cisco 配置一个vlan2并且指定名字叫CISCO <br /> switch# show interfaces 查看端口状态<br /> switch(config)# interface e0/10 进入端口e0/10 <br /> switch(config-if)# vlan-membership static 2 将端口放进vlan2里面<br /> switch(config)# int f0/26 进入快速以太网端口f0/26 <br /> switch(config-if)# trunk on 启用trunk,注意:只能在百兆以上端口启用trunk <br /> switch(config-if)# notrunk-vlan 51 52 在主干上关闭VLAN51、52的传输<br />CCNA常用命令2007/09/09 11:11 A.M.R1路由器初始化配置:<br />router(config)#hostname r1 //给路由器启名字<br />r1(config)#int s0<br />r1(config-if)#ip address 100.1.16.1 255.255.255.0 //设置ip地址<br />r1(config-if)#enc frame-relay //封装帧中继<br />r1(config-if)#frame-relay map ip 100.1.16.6 116 broadcast //映射对方的ip地址<br />r1(config-if)#no shutdown //打开接口<br />R6初始化配置:<br />router(config)#host r6 //给路由器启名字<br />r6(config)#int s0<br />r6(config-if)#ip address 100.1.16.6 255.255.255.0 //设置ip地址<br />r6(config-if)#enc frame-relay //封装帧中继<br />r6(config-if)#frame-relay map ip 100.1.16.1 611 broadcast //映射对方的ip地址<br />r6(config-if)#no shutdown //打开接口<br />检验配置是否正确:<br />r1#show frame-relay map 看是否有active的<br />r1#show frame-relay pvc 检查pvc的状态<br />或者ping 对方的接口地址看看能否ping通<br />路由协议rip/eigrp/ospf 配置命令:<br />router(config)#router rip //启用rip协议<br />router(config-router)#net 100.1.0.0 //将接口网络放到协议中,接口应该是up的。<br />router(config)#router ospf 10 //启用ospf 进程号码任意数<br />router(config-router)#network 100.1.0.0 0.0.255.255 area 0 //将网络100.1.0.0 放到区域0中<br />router(config)#router eigrp 10 //启用eigrp协议<br />router(config-router)#net 100.1.0.0 //将接口网络放到协议中,接口应该是up的<br />检查是否学到路由:<br />show ip route <br />其他常用命令:<br />router(config-if)#clock rate 64000 //在dce接口上启用时钟<br />router(config)#line con 0<br />router(config-line)#logging syn //打开同步功能,阻止log干扰命令 |
|