Cisco培训从入门到精通_第1页
Cisco培训从入门到精通_第2页
Cisco培训从入门到精通_第3页
Cisco培训从入门到精通_第4页
Cisco培训从入门到精通_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

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

文档简介

1、一、如何登陆到路由器可以用终端通过console连接,也可以通过TCP/IP来连接例:c:>telnet Password:YourpassRouterName>?#显示在用户模式下面所有可用的命令,回车隔行翻动、空格满屏翻动#RouterName>q#q或exit都可以直接退出用户模式,返还到Dos界面#RouterName>enable#从用户模式跳转到特权模式,如果有密码认证就必须输入密码才能进入#RouterName#q或exit都可以直接退出特权模式,返还到Dos界面,输入disable可以退回到用户模式#RouterName#config

2、#跳转到配置模式#RouterName(config)#interface fastethernet 0/0#配置快速以太网接口模式#RouterName(config)#interface serial 0/0#配置串口模式#RouterName(config-if)#?#输入问号查看相应命令#RouterName(config-if)#encapsulation ?#显示串口的封装类型,输入exit可退出接口或以太口配式模式#RouterName(config)#exit#输入exit可退出配置模式,再输入exit可退出路由器#二、设置路由器时钟RouterName#cl?#可以查看路由器

3、下以CL开头的所有命令#RouterName#clock ?#可以查看clock的所有参数#RouterName#clock set hh:mm:ss mouth mouth yearRouterName#show clock#查看目前系统时钟#三、系统编辑模式RouterName#terminal editing#打开系统编辑模式#RouterName#terminal no editing#关闭系统编辑模式#Ctrl+a#移动光标到开头处#Ctrl+e#移动光标到尾部#Ctrl+f#向前移动光标#Ctrl+b#向后移动光标#Ctrl+p#翻动历史命令记录#RouterName#show h

4、istory#显示所有记录的历史命令#RouterName#terminal history size ?#修改缓存中最大的命令记录条数,一般最大为256条#RouterName#show terminal#查看terminal状况#RouterName#show star或show run#显示所有配置信息,可以使用Tab键显示出完整命令#如show startup-config或show running-config#四、如何储存路由器的配置路由器里面有两种RAM:1.NVRAM冷启动的存储配置引导2.RAM目前工作中的配置内容RouterName#copy running-config

5、startup-configRouterName#wr#拷贝RAM里面的配置到NVRAM中#RouterName#erase start#擦除NVRAM中的配置#RouterName#reload#重启路由器#五、如何设置路由器的密码RouterName(config)#enable ?RouterName(config)#enable passwordRouterName(config)#enable secret#有两种密码形式1.secret加密的 2.password明文的#如果同时起用,secret与password的密码不能相同#secret优先级>password#Rout

6、erName(config)#no enable passwordRouterName(config)#no enable secret#去掉密码设置#RouterName(config)#line ?<0-7> First line numberAux Auxiliary lineConsole Primary terminal linetty Terminal controllervty Virtual terminal#Aux辅助密码Console密码tty终端密码vty虚拟密码#RouterName(config)#line con 0RouterName(config)#

7、loginRouterName(config)#password yourpassword1RouterName(config)#line vty 0 4#定义五个虚拟端口#RouterName(config)#loginRouterName(config)#password yourpassword2RouterName(config)#line aux 0RouterName(config)#loginRouterName(config)#password yourpassword3#设置console vty及Aux密码#RouterName(config)#line con 0Rout

8、erName(config)#exec-timeout 0 0#设置console口登陆后在超时后不被退出#RouterName(config)#logging synchronous#设置同步显示,输入命令时不被路由器的显示打挠#六、如何设置路由器的主机名、描述、IP地址和时钟频率RouterName(config)#hostname Yourhostname#设置路由器名称#RouterName(config)#banner ?RouterName(config)#banner motd #Enter TEXT message. End with the character '#&

9、#39;.welcome to motd Router#RouterName(config)#banner login #Enter TEXT message. End with the character '#'.welcome to login Router#设置路由器banner,motd优先级>login#RouterName(config)#no banner motdRouterName(config)#no banner login#删除banner#RouterName(config)#interface fastethernet 0/0RouterNam

