[IT认证]CCNA基本命令.doc_第1页
[IT认证]CCNA基本命令.doc_第2页
[IT认证]CCNA基本命令.doc_第3页
[IT认证]CCNA基本命令.doc_第4页
[IT认证]CCNA基本命令.doc_第5页
全文预览已结束

下载本文档

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

文档简介

常用的配置模式有:配置向导配置模式和直接配置模式。使用配置向导配置采用一问一答的方式配置,配置的东西冗长,不灵活,我们做为网络工程师通常使用直接配置方式即(命令配置方式),快,准确!如下图:3-2、路由器CAL模式介绍:路由器分为4种模式:用户模式、特权模式、全局模式(配置模式)、配置子模式(例:接口模式、OSPF路由进程模式等)3-2-1、用户模式:可以使用少量的命令对本路由器进行查询、测试等功能,如下图:3-2-2特权模式:在用户模式下输入enable可以进入特权模式。该模式可以查询本路由器的所有信息和进行简单的配置(例:修改路由器的时间、删除路由器的配置信息、重启路由器、删除IOS、保存配置等)例:保存配置3-2-3全局模式:在特权模式下输入configure terminal可以进入全局模式。 在该模式下可以全权配置、修改、删除该路由器的所有参数,例:路由器命名、启动路由协议、配置虚接口、启动ACL防问表等等。2-4配置子模式:例:接口模式、路由模式、策略模式等等、控制台接口模式等4、基础配置:4-1、基础配置案例:以下兰色斜体字部份为该模式的命令,后面括号为该命令解释。黄底部份需值得注意,这是帮大家分晰故障的地方。Routerenable (由用户模式切换到特权模式)Router#configure terminal (由特权模式切换到全局模式)Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname itaa (修改路由器名字)itaa(config)#line console 0 (配置console接口)itaa(config-line)#logg synchronous (打开console接口输入信息同步)itaa(config-line)#exec-timeout 0 0 (关闭该console接口配置超时)itaa(config-line)#password 123 (配置console接口密码)注意:一定要加载,不然配置密码无效itaa(config-line)#login (加载密码配置)itaa(config-line)#exit (由console接口退到全局模式)itaa(config)#line vty 0 4(由全局模式进入VTY模式即远程登陆模式)itaa(config-line)#logg synchronous itaa(config-line)#exec-timeout 0 0 (做试验时的配置)itaa(config-line)#password 456itaa(config-line)#login itaa(config-line)#exititaa(config)#enable password itaa(配置路由器模式切换明文密码)itaa(config)#enable secret onetom(配置路由器模式切换密文密码)itaa(config)#service password-encryption (对路由器配置的明密码进行加密)itaa(config)#no ip domain lookup (关闭域名解晰)itaa(config)#exit (由全局模式退到特权模式) itaa#show ip interface brief (查看当前设备有那些类型接口及接口号)Interface IP-Address OK? Method Status ProtocolEthernet0/0 unassigned YES unset administratively down down Serial0/0 unassigned YES unset administratively down down Serial0/1 unassigned YES unset administratively down down 当前设备有以太网接口一个为0/0,两个串口为0/1、0/1,其中对0/0、0/1进行以下解释:普通路由器和交换机的接口是固化在设备上的,其标识为E0或S0等。但是像电信或移动等这些运营商对设备接口要求一多二灵活。如果使用普通的设备(固化接口设备)就会带来很高的成本,因为他们常常根据不同的业务其采用不同的应用,不同应用便有不同种类的设备接口,所以对设备接口的灵活性要求是必须的。所以生产厂家为了满足客户的需求,采用接口模块化(即一个模块插一个插槽/solte)。这样同一个设备插入不同的模块,以满足客户对不同业务的需求。而例:0/1中,0代表第一张模块所插的第一个插槽,1代表第一张模块上第一个接口。它们之间用“/”间隔!itaa#conf tEnter configuration commands, one per line. End with CNTL/Z.itaa(config)#interface Ethernet 0/0(由全局模式进入接口模式)itaa(config-if)#ip addres 192.168.1.1 255.255.255.0(配置该接口的IP地址)itaa(config-if)#no shutdown (打开当前接口)*Mar 1 00:14:02.108: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up*Mar 1 00:14:03.109: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to itaa(config-if)#interface serial 0/0 (由Ethernet 0/0接口切换到serial 0/0)itaa(config-if)#ip add 12.1.1.1 255.255.255.0itaa(config-if)#no shut*Mar 1 00:48:36.765: %LINK-3-UPDOWN: Interface Serial0/0, changed state to downitaa(config-if)#int s0/1itaa(config-if)#ip add 13.1.1.1 255.255.255.0itaa(config-if)#no shut*Mar 1 00:18:03.844: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up*Mar 1 00:18:03.848: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up*Mar 1 00:18:04.846: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to upitaa(config-if)#*Mar 1 00:18:04.850: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to upitaa(config-if)#*Mar 1 00:18:25.387: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down*Mar 1 00:18:25.391: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down排错:itaa#show ip int brief Interface IP-Address OK? Method Status ProtocolEthernet0/0 192.168.1.1 YES manual up up Serial0/0 12.1.1.1 YES manual up down Serial0/1 13.1.1.1 YES manual up down 出现以上现象时是因为没有配置Serial接口的时钟速率。因为Serial接口由DCE端和DTE端组成。有些线缆头上有标注,有些线缆没有标注。DCE作为服务端,类似学校教室内的老师,而DTE作为客户端,类似学校教室内的学生DCE端必须向DTE提代时钟速率。itaa#show controllers serial 0/1 (查看接口是否是DCE端)Interface Serial0/1Hardware is PowerQUICC MPC860DCE V.35, no clockidb at 0x82C1884C, driver data structure at 0x82C205E0SCC Registers:General GSMR=0x2:0x00000030, Protocol-specific PSMR=0x8Events SCCE=0x0000, Mask SCCM=0x001F, Status SCCS=0x00Transmit on Demand TODR=0x0, Data Sync DSR=0x7E7EInterrupt Registers:Config CICR=0x00367F80, Pending CIPR=0x00008800Mask CIMR=0x60204400, In-srv CISR=0x00000000Command register CR=0x640Port A PADIR=0x0400, PAPAR=0xFFFF PAODR=0x0000, PADAT=0xF0FFPort B PBDIR=0x03A0F, PBPAR=0x0000E PBODR=0x00000, PBDAT=0x3C55DPort C PCDIR=0x00C, PCPAR=0x000 PCSO=0x0A0, PCDAT=0xF00, PCINT=0x00FReceive Ring rmd(680127F0): status 9000 length 60C address 374B344 rmd(680127F8): status 9000 length 60C address 374ACC4 itaa#conf tEnter configuration commands, one per line. End with CNTL/Z.itaa(config)#int s0/1itaa(config-if)#clock rate 64000 (配置时钟速率)itaa(config-if)#enditaa#*Mar 1 00:27:25.445: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to upitaa#itaa#show ip int briefInterface IP-Address OK? Method Status ProtocolEthernet0/0 192.168.1.1 YES manual up up Serial0/0 12.1.1.1 YES manual up up Serial0/1 13.1.1.1 YES manual up up 测试:itaa#ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 msitaa#ping 12.1.1.1 Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 12.1.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/30/32 msitaa#ping 13.1.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 13.1.1.1, timeout is 2 seconds:!Success rate is 100 percent (

温馨提示

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

评论

0/150

提交评论