10、e(config-if)#ip address #IP地址绑定到了快速以太网的接口上#RouterName(configif)#no shutdown#直接起用该IP,注意如果你是用telnet配置的,这时就会断线#RouterName(configif)#interface serial 0/0RouterName(configif)#ip address RouterName(configif)#no shutdown#IP地址绑定到串口上#不同接口的IP地址要保证在不同的网段上#RouterName(

11、configif)#description WAN link to BeiJing#描述说明Wan link to BeiJing#RouterName(configif)#bandwidth 512#带宽大小#RouterName(configif)#clock rate 64000#时钟频率#RouterName(configif)#endRouterName#show interface serial 0/0七、如何创建静态路由项RouterName(config)#ip route RouterName(confi

12、g)#copy run start#创建静态项,并保存#RouterName(config)#no ip route #删除静态项#RouterName(config)#ping #可以用ping功能测试是否成功#RouterName#show ip protocol#显示当前协议类型#RouterName#show ip route#显示路由配置,C表示直连 S表示静态路由项 R表示RIP I表示IGRP#八、使用RIP协议来配置动态路由RouterName(config)#no ip route

13、 #在创建动态路由前,必须把静态路由全部删除#因为静态路由优先级为1>IGRP>RIP#RouterName(config)#router ripRouterName(config-router)#network #这儿不需要输入掩码,因为RIP只支持默认掩码#RouterName(config-router)#end九、使用IGRP协议来配置动态路由RouterName(config)#router igrp ?RouterName(config)#router igrp 100#100项

14、可任选,如果确定,那么其它路由器也要选择100项#RouterName(config-router)#network RouterName(config-router)#endRouterName#traceroute 5#可以用traceroute命令测试经过的路由#RouterName(config)#router igrp 100RouterName(config-router)#variance ?RouterName(config-router)#variance 1RouterName(config-router)#traffic-sha

15、re ?balanced Share inversely proportional to metricmin All traffic shared among min metric paths#balanced表示可以平衡即多个包可以同时走多条路#min表示只允许走最快的一条路#十、Cisco交换机Vlan的划分SwitchA>enable#进入特权模式#SwitchA#show vlan#显示当时信息,一般默认所有Port都处于Vlan1#SwitchA#vlan database#进入Vlan的配置模式#SwitchA(vlan)#?#查看当前所有可用命令#SwitchA(vlan)

16、#vlan ?SwitchA(vlan)#vlan 2SwitchA(vlan)#exit#建立一个vlan并退出#SwitchA#config#进入配置模式#SwitchA(config)#interface fastethernet0/3SwitchA(config-if)#switchport ?#显示所有类型#SwitchA(config-if)#switchport access ?SwitchA(config-if)#switchport access vlan 2SwitchA(config-if)#endSwitchA#show vlan#可以再次查看vlan情况#十一、如何备

17、份路由器的IOS首先要在PC电脑上装载cisco TFTP服务下载地址见下面链接保证TFTP正常运作Feedomnet#ping #假设TFTP服务器地址为#ping以确保能否与TFTP服务器正常通信#Feedomnet#show flash#显示闪存中空间状况#Feedomnet#show version#显示版本号,起动时间,注册码等等#System image file is "flash:c2600-i-mz.120-7.T"#载取show version中的版本部分,当然也可以用show flash查看#Feedomne

18、t#copy flash tftpSource filename ?c2600-i-mz.120-7.T#要求我们输入源文件名即IOS文件名#注意这儿大小写是敏感的#Address or name of remote host ?#要求我们输入目标主机的ip#Destination filename c2600-i-mz.120-7.T?#要求我们输入目标文件名称,回车即可#开始copy,"!"表示成功无误,TFTP是使用UDP方式传输包#copy过程中,路由器与TFTP服务器是双向进行的#IOS文件的备份是非常重要的一个部份#完成拷贝后TFTP会提示

19、Successful而路由器也会提示完成并自动回到特权模式#在TFTP->View->Option-TFTP server root可以看到IOS备份的路径#十二、如何更新路由器的IOSFeedomnet#copy tftp falshAddress or name of remote host ?Source filename ?c2600-i-mz.120-7.TDestiantion filename c2600-i-mz.120-7.T?#如果目标文件名换成新的文件名#那么在路由器中将存在两个IOS文件,如果空间不成问题#如果直接回车,表示不更改文件名

20、称,那么将复盖原来的IOS文件#Do you want to over write?confirm#不更改文件名,回车确认复盖#Erase flash:before copying? confirmErasing the flash filesystem will remove all files! continue? confirmVerifying Checksum. OK (0XBDFF)十三、如何备份路由器的配置Feedomnet#copy run tftpAddress or name of remote host ?Destination filename 2

21、620a-config?#拷贝running-config到tftp#Feedomnet#copy startup-config tftpAddress or name of remote host ?Destination filename startup-config?2620a-startup#可以随便起个名字#拷贝startup-config到tftp#可以回到tftp服务器找到该两个配置内容#可以用记事本打开查看#十四、如何使用CDP协议Feedomnet#show cdpFeedomnet#configFeedomnet(config)#cdp timer ?

22、Feedomnet(config)#cdp timer 60Feedomnet#show cdp ?Feedomnet#show cdp interface#显示当前路由器CDP的状态#Feedomnet#show cdp entry *#显示所有直接连接设备的具体信息#Feedomnet#show cdp neighbor#显示所有直接连接的邻居#Feedomnet#show cdp neighbor detail#显示所有直接连接的邻居设备的细节#Feedomnet#configFeedomnet(config)#no cdp run#禁用cdp#Feedomnet(config)#cdp

23、 run#启用cdp#Feedomnet#show cdp n#显示#十五、如何正确的使用telnet使用consol连上本地路由器Feedomnet#telnet #连接到远端的路由器#Router1#exit#退回到本机路由器#Feedomnet#telnet #连接到远端的路由器2#Router2#exit#退回到本机路由器#Feedomnet#show sessions#显示历史连接记录#Conn Host Address Byte Idle Conn Name1 0 1

24、* 2 0 0 Feedomnet#1#可以选择曾经连接过的路由器#按两次回车马上进入#不选择两次回车进入默认的路由器即星号的路由器#Feedomnet##telnet到该路由器,可缺省telnet命令#Router1#show user#显示该路由器使用的用户#Router1#clear line 22#断开使用者的会话#十六、如何完成解析主机名Feedomnet#Feedomnet#configFeedomnet(config)#ip host RouterA Feedomnet

25、(config)#ip host RouterB #增加IP主机影射项#Feedomnet(config)#endFeedomnet#ping RouterAFeedomnet#ping RouterBFeedomnet#show hosts#显示所有刚刚添加的主机项目#Feedomnet(config)#no ip host RouterA#删除主机项#十七、如何配置IP标准的访问列表Feedomnet(config)#access-list ?#查看所有的访问列表的类型#Feedomnet(config)#access-list 10 permit 172.16.10.

26、100 ?Feedomnet(config)#access-list 10 permit 00 Feedomnet(config)#int fast0/0Feedomnet(config-if)#ip access-group 10 inFeedomnet(config-if)#endFeedomnet#show access-list十八、如何配置IP扩展的访问列表#注意在配置扩展前要把标准的列表给删除掉#Feedomnet(config)#access-list 110 deny ?Feedomnet(config)#access-list 110 de

27、ny tcp host host 54 eq telnet log#拒绝这台电脑用telnet访问54路由器#Feedomnet(config)#access-list 110 permit ip any any#允许所有的通过,以上两条命令一般都是联系起来做的#Feedomnet(config)#int f0/0Feedomnet(config-ip)#ip access-group 110 in#把所配的110配置与快速以太网口联系起来#Feedomnet(config-ip)#endFeedomnet#sh run十九、如何配置ppp协议#首先在路由器A进行配置#F

温馨提示

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

最新文档

评论

0/150

提交评论